/* ============================================
   LUXE STORE — Main Stylesheet
   Modern, clean e-commerce design
   Mobile-first responsive approach
   ============================================ */

/* ---------- CSS Variables (Theme) ---------- */
:root {
    /* Colors */
    --color-bg: #FAFAF8;
    --color-surface: #FFFFFF;
    --color-text: #1A1A1A;
    --color-text-light: #6B6B6B;
    --color-text-muted: #999999;
    --color-border: #E8E6E1;
    --color-border-light: #F0EEEA;
    --color-primary: #2C2C2C;
    --color-primary-hover: #000000;
    --color-accent: #C8956C;
    --color-accent-hover: #B07D55;
    --color-accent-light: #FDF6F0;
    --color-success: #2D8B4E;
    --color-success-bg: #ECFDF3;
    --color-warning: #D97706;
    --color-warning-bg: #FFFBEB;
    --color-error: #DC2626;
    --color-error-bg: #FEF2F2;
    --color-badge: #C8956C;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max: 1280px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.1);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.3s;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
ul, ol { list-style: none; }

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}
.section-header p {
    color: var(--color-text-light);
    margin-top: var(--space-sm);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.8rem 1.8rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
    border: 2px solid transparent;
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); transform: translateY(-1px); }
.btn-accent {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.btn-accent:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-outline:hover { border-color: var(--color-text); }
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Announcement Bar ---------- */
.announcement-bar {
    background: var(--color-primary);
    color: #fff;
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}
.announcement-bar a { color: var(--color-accent); text-decoration: underline; font-weight: 500; }

/* ---------- Header ---------- */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow var(--duration) var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: var(--space-lg);
}
.logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-text);
    flex-shrink: 0;
}
.main-nav {
    display: none;
    gap: var(--space-xl);
    align-items: center;
}
.main-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-sm) 0;
    position: relative;
}
.main-nav a:hover { color: var(--color-accent); }
.nav-dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: var(--space-sm) 0;
    z-index: 100;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.875rem;
}
.dropdown-menu a:hover { background: var(--color-bg); color: var(--color-accent); }

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: background var(--duration) var(--ease);
    position: relative;
}
.header-icon:hover { background: var(--color-bg); }
.cart-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--color-badge);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    z-index: 1001;
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--duration) var(--ease);
    transform-origin: center;
}
.mobile-menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav open state */
.main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-surface);
    padding: 80px var(--space-xl) var(--space-xl);
    gap: var(--space-md);
    z-index: 999;
    overflow-y: auto;
}
.main-nav.open a { font-size: 1.1rem; padding: var(--space-md) 0; border-bottom: 1px solid var(--color-border-light); }
.main-nav.open .dropdown-menu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 var(--space-lg);
}

/* ---------- Flash Messages ---------- */
.flash-message {
    padding: var(--space-md) 0;
    font-size: 0.875rem;
    font-weight: 500;
}
.flash-message .container { display: flex; align-items: center; justify-content: space-between; }
.flash-success { background: var(--color-success-bg); color: var(--color-success); }
.flash-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.flash-error { background: var(--color-error-bg); color: var(--color-error); }
.flash-close { font-size: 1.2rem; opacity: 0.6; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, #2C2C2C 0%, #1A1A1A 50%, #3D3528 100%);
    color: #fff;
    padding: var(--space-4xl) 0;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(200,149,108,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(200,149,108,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; max-width: 600px; }
.hero-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid rgba(200,149,108,0.3);
    border-radius: var(--radius-sm);
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}
.hero h1 em {
    font-style: italic;
    color: var(--color-accent);
}
.hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: var(--space-2xl);
    max-width: 460px;
    line-height: 1.7;
}
.hero-actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.hero .btn-accent { border-color: var(--color-accent); }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.3); }
.hero .btn-outline:hover { border-color: #fff; }

/* ---------- Categories Grid ---------- */
.section { padding: var(--space-4xl) 0; }
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}
.category-card {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    transition: all var(--duration) var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-accent); }
.category-card .cat-icon {
    width: 56px; height: 56px;
    background: var(--color-accent-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    color: var(--color-accent);
}
.category-card h3 { font-size: 1rem; }
.category-card .cat-count { font-size: 0.8rem; color: var(--color-text-muted); }

/* ---------- Product Cards ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}
.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    transition: all var(--duration) var(--ease);
    position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--color-bg);
    overflow: hidden;
}
.product-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.product-card:hover .product-card-image img { transform: scale(1.05); }
.product-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background: var(--color-error);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.product-badge.new { background: var(--color-success); }
.product-card-body { padding: var(--space-md); }
.product-card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}
.product-card-title {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-title a:hover { color: var(--color-accent); }
.product-price {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}
.product-price .current {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}
.product-price .original {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
}
.product-card-actions {
    margin-top: var(--space-md);
}
.add-to-cart-btn {
    width: 100%;
    padding: 0.6rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: all var(--duration) var(--ease);
    border: none;
    cursor: pointer;
}
.add-to-cart-btn:hover { background: var(--color-primary-hover); }
.add-to-cart-btn.added { background: var(--color-success); }
.add-to-cart-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Promo Banner ---------- */
.promo-banner {
    background: linear-gradient(135deg, #2C2C2C 0%, #3D3528 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.promo-banner::before {
    content: '';
    position: absolute;
    top: -60%; right: -20%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(200,149,108,0.2) 0%, transparent 70%);
    border-radius: 50%;
}
.promo-banner h2 { position: relative; z-index: 1; margin-bottom: var(--space-md); }
.promo-banner h2 em { font-style: italic; color: var(--color-accent); }
.promo-banner p { position: relative; z-index: 1; color: rgba(255,255,255,0.7); margin-bottom: var(--space-xl); }

/* ---------- Newsletter ---------- */
.newsletter-section {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}
.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 460px;
    margin: 0 auto;
}
.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    outline: none;
    transition: border-color var(--duration) var(--ease);
}
.newsletter-form input:focus { border-color: var(--color-accent); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.8);
    padding: var(--space-4xl) 0 var(--space-xl);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}
