:root {
            --primary: #c2410c;
            --primary-hover: #9a3412;
            --primary-light: #ffedd5;
            --secondary: #15803d;
            --text-main: #1f2937;
            --text-muted: #6b7280;
            --bg-page: #f9fafb;
            --bg-surface: #ffffff;
            --bg-card-header: #fff7ed;
            --border-color: #e5e7eb;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
            --shadow-float: 0 10px 20px -3px rgba(194, 65, 12, 0.12), 0 4px 8px -2px rgba(0, 0, 0, 0.05);
            --radius: 14px;
            --hero-bg: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
            --hero-title-color: #7c2d12;
            --hero-border: #fed7aa;
            --badge-bank-bg: #eff6ff;
            --badge-bank-border: #bfdbfe;
            --badge-bank-text: #1e40af;
            --status-pending-bg: #fef3c7;
            --status-pending-text: #92400e;
            --status-shipping-bg: #e0f2fe;
            --status-shipping-text: #0369a1;
            --status-delivered-bg: #dcfce7;
            --status-delivered-text: #166534;
            --frame-bg: #ffffff;
        }

        [data-theme="dark"] {
            --primary: #ea580c;
            --primary-hover: #c2410c;
            --primary-light: #2d1911;
            --secondary: #22c55e;
            --text-main: #f3f4f6;
            --text-muted: #9ca3af;
            --bg-page: #0f172a;
            --bg-surface: #1e293b;
            --bg-card-header: #291a14;
            --border-color: #334155;
            --shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
            --shadow-float: 0 10px 20px -3px rgba(0, 0, 0, 0.4);
            --hero-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
            --hero-title-color: #fdba74;
            --hero-border: #334155;
            --badge-bank-bg: #1e293b;
            --badge-bank-border: #3b82f6;
            --badge-bank-text: #93c5fd;
            --status-pending-bg: #362810;
            --status-pending-text: #fde68a;
            --status-shipping-bg: #0c334d;
            --status-shipping-text: #bae6fd;
            --status-delivered-bg: #0e3d23;
            --status-delivered-text: #bbf7d0;
            --frame-bg: #162032;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Vazirmatn', Tahoma, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        html, body {
            overflow-x: clip;
            width: 100%;
        }

        body {
            background-color: var(--bg-page);
            color: var(--text-main);
            line-height: 1.6;
            padding-bottom: 2rem;
            position: relative;
        }

        /* هدر چسبان و ثابت بالای صفحه (Sticky Header) */
        header {
            background: var(--bg-surface);
            position: -webkit-sticky;
            position: sticky;
            top: 0;
            left: 0;
            right: 0;
            width: 100%;
            z-index: 150;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
            border-bottom: 1px solid var(--border-color);
        }

        .navbar {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0.75rem 1rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: relative;
            min-height: 58px;
        }

        .nav-start-slot {
            display: flex;
            align-items: center;
            gap: 1rem;
            z-index: 5;
        }

        .logo-box {
            display: flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            z-index: 10;
            transition: transform 0.2s ease, opacity 0.2s ease;
        }

        .logo-box:hover {
            opacity: 0.92;
        }

        .logo-box:active {
            transform: translate(-50%, -50%) scale(0.97);
        }

        .logo-icon {
            background: var(--primary);
            color: #fff;
            width: 38px;
            height: 38px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 1.15rem;
            flex-shrink: 0;
            box-shadow: 0 4px 12px rgba(194, 65, 12, 0.25);
        }

        .brand-name {
            font-size: 1.25rem;
            font-weight: 800;
            color: var(--primary);
            line-height: 1.2;
            display: block;
        }

        .brand-tagline {
            font-size: 0.7rem;
            color: var(--text-muted);
            display: block;
        }

        .nav-links {
            display: flex;
            gap: 1.25rem;
            list-style: none;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--text-main);
            font-weight: 500;
            font-size: 0.92rem;
            transition: color 0.2s;
            white-space: nowrap;
        }

        .nav-links a:hover {
            color: var(--primary);
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            z-index: 5;
        }

        /* دکمه منوی همبرگری و دکمه حساب کاربری */
        .mobile-menu-btn {
            display: none;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: var(--bg-surface);
            border: 1.5px solid var(--border-color);
            border-radius: 12px;
            font-size: 1.25rem;
            color: var(--text-main);
            cursor: pointer;
            transition: all 0.2s;
        }

        .mobile-menu-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-light);
        }

        .mobile-menu-btn:active {
            transform: scale(0.95);
        }

        .user-btn {
            background: var(--bg-surface);
            color: var(--text-main);
            border: 1.5px solid var(--border-color);
            padding: 0.45rem 0.85rem;
            border-radius: 12px;
            font-size: 0.85rem;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
            box-shadow: var(--shadow-sm);
            transition: all 0.2s;
            font-family: inherit;
        }

        .user-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-light);
        }

        .user-btn:active {
            transform: scale(0.96);
        }

        .user-btn-icon {
            font-size: 1rem;
            line-height: 1;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            z-index: 5;
        }

        /* دکمه ورود به حساب کاربری در هدر (کنار سبد خرید) برای دسکتاپ و موبایل */
        .header-account-btn {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 0.5rem 0.95rem;
            background: var(--bg-surface);
            color: var(--text-main);
            border: 1.5px solid var(--border-color);
            border-radius: 12px;
            font-size: 0.85rem;
            font-weight: 700;
            text-decoration: none;
            transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-sm);
            white-space: nowrap;
            cursor: pointer;
            font-family: inherit;
        }

        .header-account-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-light);
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(234, 88, 12, 0.12);
        }

        .header-account-btn:active {
            transform: translateY(0) scale(0.97);
        }

        .header-account-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            transition: transform 0.2s ease;
        }

        .header-account-btn:hover .header-account-icon {
            transform: scale(1.1);
        }

        .header-account-btn.is-logged-in {
            border-color: rgba(234, 88, 12, 0.4);
            background: rgba(234, 88, 12, 0.08);
            color: var(--primary);
        }

        [data-theme="dark"] .header-account-btn.is-logged-in {
            background: rgba(234, 88, 12, 0.16);
            border-color: rgba(249, 115, 22, 0.45);
            color: #fb923c;
        }

        .auth-buttons-group {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .auth-link-btn {
            text-decoration: none;
            font-size: 0.82rem;
            font-weight: 700;
            padding: 0.45rem 0.85rem;
            border-radius: 10px;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
        }

        .auth-login-btn {
            background: var(--primary-light);
            color: var(--primary);
            border: 1px solid transparent;
        }

        .auth-login-btn:hover {
            background: var(--primary);
            color: white;
        }

        .auth-register-btn {
            background: var(--bg-surface);
            color: var(--text-main);
            border: 1px solid var(--border-color);
        }

        .auth-register-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .cart-btn {
            background: var(--primary-light);
            color: var(--primary);
            border: 1px solid var(--primary-light);
            padding: 0.45rem 0.85rem;
            border-radius: 12px;
            font-weight: 700;
            font-size: 0.82rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
            transition: all 0.2s;
        }

        .cart-btn:hover {
            background: var(--primary);
            color: #fff;
        }

        .cart-btn:active {
            transform: scale(0.96);
        }

        .cart-badge {
            background: #dc2626;
            color: white;
            font-size: 0.72rem;
            border-radius: 50%;
            min-width: 20px;
            height: 20px;
            padding: 0 4px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        /* هیرو */
        .hero {
            background: var(--hero-bg);
            padding: 2.5rem 1rem;
            border-bottom: 1px solid var(--hero-border);
            text-align: center;
        }

        .hero-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            flex-direction: column-reverse;
            align-items: center;
            gap: 1.2rem;
        }

        .hero-emoji {
            font-size: 4.8rem;
            line-height: 1;
        }

        .hero-title {
            font-size: 1.65rem;
            font-weight: 800;
            color: var(--hero-title-color);
            margin-bottom: 0.75rem;
            line-height: 1.35;
        }

        .hero-desc {
            font-size: 0.95rem;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
            line-height: 1.7;
        }

        .cta-btn {
            background: var(--primary);
            color: white;
            padding: 0.85rem 1.8rem;
            border-radius: var(--radius);
            font-weight: 700;
            font-size: 0.95rem;
            text-decoration: none;
            display: block;
            width: 100%;
            max-width: 320px;
            margin: 0 auto;
            box-shadow: 0 4px 14px rgba(194, 65, 12, 0.3);
            text-align: center;
        }

        /* ویژگی‌ها (بدون border-top) */
        .features {
            max-width: 1200px;
            margin: 2rem auto;
            padding: 0 1rem;
            display: grid;
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .feature-card {
            background: var(--bg-surface);
            padding: 1.2rem;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 1rem;
            text-align: right;
        }

        .feature-icon {
            font-size: 2rem;
            flex-shrink: 0;
            width: 48px;
            height: 48px;
            background: var(--bg-page);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .feature-title {
            font-weight: 700;
            font-size: 0.95rem;
            margin-bottom: 0.2rem;
            color: var(--text-main);
        }

        .feature-desc {
            font-size: 0.82rem;
            color: var(--text-muted);
            line-height: 1.5;
        }

        /* بخش محصولات با چارچوب اختصاصی (Showcase Frame) */
        .products-section {
            max-width: 1200px;
            margin: 3.5rem auto;
            padding: 0 1rem;
        }

        .section-header {
            text-align: center;
            margin-bottom: 1.8rem;
        }

        .section-title {
            font-size: 1.5rem;
            font-weight: 800;
            color: var(--text-main);
        }

        .section-subtitle {
            color: var(--text-muted);
            font-size: 0.88rem;
            margin-top: 0.35rem;
        }

        /* چارچوب کادربندی شده برای اسلایدر محصولات با لوپ بی‌نهایت و کنترل لمسی */
        .slider-frame {
            background: var(--frame-bg);
            border: 2px solid var(--border-color);
            border-radius: 24px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
            overflow: hidden;
            position: relative;
            padding: 2rem 0 1.5rem;
            user-select: none;
            -webkit-user-select: none;
        }

        /* ماسک محو شونده نرم در لبه‌های چارچوب */
        .slider-frame::before,
        .slider-frame::after {
            content: '';
            position: absolute;
            top: 0;
            bottom: 0;
            width: 45px;
            z-index: 5;
            pointer-events: none;
        }

        .slider-frame::before {
            right: 0;
            background: linear-gradient(to left, var(--frame-bg), transparent);
        }

        .slider-frame::after {
            left: 0;
            background: linear-gradient(to right, var(--frame-bg), transparent);
        }

        /* کانتینر اسلایدر درون چارچوب - بهینه شده برای لمس و سوایپ در موبایل */
        .slider-viewport {
            width: 100%;
            overflow: hidden;
            position: relative;
            cursor: grab;
            touch-action: pan-y;
            padding: 0.5rem 0;
        }

        .slider-viewport:active,
        .slider-viewport.is-dragging {
            cursor: grabbing;
        }

        /* نوار افقی متحرک - کنترل شده با ترنسفرم جهت حرکت روان در لوپ و هماهنگ با انگشت */
        .slider-track {
            display: flex;
            gap: 1.5rem;
            width: max-content;
            will-change: transform;
            direction: rtl;
            padding: 0.5rem 0;
            transition: none;
        }

        /* دکمه‌های ناوبری لمسی چپ و راست */
        .slider-nav-btn {
            position: absolute;
            top: 48%;
            transform: translateY(-50%);
            z-index: 10;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
            color: var(--text-main);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.25s ease;
            outline: none;
        }

        .slider-nav-btn:hover {
            background: var(--primary);
            color: #ffffff;
            border-color: var(--primary);
            transform: translateY(-50%) scale(1.08);
            box-shadow: 0 6px 18px rgba(194, 65, 12, 0.25);
        }

        .slider-nav-btn:active {
            transform: translateY(-50%) scale(0.92);
        }

        .slider-prev-btn {
            right: 14px;
        }

        .slider-next-btn {
            left: 14px;
        }

        /* ردیف کنترل و نقطه‌های ناوبری زیر اسلایدر */
        .slider-controls {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1.25rem;
            margin-top: 1.2rem;
            padding: 0 1rem;
            position: relative;
            z-index: 6;
        }

        .slider-dots {
            display: flex;
            align-items: center;
            gap: 0.55rem;
        }

        .slider-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--border-color);
            border: none;
            cursor: pointer;
            padding: 0;
            transition: all 0.28s ease;
        }

        .slider-dot:hover {
            background: var(--text-muted);
        }

        .slider-dot.active {
            width: 28px;
            border-radius: 12px;
            background: var(--primary);
            box-shadow: 0 2px 8px rgba(194, 65, 12, 0.35);
        }

        .slider-autoplay-toggle {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            color: var(--text-muted);
            font-size: 0.78rem;
            font-family: inherit;
            font-weight: 500;
            padding: 0.35rem 0.85rem;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .slider-autoplay-toggle:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .slider-autoplay-toggle.paused {
            background: var(--primary-light);
            color: var(--primary);
            border-color: var(--primary);
            font-weight: 600;
        }

        /* افکت شناور کارت‌ها */
        @keyframes floatingAnimation {
            0%, 100% {
                transform: translateY(0px);
            }
            50% {
                transform: translateY(-8px);
            }
        }

        .product-card {
            background: var(--bg-surface);
            border-radius: var(--radius);
            border: 1px solid var(--border-color);
            overflow: hidden;
            box-shadow: var(--shadow-float);
            display: flex;
            flex-direction: column;
            width: 275px;
            flex-shrink: 0;
            cursor: pointer;
            animation: floatingAnimation 4s ease-in-out infinite;
            transition: border-color 0.25s, box-shadow 0.25s;
        }

        .product-card:nth-child(even) {
            animation-delay: 2s;
        }

        .product-card:hover {
            border-color: var(--primary-light);
            box-shadow: 0 14px 28px -4px rgba(194, 65, 12, 0.16);
        }

        .product-img-wrapper {
            background: var(--bg-card-header);
            height: 165px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            border-bottom: 1px solid var(--border-color);
        }

        .product-badge {
            position: absolute;
            top: 12px;
            right: 12px;
            background: var(--secondary);
            color: white;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .product-illustration {
            font-size: 3.8rem;
            filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
        }

        .product-details {
            padding: 1.25rem;
            display: flex;
            flex-direction: column;
            flex-grow: 1;
        }

        .product-title {
            font-size: 1.12rem;
            font-weight: 700;
            margin-bottom: 0.4rem;
            color: var(--text-main);
        }

        .product-desc {
            font-size: 0.84rem;
            color: var(--text-muted);
            margin-bottom: 1rem;
            line-height: 1.6;
            height: 44px;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .product-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.1rem;
            padding-top: 0.75rem;
            border-top: 1px dashed var(--border-color);
        }

        .product-price {
            font-size: 1.2rem;
            font-weight: 800;
            color: var(--primary);
        }

        .product-weight {
            font-size: 0.82rem;
            color: var(--text-muted);
        }

        .add-cart-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 0.85rem;
            border-radius: 10px;
            font-weight: 700;
            font-size: 0.95rem;
            cursor: pointer;
            width: 100%;
            min-height: 48px;
            transition: background 0.2s;
        }

        .add-cart-btn:active {
            background: var(--primary-hover);
            transform: scale(0.98);
        }

        .slider-hint {
            text-align: center;
            font-size: 0.82rem;
            color: var(--text-muted);
            margin-top: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
        }

        @media (max-width: 600px) {
            .product-card {
                width: 260px;
            }
            .slider-frame {
                padding: 1.5rem 0 1.2rem;
                border-radius: 18px;
            }
            .slider-frame::before,
            .slider-frame::after {
                width: 25px;
            }
            .slider-nav-btn {
                width: 38px;
                height: 38px;
            }
            .slider-prev-btn {
                right: 6px;
            }
            .slider-next-btn {
                left: 6px;
            }
        }
        
        /* فوت و فن پخت */
        .recipe-box {
            max-width: 1200px;
            margin: 2rem auto;
            padding: 1.5rem;
            background: var(--bg-surface);
            border-radius: var(--radius);
            border: 1px solid var(--border-color);
        }

        /* لایه تاریک پشت تمام پنجره‌ها */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0,0,0,0.65);
            z-index: 200;
            display: none;
            backdrop-filter: blur(3px);
        }

        /* ===================================================
           سایدبار و کشوی جامع منو و حساب کاربری آماک
           =================================================== */
        .amak-unified-drawer {
            position: fixed;
            top: 0;
            right: -440px;
            width: min(420px, 92vw);
            height: 100%;
            background: var(--bg-surface);
            box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
            z-index: 250;
            display: flex;
            flex-direction: column;
            transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
            border-left: 1px solid var(--border-color);
        }

        .amak-unified-drawer.open {
            right: 0;
        }

        .drawer-header {
            padding: 1.1rem 1.25rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: var(--bg-page);
        }

        .drawer-brand {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .drawer-logo-icon {
            background: var(--primary);
            color: #fff;
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 1.1rem;
            flex-shrink: 0;
            box-shadow: 0 4px 10px rgba(194, 65, 12, 0.25);
        }

        .drawer-title {
            font-size: 0.98rem;
            font-weight: 800;
            color: var(--primary);
            margin: 0;
            line-height: 1.2;
        }

        .drawer-subtitle {
            font-size: 0.72rem;
            color: var(--text-muted);
            display: block;
        }

        .drawer-close-btn {
            background: none;
            border: 1px solid var(--border-color);
            color: var(--text-muted);
            width: 38px;
            height: 38px;
            border-radius: 10px;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            line-height: 1;
            transition: all 0.2s;
        }

        .drawer-close-btn:hover {
            color: var(--primary);
            border-color: var(--primary);
            background: var(--primary-light);
        }

        .drawer-body {
            flex-grow: 1;
            overflow-y: auto;
            padding: 1.25rem;
            -webkit-overflow-scrolling: touch;
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }

        /* کارت حساب کاربری درون سایدبار */
        .drawer-account-card {
            background: var(--bg-page);
            border: 1px solid var(--border-color);
            border-radius: 14px;
            padding: 1.1rem;
            box-shadow: var(--shadow-sm);
        }

        .drawer-user-info {
            display: flex;
            align-items: center;
            gap: 12px;
            padding-bottom: 0.9rem;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 0.9rem;
        }

        .drawer-user-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), #ea580c);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 1.3rem;
            flex-shrink: 0;
            position: relative;
            box-shadow: 0 4px 10px rgba(194, 65, 12, 0.25);
        }

        .drawer-online-badge {
            position: absolute;
            bottom: 1px;
            right: 1px;
            width: 12px;
            height: 12px;
            background: #10b981;
            border: 2px solid var(--bg-page);
            border-radius: 50%;
        }

        .drawer-user-name {
            font-weight: 800;
            font-size: 0.98rem;
            color: var(--text-main);
        }

        .drawer-user-phone {
            font-size: 0.8rem;
            color: var(--text-muted);
            direction: ltr;
            text-align: right;
        }

        .drawer-user-tag {
            display: inline-block;
            margin-top: 3px;
            font-size: 0.72rem;
            font-weight: 700;
            color: #d97706;
            background: #fef3c7;
            padding: 2px 8px;
            border-radius: 12px;
        }

        .drawer-account-actions {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .drawer-panel-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 0.9rem;
            background: var(--primary);
            color: #fff !important;
            border-radius: 10px;
            font-size: 0.88rem;
            font-weight: 700;
            text-decoration: none;
            transition: all 0.2s;
        }

        .drawer-panel-link:hover {
            opacity: 0.93;
            transform: translateY(-1px);
        }

        .drawer-orders-btn {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            padding: 0.65rem 0.9rem;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            color: var(--text-main);
            border-radius: 10px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .drawer-orders-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .drawer-logout-btn {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            padding: 0.5rem 0.9rem;
            background: none;
            border: 1px dashed #ef4444;
            color: #ef4444;
            border-radius: 10px;
            font-size: 0.82rem;
            font-weight: 600;
            cursor: pointer;
            margin-top: 0.2rem;
            transition: all 0.2s;
        }

        .drawer-logout-btn:hover {
            background: #fee2e2;
        }

        /* حالت مهمان در سایدبار */
        .drawer-guest-header {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 0.9rem;
        }

        .drawer-guest-icon {
            font-size: 1.7rem;
            line-height: 1;
        }

        .drawer-guest-title {
            font-weight: 800;
            font-size: 0.95rem;
            color: var(--text-main);
        }

        .drawer-guest-desc {
            font-size: 0.78rem;
            color: var(--text-muted);
            line-height: 1.5;
            margin-top: 2px;
        }

        .drawer-guest-buttons {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.5rem;
            margin-bottom: 0.6rem;
        }

        .drawer-btn-login {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.65rem;
            background: var(--primary);
            color: #fff !important;
            border-radius: 10px;
            font-size: 0.86rem;
            font-weight: 700;
            text-decoration: none;
            text-align: center;
        }

        .drawer-btn-register {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.65rem;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            color: var(--text-main) !important;
            border-radius: 10px;
            font-size: 0.86rem;
            font-weight: 700;
            text-decoration: none;
            text-align: center;
        }

        .drawer-guest-panel-link {
            display: block;
            text-align: center;
            font-size: 0.78rem;
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            margin-top: 0.4rem;
        }

        /* ابزار محاسبه‌گر مقدار رشته */
        .drawer-calc-card {
            background: var(--bg-page);
            border: 1px solid var(--border-color);
            border-radius: 14px;
            padding: 1rem;
        }

        .drawer-section-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 0.75rem;
        }

        .section-emoji {
            font-size: 1.4rem;
            line-height: 1;
        }

        .section-heading {
            font-size: 0.9rem;
            font-weight: 800;
            color: var(--text-main);
            margin: 0;
        }

        .section-caption {
            font-size: 0.72rem;
            color: var(--text-muted);
            display: block;
        }

        .calc-presets-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 0.85rem;
        }

        .calc-chip {
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            color: var(--text-main);
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 0.76rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
        }

        .calc-chip:hover, .calc-chip.active {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
        }

        .calc-result-box {
            background: var(--bg-surface);
            border: 1px dashed var(--border-color);
            border-radius: 10px;
            padding: 0.75rem;
        }

        .calc-result-text {
            font-size: 0.8rem;
            color: var(--text-main);
            margin-bottom: 0.5rem;
            line-height: 1.5;
        }

        .calc-result-text strong {
            display: block;
            color: var(--primary);
            font-size: 0.86rem;
            margin-top: 2px;
        }

        .calc-add-btn {
            width: 100%;
            background: var(--primary-light);
            color: var(--primary);
            border: 1px solid var(--primary);
            padding: 0.5rem;
            border-radius: 8px;
            font-size: 0.82rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
        }

        .calc-add-btn:hover {
            background: var(--primary);
            color: #fff;
        }

        /* لیست ناوبری سایدبار */
        .drawer-section-title {
            font-size: 0.84rem;
            font-weight: 800;
            color: var(--text-muted);
            margin-bottom: 0.6rem;
        }

        .drawer-nav-list {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
        }

        .drawer-nav-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0.7rem 0.9rem;
            background: var(--bg-page);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            text-decoration: none;
            color: var(--text-main);
            transition: all 0.2s ease;
            box-sizing: border-box;
            width: 100%;
        }

        .drawer-nav-item:hover {
            border-color: var(--primary);
            transform: translateX(-3px);
            background: var(--bg-surface);
        }

        .drawer-nav-item:active {
            transform: scale(0.98);
        }

        .drawer-theme-item {
            cursor: pointer;
            width: 100%;
            text-align: right;
            font-family: inherit;
            border: 1.5px solid var(--border-color);
            background: var(--bg-surface);
            box-shadow: var(--shadow-sm);
        }

        .drawer-theme-item:hover {
            border-color: var(--primary);
            background: var(--primary-light);
        }

        .drawer-theme-badge {
            font-size: 0.75rem;
            font-weight: 700;
            padding: 0.2rem 0.6rem;
            border-radius: 8px;
            background: var(--bg-page);
            border: 1px solid var(--border-color);
            color: var(--text-main);
            transition: all 0.2s;
        }

        .drawer-theme-item:hover .drawer-theme-badge {
            background: var(--primary);
            color: #ffffff;
            border-color: var(--primary);
        }

        .drawer-nav-icon {
            font-size: 1.2rem;
            line-height: 1;
            flex-shrink: 0;
        }

        .drawer-nav-content {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }

        .drawer-nav-label {
            font-size: 0.86rem;
            font-weight: 700;
        }

        .drawer-nav-sub {
            font-size: 0.72rem;
            color: var(--text-muted);
            margin-top: 1px;
        }

        .drawer-nav-arrow {
            font-size: 1.1rem;
            color: var(--text-muted);
            font-weight: 700;
        }

        /* باکس پشتیبانی */
        .drawer-support-box {
            background: var(--bg-page);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 0.9rem;
            text-align: center;
        }

        .drawer-support-title {
            font-size: 0.84rem;
            font-weight: 800;
            color: var(--text-main);
        }

        .drawer-support-phone {
            font-size: 0.95rem;
            font-weight: 800;
            color: var(--primary);
            margin: 4px 0;
            direction: ltr;
        }

        .drawer-support-sub {
            font-size: 0.72rem;
            color: var(--text-muted);
        }

        .arrow-sym {
            font-size: 1.1rem;
            font-weight: 700;
        }

        /* کشوی سبد خرید */
        .cart-drawer {
            position: fixed;
            top: 0;
            left: -100%;
            width: 100%;
            max-width: 380px;
            height: 100%;
            background: var(--bg-surface);
            z-index: 205;
            box-shadow: 5px 0 25px rgba(0,0,0,0.3);
            display: flex;
            flex-direction: column;
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .cart-drawer.open {
            left: 0;
        }

        .cart-header {
            padding: 1rem 1.2rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .close-btn {
            background: none;
            border: none;
            font-size: 1.75rem;
            cursor: pointer;
            color: var(--text-muted);
            padding: 4px;
            line-height: 1;
            min-width: 44px;
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cart-items {
            flex-grow: 1;
            overflow-y: auto;
            padding: 1rem 1.2rem;
            -webkit-overflow-scrolling: touch;
        }

        .cart-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.9rem 0;
            border-bottom: 1px solid var(--border-color);
            gap: 10px;
        }

        .cart-item-info h4 {
            font-size: 0.92rem;
            margin-bottom: 0.25rem;
            color: var(--text-main);
        }

        .cart-item-price {
            font-size: 0.85rem;
            color: var(--primary);
            font-weight: 700;
        }

        .qty-controls {
            display: flex;
            align-items: center;
            gap: 6px;
            background: var(--bg-page);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 4px 6px;
        }

        .qty-btn {
            background: none;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            color: var(--text-main);
        }

        .cart-footer {
            padding: 1.2rem;
            border-top: 1px solid var(--border-color);
            background: var(--bg-page);
        }

        .total-row {
            display: flex;
            justify-content: space-between;
            font-size: 1.05rem;
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .checkout-btn {
            background: var(--secondary);
            color: white;
            border: none;
            padding: 0.9rem;
            border-radius: 10px;
            width: 100%;
            font-weight: 700;
            font-size: 1rem;
            min-height: 48px;
            cursor: pointer;
        }

        .checkout-btn:active {
            transform: scale(0.98);
        }

        /* مودال‌ها */
        .app-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: var(--bg-surface);
            width: calc(100% - 24px);
            max-width: 520px;
            border-radius: var(--radius);
            border: 1px solid var(--border-color);
            box-shadow: 0 20px 40px rgba(0,0,0,0.4);
            z-index: 300;
            display: none;
            max-height: 88vh;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 1.25rem 1rem;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.2rem;
            padding-bottom: 0.6rem;
            border-bottom: 1px solid var(--border-color);
        }

        .modal-header h3 {
            font-size: 1.15rem;
        }

        .form-group {
            margin-bottom: 1rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.35rem;
            font-weight: 600;
            font-size: 0.88rem;
            color: var(--text-main);
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 0.75rem 0.85rem;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 16px;
            background: var(--bg-page);
            color: var(--text-main);
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary);
        }

        .form-row {
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .bank-badge {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0.75rem;
            background: var(--badge-bank-bg);
            border: 1px solid var(--badge-bank-border);
            border-radius: 8px;
            margin-bottom: 1.2rem;
            font-size: 0.82rem;
            color: var(--badge-bank-text);
        }

        .btn-submit {
            background: var(--primary);
            color: white;
            border: none;
            padding: 0.85rem;
            border-radius: 10px;
            font-weight: 800;
            font-size: 0.95rem;
            width: 100%;
            min-height: 48px;
            cursor: pointer;
        }

        .btn-submit:active {
            background: var(--primary-hover);
            transform: scale(0.98);
        }

        /* پنل کاربری */
        .user-profile-bar {
            background: var(--bg-page);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 0.85rem 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.2rem;
        }

        .user-phone-badge {
            font-weight: 700;
            color: var(--primary);
            font-size: 0.95rem;
        }

        .logout-btn {
            background: none;
            border: 1px solid #ef4444;
            color: #ef4444;
            padding: 0.4rem 0.75rem;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 600;
            min-height: 36px;
        }

        .orders-list {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
        }

        .order-card {
            background: var(--bg-page);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 1rem;
        }

        .order-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.6rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px dashed var(--border-color);
            gap: 8px;
        }

        .order-code {
            font-weight: 700;
            font-size: 0.88rem;
        }

        .order-status {
            padding: 0.2rem 0.65rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 700;
            white-space: nowrap;
        }

        .status-pending { background: var(--status-pending-bg); color: var(--status-pending-text); }
        .status-shipping { background: var(--status-shipping-bg); color: var(--status-shipping-text); }
        .status-delivered { background: var(--status-delivered-bg); color: var(--status-delivered-text); }

        .order-details-row {
            font-size: 0.82rem;
            color: var(--text-muted);
            margin-bottom: 0.35rem;
        }

        .order-items-summary {
            font-size: 0.84rem;
            color: var(--text-main);
            margin-top: 0.4rem;
            line-height: 1.5;
        }

        footer {
            background: #090d16;
            color: #9ca3af;
            padding: 2.5rem 1rem 1.5rem;
            margin-top: 3.5rem;
            border-top: 1px solid #1e293b;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .footer-col h4 {
            color: white;
            margin-bottom: 0.5rem;
            font-size: 1rem;
        }

        .footer-col p {
            font-size: 0.85rem;
            line-height: 1.7;
        }

        .footer-bottom {
            text-align: center;
            padding-top: 1.2rem;
            border-top: 1px solid #1f2937;
            font-size: 0.8rem;
        }

        @media (min-width: 641px) {
            .hero-content {
                flex-direction: row;
                text-align: right;
            }
            .hero-title {
                font-size: 2.2rem;
            }
            .hero-emoji {
                font-size: 6.5rem;
            }
            .cta-btn {
                margin: 0;
            }
            .features {
                grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            }
            .feature-card {
                flex-direction: column;
                text-align: center;
            }
            .form-row {
                flex-direction: row;
                gap: 1rem;
            }
            .form-row .form-group {
                flex: 1;
            }
            .footer-content {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
            }
            .slider-frame {
                padding: 2.5rem 0;
            }
        }

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .nav-links {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        min-height: 40px;
        min-width: 40px;
    }

    .header-actions {
        gap: 6px;
    }

    .header-account-btn {
        display: none !important;
    }

    .user-btn {
        min-height: 40px;
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }

    .cart-btn {
        min-height: 40px;
        padding: 0.45rem 0.75rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 1.45rem;
    }

    .hero-desc {
        font-size: 0.88rem;
    }

    .hero-emoji {
        font-size: 3.8rem;
    }

    .cta-btn {
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 280px;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .section-subtitle {
        font-size: 0.82rem;
    }

    /* پاپ‌آپ‌ها و مدال‌ها در موبایل */
    .app-modal {
        width: calc(100% - 20px);
        max-height: 92vh;
        padding: 1.25rem 1rem;
        border-radius: 16px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* جلوگیری از زوم ناخواسته در گوشی‌های اپل/سافاری */
        min-height: 46px;
    }

    .checkout-btn,
    .btn-submit {
        min-height: 48px;
        font-size: 1rem;
    }

    .qty-btn {
        width: 38px;
        height: 38px;
        font-size: 1.25rem;
    }

    .product-btn {
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.65rem 0.75rem;
    }

    .header-actions {
        gap: 0.35rem;
    }

    .brand-tagline {
        display: none;
    }

    .brand-name {
        font-size: 1.15rem;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .auth-buttons-group {
        gap: 0.25rem;
    }

    .auth-link-btn {
        padding: 0.38rem 0.55rem;
        font-size: 0.76rem;
        min-height: 38px;
    }

    .product-card {
        width: 245px;
    }

    .slider-frame {
        border-radius: 18px;
        padding: 1.2rem 0 1rem;
    }

    .recipe-section {
        padding: 1.4rem 1rem;
    }

    .toast-msg {
        width: calc(100% - 32px);
        justify-content: center;
        text-align: center;
        bottom: 16px;
        font-size: 0.84rem;
        padding: 0.7rem 1rem;
    }
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.mobile-menu-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.toast-msg {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #10b981;
    color: #ffffff;
    padding: 0.75rem 1.4rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 1002;
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-msg.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================
   استایل‌های دکمه‌های ورود/ثبت‌نام در هدر و صفحات ورود/ثبت‌نام
   ========================================== */
.auth-buttons-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.auth-link-btn {
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.42rem 0.85rem;
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-login-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.auth-login-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.auth-register-btn {
    background: var(--primary);
    color: #ffffff !important;
    border: 1px solid var(--primary);
}

.auth-register-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* صفحات اختصاصی ورود و ثبت نام */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-page);
    color: var(--text-main);
}

.auth-page-header {
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 750px;
    width: 100%;
    margin: 0 auto;
}

.auth-card-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem 3rem;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 650px;
    padding: 2.2rem 2rem;
}

.auth-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.4rem;
    text-align: center;
}

.auth-card-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
    margin-bottom: 1.6rem;
    line-height: 1.5;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .auth-form-grid {
        grid-template-columns: 1fr;
    }
    .auth-card {
        padding: 1.6rem 1.2rem;
    }
}

