/* ============================================================
   enaija.com — Design System v1.0
   Palette: Aged Ebony / Brand Gold / Antique Linen
   Typography: Cinzel (display) / Playfair Display (headings) / Raleway (body)
   ============================================================

   TABLE OF CONTENTS
   01. Tokens & Variables
   02. Reset & Base
   03. Typography
   04. Layout Utilities
   05. Buttons
   06. Navigation & Header
   07. Mobile Navigation
   08. Hero Section
   09. Category Strip
   10. Product Cards
   11. Section Wrappers
   12. Brand Story
   13. Newsletter
   14. Footer
   15. Cart Sidebar
   16. Forms & Inputs
   17. Badges & Tags
   18. Pagination
   19. Flash Messages & Toasts
   20. Page Loader
   21. Scroll Animations
   22. Responsive — Tablet (max 1100px)
   23. Responsive — Mobile (max 768px)
   24. Responsive — Small (max 480px)
   ============================================================ */

/* ============================================================
   01. TOKENS & VARIABLES
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Raleway:wght@300;400;500;600&display=swap');

:root {
    /* Core Palette */
    --ebony:      #0D0A07;
    --espresso:   #1A1410;
    --walnut:     #2A1F12;
    --mocha:      #7A6A55;
    --linen:      #F5EDD8;
    --ivory:      #FAF7F0;
    --gold:       #C9A84C;
    --gold-light: #E8CC7A;
    --gold-dim:   rgba(201, 168, 76, 0.12);
    --gold-glow:  rgba(201, 168, 76, 0.28);
    --crimson:    #8B1A1A;

    /* Typography */
    --font-display: 'Cinzel', Georgia, serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body:    'Raleway', sans-serif;

    /* Spacing */
    --section-pad:   90px;
    --container-max: 1320px;

    /* Transitions */
    --t:      0.3s ease;
    --t-slow: 0.6s ease;

    /* Borders */
    --border:       1px solid rgba(201, 168, 76, 0.25);
    --border-solid: 1px solid var(--gold);
}

/* ============================================================
   02. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    background-color: var(--ebony);
    color: var(--linen);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.75;
    overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; transition: color var(--t); }

ul, ol { list-style: none; }

button, input, select, textarea {
    font-family: var(--font-body);
    outline: none;
    border: none;
    background: none;
}

/* ============================================================
   03. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--ivory);
}

h1 { font-size: clamp(2rem, 4.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.overline {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 12px;
}

/* ============================================================
   04. LAYOUT UTILITIES
   ============================================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 28px;
}

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

.section-dark     { background: var(--ebony); }
.section-espresso { background: var(--espresso); }
.section-walnut   { background: var(--walnut); }

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 { margin-bottom: 8px; }
.section-header p  { color: var(--mocha); max-width: 460px; margin: 12px auto 0; font-size: 0.9rem; }

/* Ornamental divider -- centered line + diamond */
.ornament {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    margin: 16px auto;
}

.ornament::before,
.ornament::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold));
}

.ornament::after {
    background: linear-gradient(to left, transparent, var(--gold));
}

.ornament span { color: var(--gold); font-size: 0.6rem; letter-spacing: 2px; }

/* ============================================================
   05. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all var(--t);
    position: relative;
}

.btn-gold {
    background: var(--gold);
    color: var(--ebony);
}

.btn-gold:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--gold-glow);
}

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

.btn-outline:hover {
    background: var(--gold);
    color: var(--ebony);
}

.btn-dark {
    background: var(--walnut);
    color: var(--linen);
    border: var(--border);
}

.btn-dark:hover {
    background: var(--gold);
    color: var(--ebony);
    border-color: var(--gold);
}

.btn-sm  { padding: 10px 24px; font-size: 0.68rem; }
.btn-lg  { padding: 18px 52px; font-size: 0.78rem; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   06. NAVIGATION & HEADER
   ============================================================ */
#site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 22px 0;
    transition: all var(--t);
}

