/* ============================================
   VegShop — Bilingual (EN/UR) UI
   Supports LTR (English) & RTL (Urdu)
   Inspired by barakatfresh.ae
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #27ae60;
    --primary-dark: #1e8449;
    --primary-light: #a9dfbf;
    --accent: #e74c3c;
    --accent-light: #f1948a;
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e8ecef;
    --shadow: 0 2px 12px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --font-urdu: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', 'Jameel Noori Nastaleeq', Tahoma, sans-serif;
    --font-english: 'Inter', 'Noto Sans Arabic', system-ui, sans-serif;
    --transition: .25s ease;
    --container: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
body.rtl { direction: rtl; font-family: var(--font-urdu); }
body.ltr { direction: ltr; font-family: var(--font-english); }
body.rtl { line-height: 2.2; } /* Nastaleeq needs more line height */

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Language Toggle ---------- */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    background: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: all .3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(39,174,96,.15);
}
.lang-toggle:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39,174,96,.3);
}
.lang-toggle .lang-label { pointer-events: none; }

/* ---------- Top Bar ---------- */
.top-bar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
    letter-spacing: .3px;
    box-shadow: 0 2px 8px rgba(39,174,96,.3);
    position: relative;
    overflow: hidden;
}
.top-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
    animation: shimmer 3s infinite;
}
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ---------- Header ---------- */
.site-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    transition: all .3s ease;
}
.site-header.scrolled {
    box-shadow: 0 6px 30px rgba(0,0,0,.12);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 16px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    transition: transform .3s ease;
}
.logo:hover {
    transform: scale(1.02);
}
.logo-icon { font-size: 32px; }
.logo-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(39,174,96,.2);
    transition: all .4s ease;
    animation: logoFloat 3s ease-in-out infinite;
}
.logo:hover .logo-img {
    box-shadow: 0 8px 25px rgba(39,174,96,.4);
    transform: translateY(-2px);
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.logo-text {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(39,174,96,.1);
    animation: textGlow 2s ease-in-out infinite alternate;
}
@keyframes textGlow {
    0% { filter: drop-shadow(0 0 2px rgba(39,174,96,.3)); }
    100% { filter: drop-shadow(0 0 8px rgba(39,174,96,.5)); }
}

/* Search */
.header-search { flex: 1; max-width: 700px; }
.search-form { display: flex; position: relative; }
.search-input {
    width: 100%;
    padding: 12px 48px 12px 18px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    transition: all .3s ease;
    outline: none;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
body.rtl .search-input { direction: rtl; padding: 12px 18px 12px 48px; }
body.ltr .search-input { direction: ltr; padding: 12px 48px 12px 18px; }
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(39,174,96,.15);
}
.search-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all .3s ease;
    box-shadow: 0 2px 8px rgba(39,174,96,.3);
}
body.rtl .search-btn { left: 4px; }
body.ltr .search-btn { right: 4px; }
.search-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(39,174,96,.4);
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    transition: all .3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(39,174,96,.3);
}
.cart-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39,174,96,.4);
}
.cart-icon { font-size: 18px; }
.cart-badge {
    position: absolute;
    top: -6px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(231,76,60,.4);
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
body.rtl .cart-badge { left: -6px; }
body.ltr .cart-badge { right: -6px; }

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    font-size: 26px;
    color: var(--text);
}

/* ---------- Category Nav ---------- */
.cat-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.cat-nav-list {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.cat-nav-list::-webkit-scrollbar { display: none; }
.cat-nav-list li a {
    display: block;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all var(--transition);
}
.cat-nav-list li a:hover,
.cat-nav-list li a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(39,174,96,.04);
}