.footer-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: var(--space-md);
}
.footer-about p { font-size: 0.9rem; line-height: 1.7; margin-bottom: var(--space-lg); }
.social-links { display: flex; gap: var(--space-md); }
.social-links a {
    width: 38px; height: 38px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration) var(--ease);
}
.social-links a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.footer-col h4 {
    color: #fff;
    margin-bottom: var(--space-lg);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-col a { font-size: 0.9rem; transition: color var(--duration) var(--ease); }
.footer-col a:hover { color: var(--color-accent); }
.contact-list li { display: flex; align-items: flex-start; gap: var(--space-sm); font-size: 0.9rem; }
.contact-list svg { flex-shrink: 0; margin-top: 3px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-xl);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

/* ============================================
   PRODUCTS PAGE
   ============================================ */
.page-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    padding: var(--space-2xl) 0;
}
.page-header h1 { margin-bottom: var(--space-xs); }
.breadcrumb {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb span { color: var(--color-text-muted); }

.shop-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding: var(--space-2xl) 0;
}

/* Filters sidebar */
.shop-filters {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
    height: fit-content;
}
.filter-group { margin-bottom: var(--space-xl); }
.filter-group:last-child { margin-bottom: 0; }
.filter-group h4 { margin-bottom: var(--space-md); font-size: 0.8rem; }
.filter-group label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    font-size: 0.9rem;
    cursor: pointer;
}
.filter-group input[type="checkbox"],
.filter-group input[type="radio"] { accent-color: var(--color-accent); }
.filter-group select,
.filter-group input[type="number"] {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    outline: none;
}
.price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}
.shop-toolbar .result-count { font-size: 0.875rem; color: var(--color-text-light); }
.shop-toolbar select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font-size: 0.85rem;
}
.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--color-surface);
}

/* Search bar on products page */
.search-bar {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}
.search-bar input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    outline: none;
}
.search-bar input:focus { border-color: var(--color-accent); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-2xl);
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--duration) var(--ease);
}
.pagination a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pagination .active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.product-detail { padding: var(--space-2xl) 0 var(--space-4xl); }
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
}
.product-gallery {
    position: relative;
}
.product-main-image {
    aspect-ratio: 1;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
}
.product-main-image img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.product-thumbnails {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}
.product-thumbnails .thumb {
    width: 64px; height: 64px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-border-light);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--duration) var(--ease);
}
.product-thumbnails .thumb.active,
.product-thumbnails .thumb:hover { border-color: var(--color-accent); }
.product-thumbnails .thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info .product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}
.product-info h1 { margin-bottom: var(--space-md); }
.product-info .product-price {
    font-size: 1.3rem;
    margin-bottom: var(--space-lg);
}
.product-info .product-price .current { font-size: 1.5rem; }
.product-info .product-price .original { font-size: 1.1rem; }
.product-info .product-price .save-badge {
    background: var(--color-error-bg);
    color: var(--color-error);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}