#site-header.scrolled {
    background: rgba(13, 10, 7, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 0;
    border-bottom: var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border: var(--border-solid);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1rem;
}

.logo-wordmark {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.12em;
}

/* Main Nav */
.main-nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.main-nav > a,
.nav-item > a {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--linen);
    position: relative;
    padding-bottom: 4px;
}

.main-nav > a::after,
.nav-item > a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--gold);
    transition: width var(--t);
}

.main-nav > a:hover,
.nav-item > a:hover,
.main-nav > a.active {
    color: var(--gold);
}

.main-nav > a:hover::after,
.nav-item > a:hover::after,
.main-nav > a.active::after {
    width: 100%;
}

/* Dropdown */
.nav-item {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--espresso);
    border: var(--border);
    min-width: 210px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--t);
    z-index: 200;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
    display: block;
    padding: 10px 20px;
    font-size: 0.78rem;
    color: var(--linen);
    letter-spacing: 0.04em;
    transition: all var(--t);
}

.nav-dropdown a:hover {
    color: var(--gold);
    background: var(--gold-dim);
    padding-left: 28px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.header-actions > a,
.header-actions > button {
    color: var(--linen);
    font-size: 1rem;
    position: relative;
    background: none;
    cursor: pointer;
    transition: color var(--t);
    padding: 0;
}

.header-actions > a:hover,
.header-actions > button:hover { color: var(--gold); }

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--gold);
    color: var(--ebony);
    font-size: 0.58rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Menu Toggle (mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--linen);
    transition: all var(--t);
    transform-origin: center;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   07. MOBILE NAVIGATION
   ============================================================ */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: var(--espresso);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    text-align: center;
    transform: translateX(100%);
    transition: transform var(--t-slow);
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav a {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.1em;
    color: var(--linen);
    transition: color var(--t);
}

.mobile-nav a:hover { color: var(--gold); }

.mobile-nav-close {
    position: absolute;
    top: 24px; right: 24px;
    font-size: 1.4rem;
    color: var(--mocha);
    cursor: pointer;
    background: none;
    border: none;
    transition: color var(--t);
}

.mobile-nav-close:hover { color: var(--gold); }

.mobile-nav-cats {
    border-top: var(--border);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mobile-nav-cats a {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mocha);
}

/* ============================================================
   08. HERO SECTION
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, #1E1710 0%, #0D0A07 65%);
}

/* Gold grain texture overlay */
.hero-grain {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Brand infinity watermark */
.hero-watermark {
    position: absolute;
    right: -4%;
    top: 50%;
    transform: translateY(-55%);
    font-size: 55vw;
    color: rgba(201, 168, 76, 0.028);
    font-family: var(--font-display);
    pointer-events: none;
    user-select: none;
    line-height: 1;
    letter-spacing: -0.05em;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    padding-top: 80px;
}

.hero-content {}

.hero-content h1 {
    font-family: var(--font-heading);
    color: var(--ivory);
    margin-bottom: 24px;
    font-style: italic;
}

.hero-content h1 em {
    font-style: normal;
    color: var(--gold);
}

.hero-content p {
    color: var(--mocha);
    font-size: 0.95rem;
    max-width: 420px;
    margin-bottom: 40px;
    line-height: 1.9;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    padding-top: 32px;
    border-top: var(--border);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mocha);
    margin-top: 6px;
}

/* Hero visual (image collage) */
.hero-visual {
    position: relative;
    height: 560px;
}

.hero-img-main {
    position: absolute;
    top: 60px;
    right: 0;
    width: 76%;
    height: 470px;
    object-fit: cover;
    border: 3px solid rgba(201, 168, 76, 0.2);
}

.hero-img-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 260px;
    object-fit: cover;
    border: 3px solid rgba(201, 168, 76, 0.2);
}