/* ---------- Mobile Menu ---------- */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 200;
}
.mobile-overlay.active { display: block; }
.mobile-menu {
    position: fixed;
    top: 0;
    width: 280px;
    height: 100%;
    background: var(--bg-card);
    z-index: 201;
    transition: transform .3s ease;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
body.rtl .mobile-menu { right: 0; transform: translateX(100%); }
body.ltr .mobile-menu { left: 0; transform: translateX(-100%); }
body.rtl .mobile-menu.active, body.ltr .mobile-menu.active { transform: translateX(0); }
.mobile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
}
.mobile-menu-header .logo-icon {
    font-size: 36px;
}
.mobile-menu-header .logo-text {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mobile-close {
    margin-inline-start: auto;
    font-size: 22px;
    color: var(--text);
}
.mobile-nav-list li a {
    display: block;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.mobile-nav-list li a:hover { background: rgba(39,174,96,.06); }

/* ---------- Hero Section ---------- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '🥬🍅🥕🍋🥒🍆🌶️🥦';
    position: absolute;
    font-size: 60px;
    opacity: .1;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    letter-spacing: 20px;
}
.hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
}
.hero p {
    font-size: 18px;
    opacity: .9;
    max-width: 600px;
    margin: 0 auto 24px;
    position: relative;
}
.hero-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #fff;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    transition: all var(--transition);
    position: relative;
}
.hero-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

/* ---------- Banner Carousel ---------- */
.banner-carousel {
    position: relative;
    max-width: var(--container);
    margin: 24px auto;
    padding: 0 16px;
    overflow: hidden;
}
.banner-track {
    position: relative;
    min-height: 280px;
}
.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility .5s ease;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.banner-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}
.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #fff8ee 0%, #fff 50%, #fceaea 100%);
    border-radius: var(--radius-lg);
    min-height: 260px;
    padding: 20px 40px;
    gap: 20px;
    box-shadow: var(--shadow);
}
.banner-text {
    flex: 1;
    max-width: 55%;
}
.banner-headline {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.banner-subtitle {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 12px;
    font-weight: 500;
}
.banner-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}
.banner-price .banner-price-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
}
.banner-btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    transition: all var(--transition);
    text-decoration: none;
}
.banner-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231,76,60,.3);
}
.banner-visual {
    flex-shrink: 0;
    width: 420px;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.banner-img {
    width: 100%;
    max-width: 420px;
    height: auto;
    max-height: 340px;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background var(--transition);
}
.banner-arrow:hover { background: rgba(0,0,0,.8); }
.banner-arrow-prev { left: 28px; }
.banner-arrow-next { right: 28px; }
body.rtl .banner-arrow-prev { left: auto; right: 28px; }
body.rtl .banner-arrow-next { right: auto; left: 28px; }
.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all var(--transition);
}
.banner-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* Banner responsive */
@media (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        min-height: auto;
    }
    .banner-text { max-width: 100%; }
    .banner-headline { font-size: 24px; }
    .banner-visual { width: 260px; max-width: 100%; }
    .banner-img { max-width: 260px; max-height: 260px; }
    .banner-arrow-prev { left: 8px; }
    .banner-arrow-next { right: 8px; }
    body.rtl .banner-arrow-prev { left: auto; right: 8px; }
    body.rtl .banner-arrow-next { right: auto; left: 8px; }
}

/* ---------- Deal Strip Carousel ---------- */
.deal-strip-carousel {
    position: relative;
    max-width: var(--container);
    margin: 20px auto;
    padding: 0 16px;
    overflow: hidden;
}
.deal-track {
    position: relative;
    min-height: 80px;
}
.deal-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease, visibility .4s ease;
}
.deal-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}
.deal-content {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6f0 100%);
    border: 2px solid var(--accent-light);
    border-radius: var(--radius);
    padding: 16px 24px;
    box-shadow: var(--shadow);
}
.deal-icon {
    font-size: 36px;
    flex-shrink: 0;
}
.deal-info {
    flex: 1;
}
.deal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2px;
}
.deal-subtitle {
    font-size: 14px;
    color: var(--text);
    margin: 0;
}
.deal-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.deal-price-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
.deal-price-label {
    font-size: 12px;
    color: var(--text-light);
}
.deal-btn {
    padding: 8px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.deal-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}
.deal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background var(--transition);
}
.deal-arrow:hover { background: rgba(0,0,0,.8); }
.deal-arrow-prev { left: 20px; }
.deal-arrow-next { right: 20px; }
body.rtl .deal-arrow-prev { left: auto; right: 20px; }
body.rtl .deal-arrow-next { right: auto; left: 20px; }

@media (max-width: 768px) {
    .deal-content {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 12px;
        padding: 14px 16px;
    }
    .deal-title { font-size: 16px; }
    .deal-arrow-prev { left: 8px; }
    .deal-arrow-next { right: 8px; }
    body.rtl .deal-arrow-prev { left: auto; right: 8px; }
    body.rtl .deal-arrow-next { right: auto; left: 8px; }
}

/* ---------- Section ---------- */
.section {
    padding: 48px 0;
}
.section-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}
.section-subtitle {
    color: var(--text-light);
    margin-bottom: 28px;
    font-size: 15px;
}