.product-short-desc {
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
}
.product-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    font-size: 0.875rem;
}
.product-meta span { color: var(--color-text-light); }
.product-meta strong { color: var(--color-text); }
.stock-status { display: inline-flex; align-items: center; gap: var(--space-xs); }
.stock-dot {
    width: 8px; height: 8px;
    border-radius: var(--radius-full);
    background: var(--color-success);
}
.stock-dot.out { background: var(--color-error); }

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    width: fit-content;
    margin-bottom: var(--space-lg);
}
.qty-selector button {
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--color-text-light);
    transition: color var(--duration) var(--ease);
}
.qty-selector button:hover { color: var(--color-text); }
.qty-selector input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0;
    height: 42px;
    outline: none;
}

.product-detail-actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.product-full-desc {
    margin-top: var(--space-3xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--color-border-light);
}
.product-full-desc h2 { margin-bottom: var(--space-lg); }
.product-full-desc p { color: var(--color-text-light); line-height: 1.8; }

/* ============================================
   CART PAGE
   ============================================ */
.cart-page { padding: var(--space-2xl) 0 var(--space-4xl); }
.cart-table {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    margin-bottom: var(--space-xl);
}
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
    align-items: center;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-image {
    width: 80px; height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-bg);
    flex-shrink: 0;
}
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { min-width: 0; }
.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}
.cart-item-name a:hover { color: var(--color-accent); }
.cart-item-price { font-size: 0.875rem; color: var(--color-text-light); margin-bottom: var(--space-sm); }
.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}
.cart-item-controls .qty-selector { margin-bottom: 0; }
.cart-item-total { font-weight: 700; font-size: 0.95rem; }
.cart-remove {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    transition: color var(--duration) var(--ease);
}
.cart-remove:hover { color: var(--color-error); }

.cart-summary {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
}
.cart-summary h3 { margin-bottom: var(--space-lg); font-size: 1.1rem; }
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    font-size: 0.95rem;
}
.summary-row.total {
    border-top: 2px solid var(--color-border);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    font-size: 1.1rem;
    font-weight: 700;
}
.cart-empty {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
}
.cart-empty svg { color: var(--color-text-muted); margin-bottom: var(--space-lg); }
.cart-empty h2 { margin-bottom: var(--space-md); }
.cart-empty p { color: var(--color-text-light); margin-bottom: var(--space-xl); }

/* ============================================
   FORMS (Auth, Checkout)
   ============================================ */
.auth-page, .checkout-page { padding: var(--space-2xl) 0 var(--space-4xl); }
.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    border: 1px solid var(--color-border-light);
}
.auth-card h1 { text-align: center; margin-bottom: var(--space-xs); }
.auth-card .subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
    font-size: 0.9rem;
}
.form-group { margin-bottom: var(--space-lg); }
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    outline: none;
    transition: border-color var(--duration) var(--ease);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--color-accent); }