.hero-img-tag {
    position: absolute;
    top: 40px;
    right: calc(24% + 12px);
    background: var(--gold);
    color: var(--ebony);
    padding: 10px 18px;
    font-family: var(--font-display);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

/* ============================================================
   09. CATEGORY STRIP
   ============================================================ */
.categories-section {
    background: var(--espresso);
    border-top: var(--border);
    border-bottom: var(--border);
    padding: 0;
}

.categories-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.categories-scroll::-webkit-scrollbar { display: none; }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    border-right: var(--border);
    transition: all var(--t);
    position: relative;
    text-decoration: none;
    color: inherit;
}

.cat-pill:last-child { border-right: none; }

.cat-pill::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform var(--t);
}

.cat-pill:hover::after,
.cat-pill.active::after { transform: scaleX(1); }

.cat-pill:hover,
.cat-pill.active { background: var(--gold-dim); }

.cat-icon {
    font-size: 1.3rem;
    transition: transform var(--t);
}

.cat-pill:hover .cat-icon { transform: translateY(-3px); }

.cat-label {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mocha);
    transition: color var(--t);
    white-space: nowrap;
}

.cat-pill:hover .cat-label,
.cat-pill.active .cat-label { color: var(--gold); }

/* ============================================================
   10. PRODUCT CARDS
   ============================================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-card {
    background: var(--espresso);
    border: var(--border);
    transition: all var(--t);
    position: relative;
}

.product-card:hover {
    border-color: rgba(201, 168, 76, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}

.product-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--walnut);
}

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

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

/* Product overlay actions */
.product-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    transform: translateY(100%);
    transition: transform var(--t);
}

.product-card:hover .product-overlay { transform: translateY(0); }

.p-action-btn {
    flex: 1;
    padding: 13px 8px;
    background: rgba(13, 10, 7, 0.92);
    color: var(--linen);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--t);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-right: var(--border);
    font-family: var(--font-body);
    font-weight: 400;
    text-decoration: none;
}

.p-action-btn:last-child { border-right: none; }
.p-action-btn:hover { background: var(--gold); color: var(--ebony); }

/* Wishlist button */
.p-wishlist {
    position: absolute;
    top: 14px; right: 14px;
    width: 34px; height: 34px;
    background: rgba(13, 10, 7, 0.75);
    border: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--mocha);
    transition: all var(--t);
    opacity: 0;
}

.product-card:hover .p-wishlist { opacity: 1; }
.p-wishlist:hover, .p-wishlist.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ebony);
}

/* Badge */
.p-badge {
    position: absolute;
    top: 14px; left: 14px;
    padding: 4px 10px;
    font-family: var(--font-display);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    background: var(--gold);
    color: var(--ebony);
}

.p-badge.sale {
    background: var(--crimson);
    color: var(--ivory);
}

/* Product info */
.product-info {
    padding: 20px;
}

.product-cat {
    font-family: var(--font-display);
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
    display: block;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--ivory);
    margin-bottom: 14px;
    line-height: 1.35;
    font-weight: 400;
}

.product-name a:hover { color: var(--gold); }

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-now {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gold);
    font-weight: 700;
}

.price-was {
    font-size: 0.82rem;
    color: var(--mocha);
    text-decoration: line-through;
}

/* ============================================================
   11. SECTION WRAPPERS
   ============================================================ */
.view-all-wrap {
    text-align: center;
    margin-top: 52px;
}

/* ============================================================
   12. BRAND STORY
   ============================================================ */
.brand-story {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.brand-wm {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 32vw;
    color: rgba(201, 168, 76, 0.035);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    line-height: 1;
}

.brand-story-inner {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.brand-story-inner h2 {
    font-style: italic;
    margin-bottom: 20px;
}

.brand-story-inner p {
    color: var(--mocha);
    font-size: 0.95rem;
    line-height: 2;
    margin-bottom: 36px;
}

/* ============================================================
   13. NEWSLETTER
   ============================================================ */
.newsletter-section {
    background: var(--espresso);
    border-top: var(--border);
    border-bottom: var(--border);
    text-align: center;
}

.newsletter-form {
    display: flex;
    max-width: 520px;
    margin: 32px auto 0;
}

.nl-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--walnut);
    border: var(--border);
    border-right: none;
    color: var(--linen);
    font-family: var(--font-body);
    font-size: 0.88rem;
    transition: border-color var(--t);
}