/* ---------- Category Cards ---------- */
.cat-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.cat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.cat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform .3s ease;
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.cat-card:hover::after { transform: scaleX(1); }
.cat-card-icon { font-size: 56px; margin-bottom: 12px; }
.cat-card-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.cat-card-desc { color: var(--text-light); font-size: 14px; }
.cat-card-count {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 14px;
    background: rgba(39,174,96,.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

/* ---------- Product Grid ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    position: relative;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.product-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f0f0f0;
}
.product-card-body { padding: 14px; }
.product-card-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.5;
}
.product-card-unit {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}
.product-card-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.price-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}
.price-old {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}
.price-badge {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 50px;
    font-weight: 600;
}
.stock-indicator {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 50px;
    display: inline-block;
}
.stock-ok {
    color: #27ae60;
    background: #eafaf1;
}
.stock-low {
    color: #e67e22;
    background: #fef5e7;
}
.stock-out {
    color: #e74c3c;
    background: #fdedec;
}
.add-cart-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.add-cart-btn:hover { background: var(--primary-dark); }
.add-cart-btn.added {
    background: var(--accent);
    animation: pulse .3s ease;
}

/* Chopped badge */
.chopped-badge {
    position: absolute;
    top: 10px;
    z-index: 2;
}
body.rtl .chopped-badge { right: 10px; }
body.ltr .chopped-badge { left: 10px; }

/* Featured badge */
.featured-badge {
    position: absolute;
    top: 10px;
    z-index: 2;
}
body.rtl .featured-badge { left: 10px; }
body.ltr .featured-badge { right: 10px; }

/* ---------- Product Detail ---------- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
}
.product-detail-img {
    width: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
    max-height: 450px;
    box-shadow: var(--shadow);
}
.product-detail-info { padding: 20px 0; }
.product-detail-name { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.product-detail-cat {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(39,174,96,.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 13px;
    margin-bottom: 16px;
}
.product-detail-desc {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 2;
}
.product-detail-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.product-detail-price .price-current { font-size: 28px; }

/* Quantity selector */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
}
.qty-btn {
    width: 40px;
    height: 40px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.qty-btn:hover { background: var(--primary-light); }
body.rtl .qty-btn:first-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
body.rtl .qty-btn:last-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
body.ltr .qty-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
body.ltr .qty-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--border);
    border-right: none;
    border-left: none;
    font-size: 16px;
    font-weight: 600;
    outline: none;
}

/* Packaging options */
.packaging-section { margin-bottom: 24px; }
.packaging-title { font-weight: 600; margin-bottom: 10px; font-size: 15px; }
.packaging-options { display: flex; flex-wrap: wrap; gap: 8px; }
.packaging-opt {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.packaging-opt:hover,
.packaging-opt.selected {
    border-color: var(--primary);
    background: rgba(39,174,96,.06);
    color: var(--primary);
}
.packaging-opt-price { font-size: 11px; color: var(--text-light); }

.detail-add-btn {
    padding: 14px 40px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 16px;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.detail-add-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ---------- Cart Page ---------- */
.cart-section { padding: 40px 0; }
.cart-empty {
    text-align: center;
    padding: 60px 20px;
}
.cart-empty-icon { font-size: 64px; margin-bottom: 16px; }
.cart-empty h2 { margin-bottom: 8px; }
.cart-empty p { color: var(--text-light); margin-bottom: 20px; }
.cart-empty-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
}
.cart-items-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; margin-bottom: 2px; }
.cart-item-pkg { font-size: 12px; color: var(--text-light); }
.cart-item-price { font-weight: 700; color: var(--primary); }
.cart-item-qty { display: flex; align-items: center; gap: 0; }
.cart-item-remove {
    color: var(--accent);
    font-size: 18px;
    padding: 8px;
    transition: transform var(--transition);
}
.cart-item-remove:hover { transform: scale(1.2); }

/* Cart summary */
.cart-summary {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
    height: fit-content;
}
.cart-summary h3 { font-size: 20px; margin-bottom: 16px; }
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
.checkout-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 16px;
    margin-top: 16px;
    transition: all var(--transition);
}
.checkout-btn:hover { background: var(--primary-dark); }

/* Checkout form */
.checkout-form { margin-top: 20px; }
.checkout-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}
.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    transition: border var(--transition);
}
body.rtl .checkout-form input,
body.rtl .checkout-form textarea { direction: rtl; }
body.ltr .checkout-form input,
body.ltr .checkout-form textarea { direction: ltr; }
.checkout-form input:focus,
.checkout-form textarea:focus { border-color: var(--primary); }

/* Checkout error */
.checkout-error {
    background: #fdecea;
    color: #c0392b;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    border: 1px solid #f5c6cb;
}