.auth-full-width {
    grid-column: 1 / -1;
}

.auth-submit-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.88rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 1.2rem;
}

.auth-submit-btn:hover {
    background: var(--primary-hover);
}

.auth-submit-btn:active {
    transform: scale(0.98);
}

.auth-card-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.auth-card-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-card-footer a:hover {
    text-decoration: underline;
}

.auth-error-box {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    display: none;
}

[data-theme="dark"] .auth-error-box {
    background: #450a0a;
    color: #fca5a5;
    border-color: #7f1d1d;
}

.auth-success-box {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    display: none;
}

[data-theme="dark"] .auth-success-box {
    background: #052e16;
    color: #86efac;
    border-color: #14532d;
}

/* ===================================================
   نوار ناوبری شناور پایین صفحه در موبایل (Mobile Floating Bottom Bar)
   =================================================== */
.mobile-floating-nav-bar {
    display: none;
    position: fixed;
    bottom: max(14px, env(safe-area-inset-bottom, 14px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    max-width: 390px;
    z-index: 195;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .mobile-floating-nav-bar {
        display: block;
    }
    
    /* فاصله انتهای صفحه تا فوتر زیر نوار شناور نرود */
    body {
        padding-bottom: 85px;
    }
}

.floating-nav-inner {
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 24px;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 12px 36px 0 rgba(0, 0, 0, 0.1), 0 2px 10px rgba(0, 0, 0, 0.04), inset 0 1px 1px 0 rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .floating-nav-inner {
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 1px 0 rgba(255, 255, 255, 0.12);
}

.floating-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    outline: none;
    text-decoration: none;
    color: var(--text-muted);
    padding: 6px 8px;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.floating-nav-btn:active {
    transform: scale(0.92);
}

.floating-nav-btn.active,
.floating-nav-btn:hover {
    color: var(--primary);
}

.floating-nav-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    transition: transform 0.2s ease;
}

.floating-nav-btn:active .floating-nav-icon-wrap {
    transform: translateY(-2px);
}

.floating-nav-btn.active .floating-nav-icon-wrap svg {
    stroke-width: 2.6;
}

.floating-nav-text {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.floating-nav-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
    line-height: 1;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
}

/* ===================================================
   استایل‌های اختصاصی تسویه حساب چندمرحله‌ای (Technolife Stepper Checkout)
   =================================================== */
#checkoutModal {
    max-width: 650px;
    width: min(650px, 94vw);
    padding: 1.25rem 1.25rem 1.5rem;
}

#checkoutModal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#checkoutModal .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

#checkoutModal .form-group label {
    min-height: 2.2rem;
    display: flex;
    align-items: flex-end;
    margin-bottom: 0.35rem;
    line-height: 1.35;
    font-size: 0.88rem;
    font-weight: 600;
}