.nl-input::placeholder { color: var(--mocha); }
.nl-input:focus { border-color: var(--gold); }

.nl-btn {
    padding: 14px 28px;
    background: var(--gold);
    color: var(--ebony);
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--t);
    border: none;
}

.nl-btn:hover { background: var(--gold-light); }

/* ============================================================
   14. FOOTER
   ============================================================ */
#site-footer {
    background: var(--espresso);
    border-top: var(--border);
    padding: 80px 0 32px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 52px;
    margin-bottom: 64px;
}

.footer-logo-text {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--gold);
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 6px;
}

.footer-logo-line {
    width: 48px;
    height: 1px;
    background: var(--gold);
    margin: 12px 0 20px;
}

.footer-desc {
    color: var(--mocha);
    font-size: 0.85rem;
    line-height: 1.9;
    margin-bottom: 24px;
    max-width: 260px;
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mocha);
    font-size: 0.85rem;
    transition: all var(--t);
}

.social-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ebony);
}

.footer-heading {
    font-family: var(--font-display);
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: var(--border);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--mocha);
    transition: color var(--t);
    padding-left: 0;
}

.footer-links a:hover {
    color: var(--linen);
    padding-left: 6px;
}

.footer-contact-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--mocha);
    margin-bottom: 12px;
    line-height: 1.6;
}

.footer-contact-row i { color: var(--gold); flex-shrink: 0; margin-top: 2px; font-size: 0.8rem; }

.footer-bottom {
    border-top: var(--border);
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-copy { font-size: 0.75rem; color: var(--mocha); }
.footer-copy a { color: var(--gold); }

.payment-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.payment-badge {
    background: var(--walnut);
    border: var(--border);
    padding: 4px 10px;
    font-size: 0.6rem;
    color: var(--mocha);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ============================================================
   15. CART SIDEBAR
   ============================================================ */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--t);
}

.cart-overlay.active { opacity: 1; visibility: visible; }

.cart-sidebar {
    position: fixed;
    top: 0; right: -460px; bottom: 0;
    width: 460px;
    background: var(--espresso);
    border-left: var(--border);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right var(--t-slow);
}

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

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

.cart-title {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
}

.cart-x {
    background: none;
    border: none;
    color: var(--mocha);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--t);
    padding: 4px;
}

.cart-x:hover { color: var(--linen); }

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--mocha);
}

.cart-empty i { font-size: 2.5rem; margin-bottom: 16px; color: var(--walnut); }
.cart-empty p { font-size: 0.88rem; }

.cart-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: var(--border);
}

.cart-item-img {
    width: 78px; height: 78px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--walnut);
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    color: var(--ivory);
    line-height: 1.3;
    margin-bottom: 4px;
}

.cart-item-price {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 26px; height: 26px;
    background: var(--walnut);
    border: var(--border);
    color: var(--linen);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t);
}

.qty-btn:hover { background: var(--gold); color: var(--ebony); border-color: var(--gold); }

.qty-val {
    font-size: 0.85rem;
    min-width: 22px;
    text-align: center;
}

.cart-remove {
    background: none;
    border: none;
    color: var(--mocha);
    cursor: pointer;
    font-size: 0.75rem;
    transition: color var(--t);
    padding: 4px;
    align-self: flex-start;
}

.cart-remove:hover { color: #D97B7B; }

.cart-foot {
    padding: 20px 24px;
    border-top: var(--border);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: var(--mocha);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 12px;
    border-top: var(--border);
}

.cart-total-label {
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mocha);
}

.cart-total-amt {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--gold);
    font-weight: 700;
}

/* ============================================================
   16. FORMS & INPUTS
   ============================================================ */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mocha);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    background: var(--walnut);
    border: var(--border);
    color: var(--linen);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--t);
}