.form-group .error { border-color: var(--color-error); }
.form-error { font-size: 0.8rem; color: var(--color-error); margin-top: var(--space-xs); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.auth-link {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: 0.875rem;
    color: var(--color-text-light);
}
.auth-link a { color: var(--color-accent); font-weight: 600; }

/* Checkout layout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}
.checkout-form-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
}
.checkout-form-section h2 { font-size: 1.2rem; margin-bottom: var(--space-xl); }
.order-summary-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
    height: fit-content;
}
.order-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border-light);
}
.order-item:last-of-type { border-bottom: none; }
.order-item-img {
    width: 56px; height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-bg);
    flex-shrink: 0;
}
.order-item-img img { width: 100%; height: 100%; object-fit: cover; }
.order-item-info { flex: 1; min-width: 0; }
.order-item-name { font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.order-item-qty { font-size: 0.8rem; color: var(--color-text-muted); }
.order-item-price { font-weight: 600; font-size: 0.875rem; white-space: nowrap; }

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-page { padding: var(--space-2xl) 0 var(--space-4xl); }
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}
.dashboard-sidebar {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-border-light);
    height: fit-content;
}
.dashboard-sidebar .user-greeting {
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: var(--space-lg);
}
.dashboard-sidebar .user-greeting h3 { font-size: 1rem; }
.dashboard-sidebar .user-greeting p { font-size: 0.8rem; color: var(--color-text-muted); }
.dash-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all var(--duration) var(--ease);
}
.dash-nav a:hover, .dash-nav a.active { background: var(--color-bg); color: var(--color-accent); }
.dash-nav .logout-link { color: var(--color-error); margin-top: var(--space-md); }

.dashboard-content {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
}
.dashboard-content h2 { margin-bottom: var(--space-xl); }

.orders-list { display: flex; flex-direction: column; gap: var(--space-md); }
.order-card {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}
.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
    gap: var(--space-sm);
}
.order-number { font-weight: 700; font-size: 0.95rem; }
.order-date { font-size: 0.8rem; color: var(--color-text-muted); }
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.status-pending { background: var(--color-warning-bg); color: var(--color-warning); }
.status-processing { background: #EBF5FF; color: #2563EB; }
.status-shipped { background: #F0EBFF; color: #7C3AED; }
.status-delivered { background: var(--color-success-bg); color: var(--color-success); }
.status-cancelled { background: var(--color-error-bg); color: var(--color-error); }
.order-total { font-size: 1.05rem; font-weight: 700; }

/* ============================================
   ORDER CONFIRMATION
   ============================================ */
.confirmation-page { padding: var(--space-3xl) 0; text-align: center; }
.confirmation-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    border: 1px solid var(--color-border-light);
}
.confirmation-icon {
    width: 72px; height: 72px;
    background: var(--color-success-bg);
    color: var(--color-success);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-xl);
}
.confirmation-card h1 { margin-bottom: var(--space-md); }
.confirmation-card p { color: var(--color-text-light); margin-bottom: var(--space-lg); }

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-layout { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.admin-sidebar {
    background: var(--color-primary);
    color: #fff;
    padding: var(--space-xl);
    display: none;
}
.admin-sidebar .admin-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar .admin-logo small { display: block; font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.05em; opacity: 0.5; font-weight: 400; margin-top: 4px; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: rgba(255,255,255,0.7);
    transition: all var(--duration) var(--ease);
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-nav .nav-divider { height: 1px; background: rgba(255,255,255,0.1); margin: var(--space-md) 0; }

.admin-main { background: var(--color-bg); }
.admin-topbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-mobile-toggle { display: block; }
.admin-content { padding: var(--space-xl) var(--space-lg); }

/* Admin stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}
.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
}
.stat-card .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}
.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
}

/* Admin tables */
.admin-table-wrap {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    overflow-x: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.admin-table th {
    text-align: left;
    padding: var(--space-md) var(--space-lg);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border-light);
    white-space: nowrap;
}
.admin-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .actions { display: flex; gap: var(--space-sm); }
.admin-table .actions a {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    transition: all var(--duration) var(--ease);
}
.admin-table .actions a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.admin-table .actions .delete:hover { border-color: var(--color-error); color: var(--color-error); }
.product-thumb {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

/* Admin form */
.admin-form {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
    max-width: 800px;
}
.admin-form h2 { margin-bottom: var(--space-xl); }
.image-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--duration) var(--ease);
}
.image-upload-area:hover { border-color: var(--color-accent); }
.existing-images { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-top: var(--space-md); }
.existing-images .img-preview {
    width: 80px; height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-border-light);
}
.existing-images .img-preview img { width: 100%; height: 100%; object-fit: cover; }
.existing-images .remove-img {
    position: absolute;
    top: 2px; right: 2px;
    width: 20px; height: 20px;
    background: var(--color-error);
    color: #fff;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet (640px+) */
@media (min-width: 640px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .cart-item { grid-template-columns: 100px 1fr auto; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .mobile-menu-btn { display: none; }
    .main-nav { display: flex; }

    .products-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }

    .shop-layout { grid-template-columns: 260px 1fr; }
    .filter-toggle-btn { display: none; }

    .product-detail-grid { grid-template-columns: 1fr 1fr; }

    .checkout-grid { grid-template-columns: 1fr 380px; }

    .dashboard-grid { grid-template-columns: 260px 1fr; }

    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }

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

    .admin-layout { grid-template-columns: 260px 1fr; }
    .admin-sidebar { display: block; }
    .admin-mobile-toggle { display: none; }

    .hero-content { max-width: 55%; }
}

/* Large desktop (1280px+) */
@media (min-width: 1280px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); }
    .categories-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-light); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.hidden { display: none !important; }

/* Placeholder image */
.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    color: var(--color-text-muted);
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Smooth animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.5s var(--ease) forwards; }
