/* ============================================
   SavehPlus.ir - Main Stylesheet v3.0
   Complete & Clean - All Styles in One File
   ============================================ */

/* ============================================
   1. CSS Variables
   ============================================ */
:root {
    --pom: #C0392B;
    --pom-dark: #7B241C;
    --pom-light: #FADBD8;
    --pom-ruby: #900C3F;
    --gold: #D4AC0D;
    --gold-light: #F9E79F;
    --gold-dark: #B8860B;
    --white: #FFFFFF;
    --cream: #FFF8F0;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --green: #059669;
    --green-light: #D1FAE5;
    --red: #DC2626;
    --red-light: #FEE2E2;
    --blue: #2563EB;
    --blue-light: #DBEAFE;
    --orange: #EA580C;
    --purple: #7C3AED;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.18);
    --shadow-pom: 0 4px 20px rgba(192,57,43,0.2);
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    --transition-fast: 0.15s ease;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s ease;
}

/* ============================================
   2. Reset & Base
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Vazirmatn', Tahoma, system-ui, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    direction: rtl;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

::selection { background: var(--pom); color: var(--white); }
:focus-visible { outline: 2px solid var(--pom); outline-offset: 2px; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 600px) { .container { padding: 0 20px; } }
@media (min-width: 1024px) { .container { padding: 0 24px; } }

/* ============================================
   3. Buttons
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 18px; border-radius: var(--radius-full);
    font-weight: 600; font-size: 12px; text-decoration: none;
    transition: all var(--transition); cursor: pointer;
    border: 2px solid transparent; font-family: inherit;
    white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-sm { padding: 6px 14px; font-size: 11px; }
.btn-md { padding: 10px 20px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; display: flex; }
.btn-red { background: var(--pom); color: var(--white); border-color: var(--pom); }
.btn-red:hover { background: var(--pom-dark); border-color: var(--pom-dark); }
.btn-outline { background: var(--white); color: var(--pom); border-color: var(--pom); }
.btn-outline:hover { background: var(--pom-light); }
.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.3); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--white); border-color: transparent; font-weight: 700; box-shadow: 0 4px 12px rgba(212,172,13,0.3); }
.btn-gold:hover { box-shadow: 0 8px 24px rgba(212,172,13,0.5); transform: translateY(-2px); }
.btn-green { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-danger { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-gray { background: var(--gray-200); color: var(--gray-600); border-color: var(--gray-200); }
.btn-white { background: var(--white); color: var(--pom); font-weight: 700; box-shadow: var(--shadow-sm); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ============================================
   4. Header
   ============================================ */
.site-header {
    background: linear-gradient(135deg, var(--pom-ruby), var(--pom), var(--pom-dark), #3d0000);
    position: sticky; top: 0; z-index: 1000;
    box-shadow: var(--shadow-xl); transition: all var(--transition);
}
.site-header.scrolled {
    background: linear-gradient(135deg, #70002F, var(--pom-dark), #2d0000);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; min-height: 64px;
}
.header-actions { display: flex; align-items: center; gap: 8px; }

/* Logo */
.logo-img-large {
    width: 160px; height: 55px; border-radius: 14px;
    overflow: hidden; border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3); transition: all var(--transition);
}
.logo-img-large img { width: 100%; height: 100%; object-fit: cover; }
.logo-img-large:hover { border-color: var(--gold); transform: scale(1.03); box-shadow: 0 8px 32px rgba(212,172,13,0.3); }
@media (max-width: 768px) { .logo-img-large { width: 130px; height: 45px; } }

/* Hamburger */
.hamburger-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.2);
    color: var(--white); font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.2); border-color: var(--white); }
