/* ===========================
   DESIGN TOKENS
   =========================== */
:root {
    /* Colors */
    --color-primary: #1a2e35;
    --color-accent: #c2a37e;
    --color-background: #f9f8f3;
    --color-text: #1a2e35;
    --color-text-muted: #64748b;
    --color-white: #ffffff;
    --color-border: #e2e8f0;
    --color-surface: #ffffff;

    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ===========================
   RESET & BASE
   =========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: #4a5568;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.25s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* ===========================
   LAYOUT
   =========================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--spacing-2xl) 0;
}

.section-sm {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

/* ===========================
   HEADER & NAV
   =========================== */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo h2 {
    font-size: 1.25rem;
    margin: 0;
    letter-spacing: -0.02em;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
    background: rgba(26, 46, 53, 0.06);
    opacity: 1;
}

.nav-link.active {
    color: var(--color-accent);
    font-weight: 600;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
}

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

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 2px 8px rgba(26, 46, 53, 0.25);
}

.btn-primary:hover {
    background: #132228;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 46, 53, 0.35);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 2px 8px rgba(194, 163, 126, 0.3);
}

.btn-accent:hover {
    background: #b3935f;
    transform: translateY(-2px);
}

.btn-outline {
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

/* ===========================
   CARDS
   =========================== */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

/* ===========================
   HERO
   =========================== */
.hero {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, var(--color-background) 0%, #eef2f3 50%, #e8e0d4 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(194, 163, 126, 0.1) 0%, transparent 70%);
}

.hero-content {
    max-width: 550px;
}

.hero-content .subtitle {
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

/* ===========================
   PRODUCT CARD
   =========================== */
.product-card {
    cursor: pointer;
}

.product-card .product-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    aspect-ratio: 1/1;
    background: #f0ede8;
}

.product-card .product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}

.product-card .product-body {
    padding: 1.25rem;
}

.product-card .product-category {
    color: var(--color-accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.product-card .product-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.product-card .product-short {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.product-price {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.15rem;
}

/* ===========================
   SECTION HEADERS
   =========================== */
.section-header {
    margin-bottom: var(--spacing-xl);
}

.section-header .label {
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    max-width: 600px;
    margin: 0.5rem auto 0;
    color: var(--color-text-muted);
}

/* ===========================
   PAGE BANNER
   =========================== */
.page-banner {
    background: var(--color-primary);
    color: white;
    padding: 3.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(194, 163, 126, 0.15) 0%, transparent 60%);
}

.page-banner h1 {
    color: var(--color-accent);
    position: relative;
    margin-bottom: 0.5rem;
}

.page-banner p {
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    margin: 0;
}

/* ===========================
   SHOP SIDEBAR
   =========================== */
.shop-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.sidebar h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.sidebar-link {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--color-text);
    transition: background 0.2s;
    margin-bottom: 0.25rem;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(194, 163, 126, 0.15);
    color: var(--color-primary);
    font-weight: 500;
    opacity: 1;
}

/* ===========================
   FOOTER
   =========================== */
footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.85);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

footer h3 {
    color: var(--color-accent);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

footer a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ===========================
   CART PAGE
   =========================== */
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-item h4 {
    font-family: var(--font-heading);
    margin-bottom: 0.25rem;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 960px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .shop-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: var(--spacing-xl) 0;
    }

    .hero .grid-2 {
        gap: var(--spacing-lg);
    }

    nav {
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.5rem;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}