/* ==========================================
   WALNUT WALA - Premium E-Commerce CSS (v3.0 COMPLETE)
   ========================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================
   CSS Variables / Design Tokens
   ========================================== */
:root {
    --primary: #8B6914;
    --primary-dark: #6B4F0E;
    --primary-light: #C49B2A;
    --secondary: #2C1810;
    --accent: #D4A843;
    --gold: #C8A951;
    --gold-light: #F5E6B8;
    --cream: #FDF8ED;
    --warm-white: #FEFCF7;
    --bg: #FEFCF7;
    --bg-alt: #F7F0E3;
    --text: #2C1810;
    --text-light: #6B5B4F;
    --text-muted: #9B8B7F;
    --border: #E8DCC8;
    --border-light: #F0E8D8;
    --success: #2D7A4F;
    --error: #C0392B;
    --warning: #D4A017;
    --shadow-sm: 0 1px 3px rgba(44,24,16,0.06);
    --shadow: 0 4px 12px rgba(44,24,16,0.08);
    --shadow-lg: 0 12px 40px rgba(44,24,16,0.12);
    --shadow-xl: 0 20px 60px rgba(44,24,16,0.15);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-heading: 'Poppins', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1280px;
}

/* ==========================================
   Reset & Base
   ========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; width: 100%; overflow-x: hidden !important; }
body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden !important;
    width: 100%;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button, input, select, textarea {
    font-family: inherit; font-size: inherit; border: none; outline: none;
}
button { cursor: pointer; }

/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 600; line-height: 1.3; color: var(--secondary); }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

/* ==========================================
   Layout Components
   ========================================== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; width: 100%; box-sizing: border-box; }
.section { padding: 5rem 0; width: 100%; }
.grid { display: grid; gap: 1.5rem; }
.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-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.text-center { text-align: center; }

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem; border-radius: var(--radius-sm); font-weight: 600;
    font-size: 0.9rem; letter-spacing: 0.3px; transition: var(--transition); border: 2px solid transparent;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--primary)); color: #fff; border: none; }
.btn-gold:hover { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

/* ==========================================
   Top Bar
   ========================================== */
.top-bar {
    background: linear-gradient(135deg, var(--secondary), #3D261A);
    color: #fff; font-size: 0.82rem; letter-spacing: 0.3px;
    height: 32px !important; line-height: 32px !important; overflow: hidden !important;
    padding: 0 !important; margin: 0;
}
.marquee-wrapper { overflow: hidden !important; width: 100%; height: 32px !important; line-height: 32px !important; display: block; }
.marquee-text {
    display: inline-block; white-space: nowrap !important; height: 32px !important; line-height: 32px !important;
    animation: marquee-scroll 20s linear infinite;
    will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.marquee-text:hover { animation-play-state: paused; }
@keyframes marquee-scroll { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-50%, 0, 0); } }

/* ==========================================
   Header & Navigation
   ========================================== */