.hamburger-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; }
.hamburger-overlay.open { display: block; }
.hamburger-menu {
    position: fixed; top: 0; right: -320px; width: 300px; max-width: 85vw;
    height: 100vh; background: var(--gray-900); color: var(--white);
    z-index: 2001; transition: right var(--transition);
    overflow-y: auto; padding: 24px 20px;
}
.hamburger-menu.open { right: 0; }
.hamburger-close {
    position: absolute; top: 16px; left: 16px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: none;
    color: var(--white); font-size: 18px; cursor: pointer;
}
.hamburger-close:hover { background: rgba(255,255,255,0.2); }
.hamburger-menu h4 {
    color: var(--gold); font-size: 14px; margin: 20px 0 10px;
    padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.hamburger-menu a, .hamburger-menu p {
    display: block; color: rgba(255,255,255,0.7);
    font-size: 13px; padding: 8px 0; text-decoration: none;
}
.hamburger-menu a:hover { color: var(--gold); }
.hamburger-menu .phone-number {
    font-size: 18px; font-weight: 900; color: var(--gold);
    direction: ltr; text-align: right;
}

/* ============================================
   5. Hero
   ============================================ */
.hero {
    position: relative; padding: 60px 0;
    background: linear-gradient(-45deg, var(--pom-ruby), var(--pom), #3d0000, var(--pom-dark));
    background-size: 400% 400%;
    animation: heroGradient 15s ease infinite;
    color: var(--white); overflow: hidden;
}
@keyframes heroGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(212,172,13,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}
.hero .container {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; position: relative; z-index: 1; gap: 32px;
}
.hero-content { max-width: 700px; }
.hero h1 { font-size: 38px; font-weight: 900; line-height: 1.3; margin-bottom: 16px; color: var(--white); }
.hero h1 .gold-text {
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    background-size: 200% auto; -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 3s ease-in-out infinite; font-weight: 900;
}
@keyframes goldShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}
.hero p { font-size: 16px; opacity: 0.9; margin-bottom: 20px; line-height: 1.8; color: rgba(255,255,255,0.85); }

/* Live Counter */
.live-counter {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(212,172,13,0.15); border: 2px solid var(--gold);
    padding: 10px 24px; border-radius: var(--radius-full);
    font-size: 14px; color: var(--gold-light);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,172,13,0.3); }
    50% { box-shadow: 0 0 0 12px rgba(212,172,13,0); }
}
.live-counter .dot {
    width: 10px; height: 10px; background: #00ff88;
    border-radius: 50%; animation: blink 1s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Hero Stats */
.hero-stats { display: flex; gap: 36px; justify-content: center; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 34px; font-weight: 900; color: var(--gold); }
.hero-stat-label { font-size: 12px; opacity: 0.8; }

/* Featured Store */
.featured-store-card {
    background: var(--white); color: var(--gray-800);
    border-radius: var(--radius-2xl); padding: 28px 24px;
    text-align: center; box-shadow: var(--shadow-xl);
    border: 3px solid var(--gold); position: relative;
    max-width: 360px; width: 100%; cursor: pointer;
}
.featured-store-crown {
    position: absolute; top: -35px; left: 50%; transform: translateX(-50%);
    font-size: 48px; animation: crownBounce 2s ease-in-out infinite;
}
@keyframes crownBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}
.featured-store-badge {
    display: inline-block; background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white); padding: 6px 16px; border-radius: var(--radius-full);
    font-size: 12px; font-weight: 700; margin: 8px 0 12px;
}
.featured-store-name { font-size: 20px; font-weight: 900; margin-bottom: 4px; }
.featured-store-address { font-size: 12px; color: var(--gray-500); margin-bottom: 12px; }
.featured-store-stats { display: flex; justify-content: center; gap: 24px; }
.featured-store-rating { margin: 8px 0; }

@media (max-width: 768px) {
    .hero { padding: 40px 0; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }
    .hero-stat-value { font-size: 26px; }
    .hero-stats { gap: 18px; }
    .featured-store-crown { top: -28px; font-size: 38px; }
}

/* ============================================
   6. Search
   ============================================ */
