/* Color Palette System - 60-30-10 Formatting Rule with Rich Gradients & Contrast */
:root {
    /* Amazon-style Crisp System Fonts - Highly Readable and Modern */
    --font-stack: "Amazon Ember", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --bg-dominant: #FCFAF6;
    --bg-gradient: radial-gradient(circle at 50% 50%, #FCFAF6 0%, #F5EFE4 100%);
    --color-structure: #4A3525;   /* Deep Terracotta Brown */
    --color-accent: #DFAC57;      /* Glazed Ochre Gold */
    --color-accent-hover: #C59340;
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-soft: rgba(74, 53, 37, 0.08);
    --text-muted: #7E6C60;
    --white: #FFFFFF;
    --black-shadow: rgba(74, 53, 37, 0.04);
    --input-bg: #FFFFFF;
    --input-text: #4A3525;
    --input-border: #EFEBE4;
    --ceramic-accent: rgba(223, 172, 87, 0.15);
    --glow-effect: 0 4px 15px rgba(223, 172, 87, 0.06);
}

body.dark-theme {
    --bg-dominant: #111111;
    --bg-gradient: radial-gradient(circle at 50% 50%, #1A1917 0%, #0B0A09 100%);
    --color-structure: #FAF6F0;   
    --color-accent: #E5B766;      
    --color-accent-hover: #F2CA80;
    --card-bg: rgba(26, 25, 24, 0.95);
    --border-soft: rgba(250, 246, 240, 0.08);
    --text-muted: #B3A498;
    --white: #1A1918;
    --black-shadow: rgba(0, 0, 0, 0.4);
    --input-bg: #1F1D1C;
    --input-text: #FAF6F0;
    --input-border: #2E2B29;
    --ceramic-accent: rgba(229, 183, 102, 0.15);
    --glow-effect: 0 4px 15px rgba(229, 183, 102, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-stack);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.1s ease;
}

body {
    background: var(--bg-gradient);
    color: var(--color-structure);
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, .logo-text {
    font-family: var(--font-stack);
    font-weight: 700;
}

/* Perfect Square Images & Premium Sharp Minimalist Borders */
.product-card {
    background: var(--card-bg);
    border-radius: 4px; /* Premium subtle curve instead of round corners */
    border: 1px solid var(--border-soft);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px var(--black-shadow);
    transform: translateZ(0); /* Anti-aliasing glitch fix on viewport scaling */
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px var(--black-shadow);
    border-color: var(--color-accent);
}

/* 1:1 Aspect Ratio constraint for All Product Images */
.product-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    background-color: var(--border-soft);
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover .product-card-media img {
    transform: scale(1.04);
}

.card-sold-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #D9534F;
    color: #FFFFFF;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 2px;
    font-weight: 700;
    text-transform: uppercase;
}

.product-card-meta {
    padding: 15px 12px;
    text-align: left;
    background: var(--card-bg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card-meta h4 {
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--color-structure);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-meta p {
    color: var(--color-accent-hover);
    font-weight: 700;
    font-size: 1.05rem;
}

/* Responsive Image scaling stability */
img, video {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Clickable Hero Banners */
.hero-slider .slide {
    cursor: pointer;
}

/* Navigation Header styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 8%;
    background-color: rgba(252, 250, 246, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 999;
}

body.dark-theme .navbar {
    background-color: rgba(17, 17, 17, 0.95);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.brand-logo {
    max-height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: var(--color-structure);
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-structure);
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--color-accent);
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Theme toggle */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--color-structure);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Search Bar layout */
.search-bar-container {
    position: relative;
}

.search-bar-container input {
    padding: 8px 36px 8px 14px;
    border-radius: 4px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--input-text);
    font-size: 0.85rem;
    outline: none;
    width: 160px;
}

.search-bar-container input:focus {
    width: 220px;
    border-color: var(--color-accent);
}

.search-bar-container i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.cart-icon {
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    color: var(--color-structure);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--color-accent);
    color: #FFFFFF;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    padding: 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero-banner-container {
    width: 100%;
    aspect-ratio: 16 / 6;
    max-height: 480px;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.banner-arrow:hover {
    background-color: var(--color-accent);
}

.banner-arrow-left { left: 20px; }
.banner-arrow-right { right: 20px; }

.banner-indicators {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator-bar {
    width: 24px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.indicator-bar.active {
    background-color: var(--color-accent);
}

/* Footer & Consolidated Social Channels Layout */
.footer {
    background-color: var(--border-soft);
    padding: 40px 8% 20px 8%;
    border-top: 1px solid var(--border-soft);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-block h3 {
    margin-bottom: 12px;
}

.footer-block p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-block h4 {
    margin-bottom: 12px;
    font-size: 1rem;
}

.footer-block a {
    display: block;
    text-decoration: none;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-block a:hover {
    color: var(--color-accent);
}

.footer-social-wrapper {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-soft);
    color: var(--color-structure);
    font-size: 1.1rem;
    text-decoration: none;
}

.footer-social-icon:hover {
    background-color: var(--color-accent);
    color: #FFFFFF;
}

/* Products Layout Structure */
.products-section {
    padding: 30px 8%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.slider-wrapper {
    position: relative;
}

.product-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 2px;
}

.product-slider::-webkit-scrollbar {
    display: none;
}

.product-slider .product-card {
    flex: 0 0 calc((100% - 48px) / 4);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 20px 8% 40px 8%;
}

/* PDP Styles */
.pdp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 30px 8%;
}

.pdp-left-gallery {
    display: flex;
    gap: 12px;
}

.pdp-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 60px;
}

.pdp-thumb {
    width: 60px;
    height: 60px;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    cursor: pointer;
}

.pdp-thumb.active {
    border-color: var(--color-accent);
}

.pdp-main-viewport {
    flex: 1;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background-color: var(--card-bg);
}

.pdp-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.pdp-price {
    font-size: 1.5rem;
    color: var(--color-accent-hover);
    font-weight: 700;
    margin-bottom: 20px;
}

/* Cart Sidebar Styling */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: var(--card-bg);
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart-btn {
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-structure);
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* General Layout Rules for Large screens */
@media (min-width: 1400px) {
    .product-slider .product-card {
        flex: 0 0 calc((100% - 80px) / 5); /* Scales beautifully without breakage */
    }
}

@media (max-width: 900px) {
    .navbar {
        padding: 15px 5%;
    }
    .pdp-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .product-slider .product-card {
        flex: 0 0 calc((100% - 16px) / 2);
    }
}

@media (max-width: 500px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .product-slider .product-card {
        flex: 0 0 80%;
    }
}