.header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(254,252,247,0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }
.nav { padding: 0.8rem 0; width: 100%; }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: flex; align-items: center; gap: 0.6rem; }
.logo-icon { font-size: 1.8rem; }
.logo-text { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--secondary); }
.logo-text span { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 1.2rem; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text-light); position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active::after { content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px; background: var(--primary); border-radius: 2px; }
.nav-actions { display: flex; align-items: center; gap: 0.8rem; }
.nav-action-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text); background: var(--bg-alt); position: relative; transition: var(--transition); }
.nav-action-btn:hover { background: var(--primary); color: #fff; }
.cart-badge { position: absolute; top: -2px; right: -2px; background: var(--error); color: #fff; font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.search-bar { display: flex; align-items: center; background: var(--bg-alt); border-radius: var(--radius-xl); overflow: hidden; }
.search-bar input { padding: 0.55rem 1rem; background: transparent; width: 140px; font-size: 0.85rem; }
.search-bar button { padding: 0.55rem 0.8rem; background: transparent; color: var(--text-muted); }
.hamburger { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg, var(--warm-white) 0%, var(--cream) 50%, var(--gold-light) 100%);
    position: relative; overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-content { position: relative; z-index: 2; }
.section-label {
    display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--primary);
    margin-bottom: 1rem; letter-spacing: 1px;
}
.hero h1 { margin-bottom: 1.5rem; }
.hero h1 span { color: var(--primary); font-style: italic; }
.hero p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; line-height: 1.8; max-width: 520px; }
.hero-actions { display: flex; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2.5rem; }
.hero-stat .number { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.hero-stat .label { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }
.hero-image { position: relative; display: flex; justify-content: center; }
.hero-image-main { width: 380px; height: 380px; border-radius: 50%; overflow: hidden; border: 6px solid rgba(196,155,42,0.2); box-shadow: var(--shadow-xl); }
.hero-image-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-floating-badge {
    position: absolute; background: #fff; padding: 0.8rem 1.2rem; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem;
    font-weight: 600; animation: float 3s ease-in-out infinite;
}
.hero-floating-badge.top-right { top: 10%; right: 5%; }
.hero-floating-badge.bottom-left { bottom: 15%; left: 0; }
.badge-icon { font-size: 1.3rem; }
.badge-text { white-space: nowrap; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ==========================================
   Features Bar
   ========================================== */
.features-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
    background: #fff; border-radius: var(--radius-lg); padding: 2rem;
    box-shadow: var(--shadow); margin-top: -2rem; position: relative; z-index: 10;
    border: 1px solid var(--border-light);
}
.feature-item { text-align: center; padding: 1rem 0.5rem; }
.feature-icon { font-size: 2rem; margin-bottom: 0.8rem; }
.feature-item h4 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.feature-item p { font-size: 0.8rem; color: var(--text-muted); }

/* ==========================================
   Section Headers
   ========================================== */
.section-title { margin-bottom: 0.8rem; }
.section-subtitle { color: var(--text-muted); font-size: 1rem; max-width: 500px; margin: 0 auto; }

/* ==========================================
   Category Cards
   ========================================== */
.category-card {
    background: #fff; border-radius: var(--radius-lg); padding: 2rem 1.5rem;
    text-align: center; border: 1px solid var(--border-light); transition: var(--transition);
    display: block;
}
.category-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.category-card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.category-card h3 { margin-bottom: 0.3rem; }
.category-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ==========================================
   Product Detail
   ========================================== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 5rem; }
.product-gallery { position: relative; }

.product-slider-container {
    width: 100%;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #f9fafb;
    border: 1px solid var(--border-light);
}

.product-main-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.product-main-slider::-webkit-scrollbar { display: none; /* Chrome/Safari */ }

.slider-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4/3;
    background: #fff;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-thumbnails { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: thin; }
.product-thumbnails::-webkit-scrollbar { height: 4px; }
.thumbnail {
    width: 80px; height: 80px; border-radius: 8px; overflow: hidden;
    cursor: pointer; border: 2px solid transparent; transition: var(--transition);
    flex-shrink: 0;
}
.thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.thumbnail.active { border-color: var(--primary); }

/* ==========================================
   Product Cards
   ========================================== */
.product-card {
    background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border-light);
    overflow: hidden; transition: var(--transition);
    display: flex; flex-direction: column; height: 100%;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product-card-image { aspect-ratio: 1/1; overflow: hidden; position: relative; }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-card-image img { transform: scale(1.05); }