#checkoutModal .form-group input,
#checkoutModal .form-group textarea {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 540px) {
    #checkoutModal .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    #checkoutModal .form-group label {
        min-height: auto;
    }
}

.checkout-stepper-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.checkout-stepper-bar::before {
    content: '';
    position: absolute;
    top: 19px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
}

.checkout-step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.checkout-step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.checkout-step-item.active .checkout-step-num {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.35);
    transform: scale(1.08);
}

.checkout-step-item.completed .checkout-step-num {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #ffffff;
}

.checkout-step-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: color 0.2s;
}

.checkout-step-item.active .checkout-step-label {
    color: var(--primary);
}

.checkout-step-item.completed .checkout-step-label {
    color: var(--secondary);
}

/* کارت انتخاب‌های رادیویی (ارسال و پرداخت) */
.option-card-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-page);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.option-card:hover {
    border-color: var(--primary);
    background: var(--bg-surface);
}

.option-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.1);
}

.option-card input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.option-info {
    flex-grow: 1;
}

.option-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.option-price {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
}

/* کادر کد تخفیف */
.discount-box {
    display: flex;
    gap: 8px;
    margin-bottom: 1.2rem;
    background: var(--bg-page);
    padding: 0.6rem;
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

.discount-input {
    flex-grow: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    text-transform: uppercase;
    background: var(--bg-surface);
    color: var(--text-main);
}

.discount-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 1.1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.discount-btn:hover {
    background: var(--primary-hover);
}

/* فاکتور و پیش‌فاکتور شفاف */
.invoice-summary-card {
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.2rem;
}

.invoice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.86rem;
    padding: 0.4rem 0;
    color: var(--text-muted);
}

.invoice-row.total {
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
}

.invoice-row.total .price-val {
    color: var(--primary);
    font-size: 1.15rem;
}

.checkout-step-buttons {
    display: flex;
    gap: 10px;
    margin-top: 1.25rem;
}

.checkout-btn-prev {
    background: var(--bg-page);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.checkout-btn-prev:hover {
    background: var(--bg-surface);
    border-color: var(--primary);
}

.checkout-btn-next {
    flex-grow: 1;
    background: var(--secondary);
    color: #ffffff;
    border: none;
    padding: 0.85rem 1.2rem;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.checkout-btn-next:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