.form-control:focus { border-color: var(--gold); }
.form-control::placeholder { color: var(--mocha); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A84C' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ============================================================
   17. BADGES & TAGS
   ============================================================ */
.tag {
    display: inline-block;
    padding: 4px 12px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: var(--border);
    color: var(--gold);
}

/* ============================================================
   18. PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 52px;
}

.page-btn {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--espresso);
    border: var(--border);
    color: var(--mocha);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--t);
    text-decoration: none;
}

.page-btn:hover,
.page-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ebony);
}

/* ============================================================
   19. FLASH MESSAGES & TOASTS
   ============================================================ */
.flash {
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    border-left: 3px solid;
}

.flash-success {
    background: rgba(201, 168, 76, 0.08);
    border-color: var(--gold);
    color: var(--gold-light);
}

.flash-error {
    background: rgba(139, 26, 26, 0.12);
    border-color: var(--crimson);
    color: #D97B7B;
}

/* Toast container */
.toast-wrap {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.toast {
    background: var(--espresso);
    border: var(--border);
    border-left: 3px solid var(--gold);
    padding: 14px 20px;
    font-size: 0.82rem;
    color: var(--linen);
    min-width: 280px;
    max-width: 360px;
    animation: slideRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.toast-error { border-left-color: var(--crimson); }

.toast i { color: var(--gold); }
.toast.toast-error i { color: #D97B7B; }

@keyframes slideRight {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   20. PAGE LOADER
   ============================================================ */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--ebony);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.gone { opacity: 0; visibility: hidden; }

.loader-word {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--gold);
    letter-spacing: 0.35em;
    text-transform: lowercase;
}

.loader-track {
    width: 100px;
    height: 1px;
    background: var(--walnut);
    overflow: hidden;
    position: relative;
}

.loader-fill {
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--gold);
    animation: loadSlide 1.2s ease infinite;
}

@keyframes loadSlide {
    0%   { left: -100%; }
    100% { left: 110%; }
}

/* ============================================================
   21. SCROLL ANIMATIONS
   ============================================================ */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.in {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ============================================================
   22. RESPONSIVE — TABLET (max 1100px)
   ============================================================ */
@media (max-width: 1100px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-top    { grid-template-columns: repeat(2, 1fr); gap: 40px; }

    .categories-scroll { overflow-x: auto; }
    .categories-grid {
        display: flex;
        min-width: max-content;
    }
    .cat-pill { min-width: 120px; }
}

/* ============================================================
   23. RESPONSIVE — MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {
    :root { --section-pad: 60px; }

    .main-nav    { display: none; }
    .menu-toggle { display: flex; }

    .hero-inner      { grid-template-columns: 1fr; padding-top: 100px; }
    .hero-visual     { display: none; }
    .hero-content    { text-align: center; }
    .hero-ctas       { justify-content: center; }
    .hero-content p  { max-width: 100%; margin-left: auto; margin-right: auto; }
    .hero-stats      { justify-content: center; }
    .hero-watermark  { font-size: 80vw; }

    .categories-scroll { overflow-x: auto; }
    .categories-grid {
        display: flex;
        min-width: max-content;
    }

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

    .product-overlay { transform: none; display: none; }

    .footer-top   { grid-template-columns: 1fr; gap: 36px; }
    .footer-desc  { max-width: 100%; }

    .footer-bottom { flex-direction: column; text-align: center; }

    .cart-sidebar { width: 100%; right: -100%; }

    .newsletter-form { flex-direction: column; }
    .nl-input  { border-right: var(--border); }

    .hero-stats { gap: 28px; }
}

/* ============================================================
   24. RESPONSIVE — SMALL (max 480px)
   ============================================================ */
@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-info { padding: 14px; }
    .product-name { font-size: 0.85rem; }
    .price-now    { font-size: 0.9rem; }

    .hero-ctas { flex-direction: column; align-items: center; }
    .btn-lg    { padding: 15px 36px; }

    .hero-stats { flex-wrap: wrap; gap: 20px; }
    .stat-number { font-size: 1.3rem; }

    .toast-wrap { right: 12px; bottom: 12px; }
    .toast { min-width: 0; }
}