.product-badge {
    position: absolute; top: 12px; left: 12px; background: var(--primary);
    color: #fff; padding: 4px 10px; border-radius: 20px; font-size: 0.72rem;
    font-weight: 700; letter-spacing: 0.5px; z-index: 2;
}
.product-badge.sale { background: var(--error); }
.product-card-actions {
    position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 0.4rem;
    opacity: 0; transform: translateX(10px); transition: var(--transition); z-index: 2;
}
.product-card:hover .product-card-actions { opacity: 1; transform: translateX(0); }
.product-card-action {
    width: 36px; height: 36px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm); color: var(--text);
    transition: var(--transition); border: none; cursor: pointer; font-size: 0.85rem;
}
.product-card-action:hover { background: var(--primary); color: #fff; }

.product-card-body { padding: 1.2rem; display: flex; flex-direction: column; flex-grow: 1; }
.product-card-category { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.3rem; }
.product-card-rating { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.product-card-rating .stars { color: #fbbf24; font-size: 0.85rem; display: flex; gap: 0.1rem; }
.product-card-rating .count { font-size: 0.75rem; color: var(--text-muted); }
.product-card-title { font-size: 1rem; margin-bottom: 0.6rem; line-height: 1.4; }
.product-card-title a:hover { color: var(--primary); }
.product-card-price { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.price-current { font-weight: 700; color: var(--primary); font-size: 1.15rem; }
.price-original { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; }
.price-discount { font-size: 0.75rem; color: var(--error); font-weight: 700; background: rgba(192,57,43,0.08); padding: 2px 8px; border-radius: 4px; }
.product-card-footer { display: flex; gap: 0.5rem; align-items: center; margin-top: auto; padding-top: 1rem; }
.product-card-footer .btn { flex: 1; white-space: nowrap; padding: 0.6rem 0.4rem; font-size: 0.8rem; }

@media (max-width: 576px) {
    .product-card-footer { flex-direction: column; }
    .product-card-footer .btn { width: 100%; flex: none; }
}

.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* ==========================================
   Page Header (Shop, Cart, About, etc.)
   ========================================== */
.page-header {
    background: linear-gradient(135deg, var(--cream), var(--gold-light));
    padding: 2.5rem 0; border-bottom: 1px solid var(--border-light);
}
.page-header h1 { margin-bottom: 0.5rem; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .separator { color: var(--border); }

/* ==========================================
   Shop Layout & Filters
   ========================================== */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; }
.shop-sidebar {
    background: #fff; border-radius: var(--radius-lg); padding: 1.5rem;
    border: 1px solid var(--border-light); height: fit-content; position: sticky; top: 100px;
}
.filter-group { margin-bottom: 1.5rem; }
.filter-group h4 { font-size: 0.95rem; margin-bottom: 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-light); }
.filter-option {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0;
    font-size: 0.88rem; color: var(--text-light); cursor: pointer;
}
.filter-option input[type="radio"],
.filter-option input[type="checkbox"] { accent-color: var(--primary); }
.price-range { display: flex; align-items: center; gap: 0.5rem; }
.price-range input {
    width: 100%; padding: 0.5rem 0.8rem; border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); font-size: 0.85rem; background: var(--bg);
}
.shop-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-light);
}
.result-count { font-size: 0.88rem; color: var(--text-muted); }
.shop-sort select {
    padding: 0.5rem 1rem; border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); font-size: 0.85rem; background: #fff; cursor: pointer;
}

/* ==========================================
   Product Detail
   ========================================== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.product-gallery { position: sticky; top: 100px; }
.product-main-image {
    border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-light);
    background: #fff;
}
.product-main-image img { width: 100%; height: auto; }
.product-info { padding: 1rem 0; }
.product-category { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 0.5rem; }
.product-price-block { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; padding: 1rem 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.product-price-block .price-current { font-size: 1.8rem; }
.product-description { margin: 1.5rem 0; color: var(--text-light); line-height: 1.8; }
.product-meta { margin: 1.5rem 0; }
.product-meta-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; }
.product-meta-item .label { color: var(--text-muted); font-weight: 600; min-width: 100px; }
.stock-badge { padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.stock-badge.in-stock { background: rgba(45,122,79,0.1); color: var(--success); }
.stock-badge.out-of-stock { background: rgba(192,57,43,0.1); color: var(--error); }
.quantity-selector { display: flex; align-items: center; gap: 0; margin: 1.5rem 0; }
.quantity-btn {
    width: 44px; height: 44px; border: 1px solid var(--border-light); background: var(--bg-alt);
    border-radius: var(--radius-sm); font-size: 1.2rem; cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.quantity-btn:hover { background: var(--primary); color: #fff; }
.quantity-input {
    width: 60px; height: 44px; text-align: center; border: 1px solid var(--border-light);
    font-weight: 600; font-size: 1rem; background: #fff;
}
.product-actions { display: flex; gap: 1rem; margin-top: 1rem; }

/* ==========================================
   Cart
   ========================================== */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
.cart-item {
    display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem;
    background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius);
    margin-bottom: 1rem; transition: var(--transition);
}
.cart-item:hover { box-shadow: var(--shadow-sm); }
.cart-item-image { width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.cart-item-info p { font-size: 0.85rem; color: var(--text-muted); }
.cart-item-price { font-weight: 700; color: var(--primary); font-size: 1.05rem; white-space: nowrap; }
.cart-item-remove {
    width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(192,57,43,0.08);
    color: var(--error); cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.cart-item-remove:hover { background: var(--error); color: #fff; }
.cart-summary {
    background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    padding: 1.5rem; position: sticky; top: 100px;
}
.cart-summary h3 { margin-bottom: 1.2rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border-light); }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; font-size: 0.9rem; color: var(--text-light); }
.summary-row.total { border-top: 2px solid var(--border); margin-top: 0.5rem; padding-top: 1rem; font-size: 1.1rem; font-weight: 700; color: var(--text); }

/* ==========================================
   Checkout
   ========================================== */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 2rem; align-items: start; }