.search-section { margin-top: -24px; position: relative; z-index: 10; margin-bottom: 32px; }
.search-box {
    background: var(--white); border-radius: var(--radius-2xl);
    padding: 8px; display: flex; flex-wrap: wrap; gap: 8px;
    box-shadow: var(--shadow-xl); border: 2px solid transparent;
    transition: all var(--transition);
}
.search-box:focus-within {
    border-color: var(--pom);
    box-shadow: 0 0 0 4px rgba(192,57,43,0.08), var(--shadow-xl);
}
.search-input-wrap { flex: 1; min-width: 150px; display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.search-icon { font-size: 20px; color: var(--gray-400); flex-shrink: 0; }
.search-input {
    flex: 1; border: none; padding: 14px 0; font-size: 15px;
    background: transparent; outline: none; font-family: inherit;
}
.search-input::placeholder { color: var(--gray-400); }
.search-filter-btn {
    padding: 10px 16px; border: 1px solid var(--gray-200);
    border-radius: var(--radius-full); background: var(--white);
    font-size: 13px; color: var(--gray-600); cursor: pointer;
}
.search-submit-btn {
    padding: 14px 28px; background: var(--pom); color: var(--white);
    border: none; border-radius: var(--radius-full);
    font-weight: 700; font-size: 14px; cursor: pointer;
}
.filter-panel {
    display: none; background: var(--white); border-radius: var(--radius-xl);
    padding: 16px; margin-top: 8px; box-shadow: var(--shadow-md);
    flex-wrap: wrap; gap: 12px;
}
.filter-panel.open { display: flex; }
.filter-group { flex: 1; min-width: 140px; }
.filter-group label { display: block; font-size: 11px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.filter-group select, .filter-group input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm); font-size: 13px; font-family: inherit;
}

/* ============================================
   7. Category Circles
   ============================================ */