/* OTP button */
.otp-send-btn {
    transition: background 0.2s, opacity 0.2s;
}
.otp-send-btn:hover { background: #219a52 !important; }
.otp-send-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 13px;
    color: var(--text-light);
}
.breadcrumb a { color: var(--primary); }
body.rtl .breadcrumb-sep::before { content: '›'; margin: 0 4px; }
body.ltr .breadcrumb-sep::before { content: '‹'; margin: 0 4px; }

/* ---------- Category Banner ---------- */
.cat-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #2ecc71 100%);
    color: #fff;
    padding: 40px 0;
    text-align: center;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.cat-banner.chopped-banner {
    background: linear-gradient(135deg, var(--accent) 0%, #c0392b 100%);
}
.cat-banner h1 { font-size: 32px; font-weight: 700; position: relative; }
.cat-banner p { opacity: .9; font-size: 16px; position: relative; }

/* Sub-category tabs */
.sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.sub-tab {
    padding: 8px 20px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
}
.sub-tab:hover,
.sub-tab.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 999;
    opacity: 0;
    transition: all .3s ease;
    white-space: nowrap;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- Floating Cart ---------- */
.floating-cart {
    display: none;
    position: fixed;
    bottom: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-lg);
    z-index: 99;
    transition: all var(--transition);
}
body.rtl .floating-cart { left: 20px; }
body.ltr .floating-cart { right: 20px; }
.floating-cart:hover { transform: scale(1.1); }
.floating-badge {
    position: absolute;
    top: -2px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
body.rtl .floating-badge { right: -2px; }
body.ltr .floating-badge { left: -2px; }

/* ---------- Footer ---------- */
.site-footer {
    background: #1a252f;
    color: #bdc3c7;
    padding: 48px 0 0;
    margin-top: 48px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.footer-logo .logo-text { color: var(--primary); }
.footer-desc { font-size: 14px; line-height: 1.9; }
.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 14px;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
    font-size: 14px;
    transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--primary); }
.contact-list li { font-size: 14px; }
.payment-icons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    font-size: 14px;
}
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: 13px;
}

/* ---------- Animations ---------- */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeInUp .5s ease forwards;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .header-search { display: none; }
    .mobile-menu-btn { display: block; }
    .cat-nav { display: none; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 15px; }
    .cat-cards { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-detail { grid-template-columns: 1fr; gap: 20px; }
    .cart-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .floating-cart { display: flex; }
    /* Smaller logo on mobile */
    .logo-img {
        width: 80px;
        height: 80px;
    }
    .logo-text {
        font-size: 20px;
    }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card-img { height: 140px; }
    .product-card-body { padding: 10px; }
    .product-card-name { font-size: 14px; }
    .price-current { font-size: 15px; }
    .footer-grid { grid-template-columns: 1fr; }
    /* Even smaller logo on very small screens */
    .logo-img {
        width: 60px;
        height: 60px;
    }
    .logo-text {
        font-size: 18px;
    }
}

/* ---------- Auth Forms ---------- */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 16px;
}
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}
.auth-header {
    text-align: center;
    margin-bottom: 24px;
}
.auth-icon { font-size: 48px; margin-bottom: 8px; }
.auth-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { color: var(--text-light); font-size: 14px; }

.auth-alert {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}
.auth-alert-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }
.auth-alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

.auth-form .form-group {
    margin-bottom: 16px;
}
.auth-form label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}
.auth-form input,
.auth-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border var(--transition);
}
body.rtl .auth-form input,
body.rtl .auth-form textarea { direction: rtl; }
body.ltr .auth-form input,
body.ltr .auth-form textarea { direction: ltr; }
.auth-form input:focus {
    border-color: var(--primary);
}

.password-wrapper {
    position: relative;
}
.password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-light);
}
body.rtl .password-toggle { left: 10px; }
body.ltr .password-toggle { right: 10px; }

.auth-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
    font-family: inherit;
    margin-top: 8px;
}
.auth-submit:hover { background: var(--primary-dark); }

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
}
.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* ---------- User Menu (header) ---------- */
.user-menu {
    position: relative;
}
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all var(--transition);
}
.user-menu-btn:hover { border-color: var(--primary); }
.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.user-name {
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-arrow { font-size: 11px; color: var(--text-light); }

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    margin-top: 6px;
    overflow: hidden;
}
body.rtl .user-dropdown { left: 0; }
body.ltr .user-dropdown { right: 0; }
.user-dropdown.active { display: block; }
.dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    transition: background var(--transition);
    border-bottom: 1px solid var(--border);
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: rgba(39,174,96,.06); }
.dropdown-logout { color: var(--accent); }

/* Login button */
.login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    transition: all .3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(39,174,96,.15);
}
.login-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39,174,96,.3);
}