.checkout-section {
    background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    padding: 2rem; margin-bottom: 1.5rem;
}
.checkout-section h3 { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-light); }
.payment-options { display: flex; flex-direction: column; gap: 0.8rem; }
.payment-option {
    display: flex; align-items: flex-start; gap: 0.8rem; padding: 1rem;
    border: 2px solid var(--border-light); border-radius: var(--radius); cursor: pointer;
    transition: var(--transition);
}
.payment-option.selected { border-color: var(--primary); background: rgba(139,105,20,0.03); }
.payment-option input[type="radio"] { accent-color: var(--primary); margin-top: 3px; }

/* ==========================================
   Order Success
   ========================================== */
.order-success { text-align: center; padding: 3rem 0; }
.success-icon { font-size: 4rem; margin-bottom: 1.5rem; }

/* ==========================================
   Auth Pages
   ========================================== */
.auth-page {
    display: flex; justify-content: center; align-items: center; min-height: 70vh;
    padding: 3rem 1.5rem; background: linear-gradient(135deg, var(--cream), var(--gold-light));
}
.auth-card {
    background: #fff; border-radius: var(--radius-lg); padding: 2.5rem;
    width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
}
.auth-card h2 { text-align: center; margin-bottom: 0.5rem; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.88rem; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ==========================================
   Forms
   ========================================== */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-light); margin-bottom: 0.4rem; }
.form-control {
    width: 100%; padding: 0.75rem 1rem; border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm); font-size: 0.9rem; background: var(--bg);
    transition: var(--transition);
}
.form-control:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(139,105,20,0.08); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ==========================================
   Profiles
   ========================================== */
.profile-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; }
.profile-sidebar {
    background: #fff; border-radius: var(--radius-lg); padding: 1.5rem;
    border: 1px solid var(--border-light); height: fit-content;
}
.profile-user { text-align: center; padding-bottom: 1.2rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-light); }
.profile-avatar {
    width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--gold));
    color: #fff; font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.8rem;
}
.profile-nav a {
    display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 1rem;
    border-radius: var(--radius-sm); color: var(--text-light); font-size: 0.9rem; transition: var(--transition);
}
.profile-nav a:hover { background: var(--bg-alt); color: var(--text); }
.profile-nav a.active { background: var(--bg-alt); color: var(--primary); font-weight: 600; }
.profile-nav a i { width: 18px; text-align: center; }
.profile-content {
    background: #fff; border-radius: var(--radius-lg); padding: 2rem;
    border: 1px solid var(--border-light);
}

/* ==========================================
   Data Tables
   ========================================== */
.table-responsive { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--bg-alt); padding: 1rem; text-align: left; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 1rem; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; }
.data-table tr:hover { background: rgba(247,240,227,0.3); }

/* ==========================================
   Status Badges
   ========================================== */