.category-circles-section { padding: 48px 0; }
.section-title { font-size: 22px; font-weight: 900; text-align: center; margin-bottom: 32px; color: var(--gray-800); }
.category-circles { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.category-circle {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; cursor: pointer; transition: all var(--transition);
}
.category-circle:hover { transform: translateY(-6px); }
.category-circle-icon {
    width: 76px; height: 76px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; box-shadow: var(--shadow-md); transition: all var(--transition);
}
.category-circle:hover .category-circle-icon {
    box-shadow: var(--shadow-lg); transform: scale(1.05);
}
.category-circle-name { font-size: 12px; font-weight: 600; color: var(--gray-700); }

/* Category Colors */
.cat-dairy { background: #E8F5E9; }
.cat-fruits { background: #FFF3E0; }
.cat-meat { background: #FCE4EC; }
.cat-bread { background: #FFF9C4; }
.cat-beverages { background: #E3F2FD; }
.cat-grocery { background: #F3E5F5; }
.cat-snacks { background: #FFEBEE; }
.cat-hygiene { background: #E0F7FA; }
.cat-canned { background: #FFF8E1; }
.cat-spices { background: #FBE9E7; }
.cat-breakfast { background: #F1F8E9; }
.cat-frozen { background: #E3F2FD; }

/* ============================================
   8. Products Grid
   ============================================ */
.products-section { padding: 48px 0; }
.products-section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.products-section-title { font-size: 22px; font-weight: 900; color: var(--gray-800); }
.products-section-link { color: var(--pom); font-weight: 700; font-size: 14px; text-decoration: none; }
.products-section-link:hover { color: var(--pom-dark); }
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* Product Card */
.product-card {
    background: var(--white); border-radius: var(--radius-xl);
    overflow: hidden; box-shadow: var(--shadow-sm);
    cursor: pointer; transition: all var(--transition);
    border: 2px solid transparent; position: relative;
}
.product-card:hover {
    transform: translateY(-8px); box-shadow: var(--shadow-xl);
    border-color: var(--pom-light);
}
.product-card:active { transform: scale(0.97); }

/* Discount Circle */
.discount-circle {
    position: absolute; top: 10px; left: 10px;
    width: 44px; height: 44px; background: var(--red);
    color: var(--white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 900; z-index: 2;
    animation: discPulse 2s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(220,38,38,0.4);
}
@keyframes discPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Special Badge */
.special-badge {
    position: absolute; top: 10px; right: 10px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: var(--white); padding: 3px 10px;
    border-radius: var(--radius-full); font-size: 10px;
    font-weight: 700; z-index: 2;
}

/* Product Image */
.product-img {
    height: 170px; background: var(--gray-50);
    display: flex; align-items: center; justify-content: center;
    font-size: 52px; overflow: hidden;
}
.product-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform var(--transition-slow);
}
.product-card:hover .product-img img { transform: scale(1.08); }

/* Product Info */
.product-info { padding: 14px; }
.product-cat { font-size: 10px; color: var(--gray-400); margin-bottom: 2px; }
.product-name {
    font-weight: 700; font-size: 14px; color: var(--gray-800);
    margin-bottom: 6px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.product-price-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-top: 8px;
}
.product-price { font-size: 18px; font-weight: 900; color: var(--pom); }
.product-price .old-price {
    font-size: 12px; color: var(--gray-400);
    text-decoration: line-through; display: block; font-weight: 500;
}
.product-store { font-size: 11px; color: var(--gray-500); display: flex; align-items: center; gap: 4px; }
.product-store-icon {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--pom-light); display: flex;
    align-items: center; justify-content: center; font-size: 10px;
}

@media (min-width: 600px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .product-img { height: 190px; }
}
@media (min-width: 1024px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
    .product-img { height: 210px; }
}

/* ============================================
   9. Banners
   ============================================ */
.ad-banner {
    cursor: pointer; padding: 0 !important;
    min-height: 180px; border-radius: var(--radius-xl);
    overflow: hidden; background-size: cover;
    background-position: center; transition: all var(--transition);
    margin: 24px 0;
}
.ad-banner:hover { transform: scale(1.02); box-shadow: var(--shadow-xl); }
@media (max-width: 480px) { .ad-banner { min-height: 140px; border-radius: var(--radius-lg); } }

/* ============================================
   10. Stores Grid
   ============================================ */
.stores-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.store-card {
    background: var(--white); border-radius: var(--radius-xl);
    padding: 20px 16px; text-align: center; box-shadow: var(--shadow-sm);
    cursor: pointer; transition: all var(--transition);
    border: 2px solid transparent;
}
.store-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--pom-light); }
.store-card.featured { border-color: var(--gold); }
.store-logo {
    width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
    margin: 0 auto 10px; border: 2px solid var(--gray-200);
}
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.store-products { font-size: 11px; color: var(--gray-500); }
.store-rating { margin: 6px 0; color: var(--gold); font-size: 12px; }
.rate-btn {
    display: inline-block; margin-top: 6px;
    background: #FEF3C7; color: #92400E;
    padding: 4px 12px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 600; cursor: pointer;
    border: none; font-family: inherit;
}
.rate-btn:hover { background: #FDE68A; }
@media (min-width: 600px) { .stores-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .stores-grid { grid-template-columns: repeat(4, 1fr); } }

/* ============================================
   11. Footer
   ============================================ */
.site-footer { background: var(--gray-900); color: var(--white); padding: 48px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { font-size: 15px; color: var(--gold); margin-bottom: 16px; }
.footer-col p, .footer-col a {
    font-size: 13px; color: rgba(255,255,255,0.6);
    line-height: 2.2; display: block; text-decoration: none;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    text-align: center; padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px; color: rgba(255,255,255,0.4);
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

/* ============================================
   12. Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed; bottom: 24px; right: 24px;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--pom); color: var(--white); border: none;
    font-size: 22px; cursor: pointer; box-shadow: var(--shadow-lg);
    z-index: 999; display: none; align-items: center;
    justify-content: center; transition: all var(--transition);
    font-family: inherit;
}
.back-to-top:hover { background: var(--pom-dark); transform: translateY(-4px); }
.back-to-top.visible { display: flex; }

/* ============================================
   13. Rating Modal
   ============================================ */
.rating-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 9999;
    align-items: center; justify-content: center; padding: 20px;
}
.rating-modal-overlay.open { display: flex; }
.rating-modal {
    background: var(--white); border-radius: var(--radius-2xl);
    padding: 28px 24px; max-width: 380px; width: 100%; text-align: center;
}
.rating-stars {
    display: flex; justify-content: center; gap: 8px;
    font-size: 40px; margin: 16px 0; direction: ltr;
}
.rating-stars span { cursor: pointer; color: var(--gray-200); transition: all 0.2s; }
.rating-stars span:hover { color: var(--gold); transform: scale(1.2); }
.rating-stars span.active { color: var(--gold); }

/* ============================================
   14. Utilities
   ============================================ */
.loading-spinner {
    width: 32px; height: 32px; border: 3px solid var(--gray-200);
    border-top-color: var(--pom); border-radius: 50%;
    animation: spin 0.7s linear infinite; margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--gray-500); }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ============================================
   15. Toast Notifications
   ============================================ */
.toast-container {
    position: fixed; bottom: 20px; left: 20px; right: 20px;
    z-index: 9999; display: flex; flex-direction: column;
    gap: 8px; pointer-events: none;
}
.toast {
    padding: 14px 18px; border-radius: var(--radius-md);
    color: var(--white); font-size: 13px; text-align: center;
    pointer-events: auto; animation: slideUp 0.3s ease; cursor: pointer;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================
   16. Vendor Page Header
   ============================================ */
.vendor-header {
    background: linear-gradient(135deg, var(--pom-dark), var(--pom-ruby));
    color: var(--white); padding: 32px 16px; text-align: center;
}
.vendor-header-logo {
    width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
    margin: 0 auto 12px; border: 3px solid var(--gold); background: var(--white);
}
.vendor-header-logo img { width: 100%; height: 100%; object-fit: cover; }
.vendor-header h2 { font-size: 20px; font-weight: 900; }
.vendor-header p { font-size: 13px; opacity: 0.8; margin-top: 4px; }

/* ============================================
   17. Login / Register Forms
   ============================================ */
.auth-container {
    min-height: 100vh; display: flex; align-items: center;
    justify-content: center; padding: 24px 16px;
    background: linear-gradient(160deg, var(--cream), var(--pom-light));
}
.auth-card {
    background: var(--white); border-radius: var(--radius-xl);
    padding: 32px 24px; box-shadow: var(--shadow-xl);
    width: 100%; max-width: 420px; border: 2px solid var(--pom-light);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img {
    width: 56px; height: 56px; border-radius: var(--radius-lg);
    margin: 0 auto 10px; border: 2px solid var(--pom-light); object-fit: cover;
}
.auth-title { font-size: 20px; font-weight: 900; color: var(--pom-dark); text-align: center; margin-bottom: 4px; }
.auth-subtitle { font-size: 12px; color: var(--gray-500); text-align: center; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 12px 14px; border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm); font-size: 14px;
    font-family: inherit; background: var(--white); transition: all var(--transition-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--pom); outline: none;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-input:disabled { background: var(--gray-100); color: var(--gray-400); }

/* ============================================
   18. Dashboard (Vendor & Admin)
   ============================================ */
.topbar {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: var(--white); padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-logo {
    width: 36px; height: 36px; border-radius: 10px;
    border: 2px solid var(--gold); object-fit: cover;
}
.topbar-store { font-size: 14px; font-weight: 700; }
.topbar-plan {
    font-size: 10px; background: rgba(212,172,13,0.2);
    color: var(--gold); padding: 3px 10px; border-radius: 10px;
}
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* Tab Navigation */
.tab-nav {
    display: flex; overflow-x: auto; background: var(--white);
    border-bottom: 1px solid #eee; position: sticky;
    top: 60px; z-index: 99; scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
    flex-shrink: 0; padding: 14px 16px; font-size: 12px;
    font-weight: 600; color: var(--gray-500);
    border: none; background: none; cursor: pointer;
    font-family: inherit; border-bottom: 3px solid transparent;
    white-space: nowrap; transition: all 0.2s;
}
.tab-btn.active { color: var(--pom); border-bottom-color: var(--pom); }

.tab-content { display: none; padding: 14px; }
.tab-content.active { display: block; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-item {
    background: var(--white); padding: 16px 14px; border-radius: var(--radius-md);
    text-align: center; box-shadow: var(--shadow-xs); border-right: 4px solid var(--pom);
}
.stat-item.green { border-right-color: var(--green); }
.stat-item.gold { border-right-color: var(--gold); }
.stat-item.blue { border-right-color: var(--blue); }
.stat-item.red { border-right-color: var(--red); }
.stat-value { font-size: 24px; font-weight: 900; color: var(--pom); }
.stat-label { font-size: 11px; color: var(--gray-500); margin-top: 4px; }

@media (min-width: 600px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }

/* Cards */
.card { background: var(--white); border-radius: var(--radius-md); margin-bottom: 14px; box-shadow: var(--shadow-xs); overflow: hidden; }
.card-header {
    padding: 14px 16px; border-bottom: 1px solid #f0f0f0;
    font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
}
.card-body { padding: 14px 16px; overflow-x: auto; }
.card-body.no-padding { padding: 0; }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 500px; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid #f5f5f5; }
th { background: #fafafa; font-weight: 600; color: var(--gray-600); font-size: 11px; white-space: nowrap; }
tr:hover td { background: #fffbeb; }

/* Alerts */
.alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; line-height: 1.6; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.alert-danger { background: var(--red-light); color: var(--red); border: 1px solid #FECACA; }

/* Upload Box */
.upload-box {
    border: 2px dashed var(--gray-300); border-radius: var(--radius-md);
    padding: 20px; text-align: center; cursor: pointer;
    background: #fafafa; transition: all var(--transition-fast);
}
.upload-box:hover { border-color: var(--pom); background: var(--white); }
.upload-box img { max-width: 100%; max-height: 150px; border-radius: var(--radius-sm); margin-top: 10px; display: none; }
.upload-box .upload-text { color: var(--gray-400); font-size: 13px; }

/* Banner Card */
.banner-card { background: #fafafa; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; }
.banner-card h4 { font-size: 12px; margin-bottom: 8px; color: var(--pom-dark); }

/* Section Divider */
.section-title-divider { border-bottom: 2px solid #f0f0f0; padding-bottom: 8px; margin-bottom: 16px; font-size: 13px; color: var(--gray-600); font-weight: 600; }

/* Subscription Info */
.sub-info { background: #f9fafb; border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.sub-info p { margin-bottom: 8px; font-size: 13px; }
.sub-info .highlight { color: var(--pom); font-weight: 700; }

/* ============================================
   19. Captcha
   ============================================ */
.captcha-box {
    background: #f3f4f6; padding: 12px; border-radius: 10px;
    text-align: center; font-size: 22px; font-weight: 700;
    letter-spacing: 3px; color: var(--pom-dark);
    margin-bottom: 8px; user-select: none;
    font-family: 'Courier New', monospace;
}

/* ============================================
   20. Security Badge
   ============================================ */
.security-badge {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; font-size: 11px; color: var(--gray-400); margin-top: 16px;
}

/* ============================================
   21. Responsive Images
   ============================================ */
img[loading="lazy"] { opacity: 0; transition: opacity 0.3s; }
img[loading="lazy"].loaded { opacity: 1; }

/* ============================================
   22. Print Styles
   ============================================ */
@media print {
    .site-header, .topbar, .search-section, .ad-banner,
    .site-footer, .toast-container, .btn, .back-to-top,
    .hamburger-btn, .hamburger-menu, .hamburger-overlay,
    .rating-modal-overlay { display: none !important; }
    body { background: white; color: black; }
    .product-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}