.status-badge {
    display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem;
    font-weight: 600; text-transform: capitalize;
}
.status-pending { background: rgba(212,160,23,0.12); color: var(--warning); }
.status-confirmed, .status-processing { background: rgba(139,105,20,0.12); color: var(--primary); }
.status-shipped { background: rgba(45,122,79,0.1); color: #1a6b3c; }
.status-delivered { background: rgba(45,122,79,0.15); color: var(--success); }
.status-cancelled { background: rgba(192,57,43,0.1); color: var(--error); }

/* ==========================================
   Empty States
   ========================================== */
.empty-state {
    text-align: center; padding: 4rem 2rem; background: #fff;
    border-radius: var(--radius-lg); border: 2px dashed var(--border-light);
}
.empty-state .icon { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ==========================================
   Alerts / Flash Messages
   ========================================== */
.alert {
    padding: 1rem 1.5rem; border-radius: var(--radius-sm); font-size: 0.9rem;
    display: flex; align-items: center; gap: 0.6rem;
}
.alert-success { background: rgba(45,122,79,0.1); color: var(--success); border: 1px solid rgba(45,122,79,0.2); }
.alert-error { background: rgba(192,57,43,0.08); color: var(--error); border: 1px solid rgba(192,57,43,0.15); }

/* ==========================================
   Toast Notifications
   ========================================== */
.toast {
    position: fixed; bottom: 30px; right: 30px; padding: 1rem 1.5rem;
    border-radius: var(--radius); font-size: 0.9rem; font-weight: 500;
    z-index: 10000; box-shadow: var(--shadow-lg); transition: all 0.3s ease;
    animation: slideUp 0.3s ease;
}
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--error); color: #fff; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ==========================================
   Founder Section
   ========================================== */
.founder-section { background: var(--secondary); color: #fff; }
.founder-section .container { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: center; }
.founder-image { border-radius: 50%; overflow: hidden; aspect-ratio: 1/1; border: 4px solid var(--gold); box-shadow: 0 15px 35px rgba(0,0,0,0.3); }
.founder-image img { width: 100%; height: 100%; object-fit: cover; }
.founder-content h2 { color: #fff; margin-bottom: 1.5rem; }
.founder-content p { color: rgba(255,255,255,0.75); line-height: 1.8; margin-bottom: 1rem; }
.founder-name { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; color: var(--gold); margin-top: 1.5rem; }
.founder-role { font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* ==========================================
   About Page
   ========================================== */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin-bottom: 4rem; }
.about-image { border-radius: var(--radius-lg); overflow: hidden; }
.about-image img { width: 100%; height: 400px; object-fit: cover; }
.about-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.value-card {
    background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    padding: 2rem; text-align: center; transition: var(--transition);
}
.value-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.value-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.value-card h3 { margin-bottom: 0.5rem; }
.value-card p { font-size: 0.88rem; color: var(--text-muted); }

/* ==========================================
   Contact Page
   ========================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-info-card {
    display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}
.contact-icon {
    width: 40px; height: 40px; border-radius: 50%; background: var(--bg-alt);
    display: flex; align-items: center; justify-content: center; color: var(--primary);
    flex-shrink: 0;
}

/* ==========================================
   FAQ Page
   ========================================== */
.faq-item {
    background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius);
    margin-bottom: 0.8rem; overflow: hidden; transition: var(--transition);
}
.faq-question {
    padding: 1.2rem 1.5rem; font-weight: 600; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    transition: var(--transition);
}
.faq-question:hover { color: var(--primary); }
.faq-question i { transition: transform 0.3s ease; font-size: 0.8rem; color: var(--text-muted); }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem; font-size: 0.9rem; color: var(--text-light); line-height: 1.8;
}
.faq-item.active .faq-answer { max-height: 300px; padding: 0 1.5rem 1.2rem; }

/* ==========================================
   Blog
   ========================================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.blog-card {
    background: #fff; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border-light); transition: var(--transition);
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.blog-card-image { height: 200px; overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.05); }
.blog-card-body { padding: 1.2rem; display: flex; flex-direction: column; height: 100%; }
.blog-card-date { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.blog-card-title { 
    font-size: 1.05rem; 
    margin-bottom: 0rem; 
    line-height: 1.4;
    height: 2.8em; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text-dark);
    font-weight: 600;
}

/* ==========================================
   Gallery
   ========================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-item {
    border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1;
    cursor: pointer; transition: var(--transition);
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--secondary); color: rgba(255,255,255,0.8); padding: 4rem 0 0;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.footer-desc { font-size: 0.88rem; margin: 1rem 0 1.5rem; color: rgba(255,255,255,0.6); line-height: 1.7; }
.footer h4 { color: #fff; margin-bottom: 1.2rem; font-size: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { font-size: 0.88rem; color: rgba(255,255,255,0.6); transition: var(--transition); }
.footer-links a:hover { color: var(--gold); padding-left: 5px; }
.footer-contact p { font-size: 0.85rem; color: rgba(255,255,255,0.6); display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.6rem; }
.footer-contact i { color: var(--gold); margin-top: 3px; }
.social-links { display: flex; gap: 0.8rem; }
.social-link {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6);
    transition: var(--transition); font-size: 0.9rem;
}
.social-link:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08); padding: 1.5rem 0;
    font-size: 0.82rem; color: rgba(255,255,255,0.4);
}

/* ==========================================
   Admin Panel
   ========================================== */
.admin-layout { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.admin-sidebar {
    background: var(--secondary); padding: 1.5rem 1rem; position: sticky; top: 0; height: 100vh;
    overflow-y: auto; display: flex; flex-direction: column;
}
.admin-sidebar .logo { display: flex; align-items: center; justify-content: center; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); text-decoration: none; }
.admin-sidebar .logo-icon { flex-shrink: 0; line-height: 0; }
.admin-sidebar .logo-icon img { height: 50px; width: auto; border-radius: 6px; display: block; }
.admin-sidebar .logo-text { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; white-space: nowrap; color: #fff; }
.admin-nav { display: flex; flex-direction: column; gap: 0.3rem; }
.admin-nav a {
    display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 1rem;
    color: rgba(255,255,255,0.6); border-radius: var(--radius-sm); font-size: 0.9rem;
    transition: var(--transition); text-decoration: none;
}
.admin-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav a.active { background: var(--primary); color: #fff; font-weight: 600; }
.admin-nav a i { width: 20px; text-align: center; font-size: 0.85rem; }
.admin-main { padding: 2rem; background: var(--bg); overflow-y: auto; }
.admin-header { margin-bottom: 2rem; }
.admin-header h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }

/* Stat Cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card {
    background: #fff; border-radius: var(--radius-lg); padding: 1.5rem;
    border: 1px solid var(--border-light); transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card-icon {
    width: 48px; height: 48px; border-radius: var(--radius); display: flex;
    align-items: center; justify-content: center; font-size: 1.2rem; color: #fff; margin-bottom: 1rem;
}
.stat-card-icon.blue { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.stat-card-icon.green { background: linear-gradient(135deg, #10B981, #059669); }
.stat-card-icon.gold { background: linear-gradient(135deg, var(--gold), var(--primary)); }
.stat-card-icon.purple { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--text); font-family: var(--font-heading); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Admin Tables & Forms */
.admin-main .data-table { background: #fff; border-radius: var(--radius-lg); }
.admin-main .btn { margin-right: 0.3rem; }

/* Admin Responsive */
@media (max-width: 1024px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: fixed; left: -290px; top: 0; width: 280px; z-index: 1000;
        transition: left 0.3s ease;
    }
    .admin-sidebar.active { left: 0; }
    .stat-cards { grid-template-columns: 1fr; }
}

/* ==========================================
   Animations
   ========================================== */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ==========================================
   RESPONSIVE FIXES (v3.0)
   ========================================== */

/* Tablet & Medium Screens */
@media (max-width: 1024px) {
    .profile-layout { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero p { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-image { margin-top: 2rem; }
    .hero-image-main { width: 300px; height: 300px; }
    .shop-layout { grid-template-columns: 220px 1fr; }
    .product-detail { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .cart-layout { grid-template-columns: 1fr 320px; }
    .checkout-layout { grid-template-columns: 1fr 350px; }
    .founder-section .container { grid-template-columns: 250px 1fr; gap: 2rem; }
    .about-hero { grid-template-columns: 1fr; }
    .about-values { grid-template-columns: repeat(3, 1fr); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .features-bar { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .section { padding: 2.5rem 0 !important; }
    .container { padding: 0 1rem; }

    /* Navigation */
    .nav-links { display: none; }
    .nav-links.active { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 2rem; box-shadow: var(--shadow-lg); z-index: 999; }
    .hamburger { display: flex; }
    .search-bar { display: none; }

    /* Logo Mobile */
    .logo { gap: 0.5rem !important; }
    .logo-icon img { height: 45px !important; width: auto !important; border-radius: 6px !important; }
    .logo-text { font-size: 1.3rem !important; }

    /* Grids */
    .grid-2, .grid-3 { grid-template-columns: 1fr !important; gap: 1.5rem; }
    .grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

    /* Hero */
    .hero { padding: 3rem 0; }
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero p { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; gap: 1.5rem; }
    .hero-image-main { width: 250px; height: 250px; }
    .hero-floating-badge { display: none; }

    /* Features */
    .features-bar { grid-template-columns: repeat(2, 1fr); padding: 1.5rem; gap: 1rem; margin-top: -1rem; }

    /* Shop */
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { position: static; }
    .shop-toolbar { flex-direction: column; align-items: flex-start; gap: 0.8rem; }

    /* Product Detail */
    .product-detail { grid-template-columns: 1fr; gap: 2rem; }
    .product-gallery { position: static; }
    .product-price-block .price-current { font-size: 1.5rem; }

    /* Cart */
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .cart-item { flex-wrap: wrap; }
    .cart-item-image { width: 60px; height: 60px; }

    /* Checkout */
    .checkout-layout { grid-template-columns: 1fr; }

    /* Profile - Horizontal Swipe Menu */
    .profile-sidebar { overflow: hidden !important; max-width: 100% !important; }
    .profile-nav { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; padding: 10px !important; gap: 10px !important; -webkit-overflow-scrolling: touch !important; justify-content: flex-start !important; scrollbar-width: none; max-width: 100% !important; }
    .profile-nav::-webkit-scrollbar { display: none; }
    .profile-nav a { flex: 0 0 auto !important; border: 1px solid var(--border-light) !important; border-radius: var(--radius-xl) !important; white-space: nowrap !important; padding: 8px 18px !important; font-size: 0.8rem !important; }
    .profile-nav a.active { background: var(--primary) !important; color: #fff !important; }

    /* Order Table Card Transformation */
    .table-responsive { overflow: hidden !important; max-width: 100% !important; }
    .profile-content { overflow: hidden !important; max-width: 100% !important; }
    .data-table thead { display: none !important; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
    .data-table tr { margin-bottom: 1.5rem !important; background: #fff !important; border: 1px solid var(--border-light) !important; border-radius: var(--radius) !important; padding: 12px !important; box-shadow: var(--shadow-sm) !important; overflow: hidden !important; }
    .data-table td { display: flex !important; justify-content: space-between !important; align-items: center !important; text-align: right !important; border-bottom: 1px solid var(--border-light) !important; padding: 10px 0 !important; border-top: none !important; }
    .data-table td:last-child { border-bottom: none !important; }
    .data-table td::before { content: attr(data-label); font-weight: 700; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; text-align: left; flex-shrink: 0; margin-right: 1rem; }

    /* Form & Profile Polish */
    .profile-content { padding: 1.5rem !important; margin-top: 0 !important; border: none !important; box-shadow: none !important; }
    .profile-user { padding-bottom: 1rem !important; }
    .form-group { margin-bottom: 1.5rem; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr !important; }
    .footer-logo .logo-text { text-align: center; width: 100%; margin-bottom: 1rem; }
    .footer-logo { display: block; text-align: left; }
    .footer-desc { text-align: left; }
    .social-links { justify-content: flex-start; }

    /* About, Contact, Blog */
    .about-hero { grid-template-columns: 1fr; }
    .about-values { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .founder-section .container { grid-template-columns: 1fr; text-align: center; }
    .founder-image { max-width: 220px; margin: 0 auto 2rem; border-width: 3px; aspect-ratio: 1/1; }

    /* Page Header */
    .page-header { padding: 1.5rem 0; }
    .page-header h1 { font-size: 1.5rem; }

    /* Auth */
    .auth-page { padding: 2rem 1rem; min-height: auto; }
    .auth-card { padding: 2rem 1.5rem; }

    /* Buttons */
    .btn-lg { padding: 0.85rem 1.5rem; font-size: 0.9rem; }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr !important; }
    .products-grid { grid-template-columns: 1fr; }
    .features-bar { grid-template-columns: 1fr; }
    .hero-stats { flex-direction: column; gap: 1rem; }
    .hero-image-main { width: 200px; height: 200px; }
    .gallery-grid { grid-template-columns: 1fr; }
}

/* Critical Overflow Fix */
html, body { overflow-x: hidden !important; width: 100% !important; margin: 0; padding: 0; position: relative; }
/* ==========================================
   Product Gallery Thumbnails
   ========================================== */
.product-thumbnails {
    display: flex; gap: 0.5rem; margin-top: 1rem; overflow-x: auto; padding-bottom: 0.5rem;
}
.product-thumbnails .thumbnail {
    width: 80px; height: 80px; flex-shrink: 0; border: 2px solid transparent; border-radius: var(--radius-sm);
    overflow: hidden; cursor: pointer; transition: var(--transition); opacity: 0.7;
}
.product-thumbnails .thumbnail.active, .product-thumbnails .thumbnail:hover {
    opacity: 1; border-color: var(--primary);
}
.product-thumbnails .thumbnail img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 4px;
}


