
        :root {
            --primary: #ef3a4b;
            --primary-dark: #d63041;
            --secondary: #f9a825;
            --dark: #2d3436;
            --light: #f5f6fa;
            --white: #ffffff;
            --gray: #61757d; /* Updated Color */
            --text: #2d3436;
            --glass-bg: rgba(255, 255, 255, 0.75);
            --glass-border: rgba(255, 255, 255, 0.5);
            --footer-bg-start: #1a1a1a;
            --footer-bg-end: #373737;
            --gold: #f8ca1b; 
            --gold-light: #f3e5ab;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
        body { font-family: 'Vazirmatn', sans-serif; background-color: var(--light); color: var(--text); max-width: 600px; margin: 0 auto; position: relative; overflow-x: hidden; padding-bottom: 70px; }
        body.no-scroll { overflow: hidden; }
        img { display: block; max-width: 100%; }
        a { text-decoration: none; color: inherit; }
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* --- Header --- */
        header { background: linear-gradient(135deg, var(--footer-bg-start) 0%, var(--footer-bg-end) 100%); padding: 15px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
        .menu-btn, .cart-btn { font-size: 24px; color: var(--gold); cursor: pointer; background: none; border: none; }
        .logo { font-size: 24px; font-weight: 900; color: var(--gold-light); text-shadow: 0 2px 4px rgba(0,0,0,0.3); display: flex; align-items: center; gap: 10px; }
        .logo img { height: 38px; width: auto; display: block; flex-shrink: 0; }
        .header-icons { display: flex; align-items: center; gap: 15px; }
        .header-icons i { font-size: 20px; color: var(--gold); cursor: pointer; transition: color 0.3s; }
        .header-icons i:hover { color: var(--gold-light); }

        .desktop-nav { display: none; gap: 25px; align-items: center; }
        .nav-link { color: #dcdcdc; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; cursor: pointer; transition: color 0.3s, transform 0.2s; }
        .nav-link:hover { color: var(--gold); transform: translateY(-2px); }
        .nav-link i { font-size: 14px; }

        /* --- Notifications Popup (bell, works on mobile + desktop) --- */
        .notif-menu-wrap { position: relative; display: flex; align-items: center; }
        .notif-btn { position: relative; background: none; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; }
        .notif-badge { position: absolute; top: -6px; left: -8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 10px; font-weight: bold; display: flex; align-items: center; justify-content: center; border: 2px solid var(--footer-bg-start); }
        .notif-badge.hidden { display: none; }
        /* In RTL the header icons sit at the LEFT edge, so the popup must open toward the right. */
        .notif-popup { position: absolute; top: calc(100% + 18px); left: -10px; width: min(320px, calc(100vw - 30px)); background: var(--white); border-radius: 16px; box-shadow: 0 15px 40px rgba(0,0,0,0.25); z-index: 200; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease; }
        .notif-popup.active { opacity: 1; visibility: visible; transform: translateY(0); }
        .notif-popup::before { content: ''; position: absolute; top: -7px; left: 16px; width: 14px; height: 14px; background: var(--white); transform: rotate(45deg); border-radius: 3px 0 0 0; }
        .notif-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 15px; border-bottom: 1px solid rgba(0,0,0,0.07); position: relative; background: var(--white); border-radius: 16px 16px 0 0; }
        .notif-head h4 { font-size: 15px; color: var(--dark); display: flex; align-items: center; gap: 8px; }
        .notif-head h4 i { color: var(--primary); font-size: 14px; }
        .notif-mark-read { background: none; border: none; font-family: inherit; font-size: 12px; color: var(--primary); cursor: pointer; padding: 4px; }
        .notif-mark-read:disabled { color: var(--gray); cursor: default; }
        .notif-list { max-height: 320px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
        .notif-item { display: flex; gap: 11px; padding: 13px 15px; border-bottom: 1px solid rgba(0,0,0,0.05); cursor: pointer; transition: background 0.2s; }
        .notif-item:last-child { border-bottom: none; }
        .notif-item:hover { background: var(--light); }
        .notif-item.unread { background: rgba(239, 58, 75, 0.05); }
        .notif-item.unread:hover { background: rgba(239, 58, 75, 0.09); }
        .notif-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
        .notif-body { flex: 1; min-width: 0; }
        .notif-title { font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 3px; display: flex; align-items: center; gap: 6px; }
        .notif-title .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
        .notif-text { font-size: 12px; color: #666; line-height: 1.6; }
        .notif-time { font-size: 11px; color: var(--gray); margin-top: 5px; display: flex; align-items: center; gap: 5px; }
        .notif-empty { padding: 35px 15px; text-align: center; color: var(--gray); font-size: 13px; }
        .notif-empty i { font-size: 32px; color: #dfe3e6; display: block; margin-bottom: 10px; }
        .notif-footer { padding: 11px; text-align: center; border-top: 1px solid rgba(0,0,0,0.07); background: var(--light); border-radius: 0 0 16px 16px; }
        .notif-footer span, .notif-footer a { font-size: 13px; color: var(--primary); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: color 0.2s; }
        .notif-footer a:hover { color: var(--primary-dark); }
        .notif-footer a i { font-size: 11px; }

        /* --- Desktop User Popup (avatar on the left of the header) --- */
        .user-menu-wrap { position: relative; display: none; }
        .user-avatar-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 2px solid var(--gold); background: none; cursor: pointer; display: block; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
        .user-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
        .user-avatar-btn:hover { transform: scale(1.05); box-shadow: 0 0 0 3px rgba(248, 202, 27, 0.25); }
        .user-popup { position: absolute; top: calc(100% + 14px); left: 0; width: 290px; background: var(--white); border-radius: 16px; box-shadow: 0 15px 40px rgba(0,0,0,0.25); padding: 15px; z-index: 200; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease; }
        .user-popup.active { opacity: 1; visibility: visible; transform: translateY(0); }
        .user-popup::before { content: ''; position: absolute; top: -7px; left: 14px; width: 14px; height: 14px; background: var(--white); transform: rotate(45deg); border-radius: 3px 0 0 0; }
        .user-popup-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(0,0,0,0.07); }
        .user-popup-head img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
        .user-popup-head h4 { font-size: 14px; color: var(--dark); margin-bottom: 3px; }
        .user-popup-head p { font-size: 12px; color: var(--gray); direction: ltr; text-align: right; }
        .user-popup-menu { margin-top: 8px; }
        .user-popup-item { display: flex; align-items: center; gap: 12px; padding: 11px 8px; font-size: 14px; color: var(--dark); cursor: pointer; border-radius: 10px; transition: background 0.2s, color 0.2s; }
        .user-popup-item:hover { background: var(--light); color: var(--primary); }
        .user-popup-item i { width: 18px; text-align: center; color: var(--gray); font-size: 15px; transition: color 0.2s; }
        .user-popup-item:hover i { color: var(--primary); }
        .user-popup-item.logout { color: var(--primary); border-top: 1px solid rgba(0,0,0,0.07); margin-top: 6px; padding-top: 12px; border-radius: 0 0 10px 10px; }
        .user-popup-item.logout i { color: var(--primary); }

        /* --- Wallet Card (shared: desktop popup + mobile drawer) --- */
        .wallet-card { background: linear-gradient(135deg, var(--gold) 0%, #e0a800 100%); border-radius: 14px; padding: 14px; color: var(--footer-bg-start); box-shadow: 0 6px 18px rgba(248, 202, 27, 0.3); }
        .wallet-label { font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 7px; opacity: 0.85; }
        .wallet-balance { font-size: 20px; font-weight: 800; margin: 8px 0 12px; }
        .wallet-balance span { font-size: 12px; font-weight: 500; }
        .wallet-charge-btn { width: 100%; background: var(--footer-bg-start); color: var(--gold); border: none; border-radius: 10px; padding: 9px; font-family: inherit; font-size: 13px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; transition: background 0.3s; }
        .wallet-charge-btn:hover { background: #000; }
        .wallet-actions.with-payout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
        .wallet-payout-btn { width: 100%; background: rgba(255, 255, 255, .88); color: var(--footer-bg-start); border: none; border-radius: 10px; padding: 9px 6px; font-family: inherit; font-size: 12px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.3s, color 0.3s; }
        .wallet-payout-btn:hover { background: #fff; color: #000; }

        /* --- Overlays & Drawers Common --- */
        .drawer-overlay { position: fixed; top: 0; right: 0; left: 0; bottom: 0; background: rgba(0,0,0,0.3); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
        .drawer-overlay.active { opacity: 1; visibility: visible; }

        /* --- Main Drawer --- */
        .drawer { position: fixed; top: 0; bottom: 0; right: -300px; width: 280px; z-index: 1000; transition: right 0.3s ease; padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: linear-gradient(135deg, var(--footer-bg-start) 0%, var(--footer-bg-end) 100%); border-left: 1px solid var(--gold); box-shadow: -5px 0 20px rgba(0,0,0,0.3); }
        .drawer.active { right: 0; }
        .drawer-header { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid rgba(212, 175, 55, 0.3);}
        .drawer-header img { width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
        .drawer-header h3 { font-size: 16px; color: var(--gold-light); }
        .drawer-header p { font-size: 12px; color: #ccc; }
        .drawer-menu-item { display: flex; align-items: center; gap: 15px; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.1); cursor: pointer; color: #dcdcdc; transition: all 0.3s ease; }
        .drawer-menu-item:hover { color: var(--gold); padding-right: 10px; }
        .drawer-menu-item i { color: var(--gold); width: 20px; text-align: center; }
        .drawer-section-title { margin-top: 20px; font-size: 14px; color: #aaa; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
        .drawer-section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
        .drawer-newsletter-text { font-size: 12px; color: #ccc; line-height: 1.8; margin-bottom: 12px; }
        .drawer-logout { width: 100%; margin-top: 20px; background: none; border: none; border-top: 1px solid rgba(255,255,255,0.1); font-family: inherit; font-size: inherit; text-align: right; color: var(--primary); }
        .drawer-logout i { color: var(--primary); }
        .drawer-logout:hover, .drawer-logout:hover i { color: var(--primary-dark); }
        .footer-info-drawer { font-size: 12px; color: #ccc; line-height: 1.8; margin-top: 20px; }
        .footer-info-drawer h4 { color: var(--gold); margin-bottom: 5px; }
        .footer-info-drawer i { color: var(--gold); }
        .drawer-social { margin-top: 15px; display: flex; gap: 18px; }
        .drawer-social i { font-size: 36px; color: var(--gold); cursor: pointer; transition: color 0.3s, transform 0.2s; }
        .drawer-social i:hover { color: var(--gold-light); transform: translateY(-2px); }

        /* --- Search Drawer --- */
        .search-drawer { position: fixed; top: 0; bottom: 0; right: 0; left: 0; z-index: 1001; transform: translateY(-100%); transition: transform 0.3s ease; background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 20px; display: flex; flex-direction: column; }
        .search-drawer.active { transform: translateY(0); }
        .search-drawer-head { display: flex; gap: 10px; margin-bottom: 20px; flex-shrink: 0; }
        .search-drawer-input { flex: 1; display: flex; align-items: center; background: rgba(255,255,255,0.6); border-radius: 15px; padding: 12px 15px; border: 1px solid var(--glass-border); }
        .search-drawer-input input { border: none; background: none; outline: none; width: 100%; font-family: inherit; font-size: 16px; color: var(--dark); }
        .search-drawer-input i { color: var(--gray); font-size: 18px; margin-left: 10px; }
        .search-close-btn { background: var(--primary); color: white; border: none; border-radius: 12px; padding: 0 15px; font-size: 18px; cursor: pointer; }
        .search-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: 80px; }
        .search-title { font-size: 14px; color: var(--gray); margin: 20px 0 10px; }
        .search-tags { display: flex; flex-wrap: nowrap; gap: 10px; padding-bottom: 5px; }
        .search-tag { background: rgba(255,255,255,0.6); padding: 8px 15px; border-radius: 20px; font-size: 13px; color: var(--dark); border: 1px solid var(--glass-border); flex-shrink: 0; white-space: nowrap; cursor: pointer; transition: all 0.2s; }
        .search-tag:active { transform: scale(0.95); background: var(--primary); color: white; }

        /* Horizontal drag-scroll utility (stories, search tags) */
        .drag-scroll { overflow-x: auto; scroll-behavior: smooth; touch-action: pan-x; }
        .drag-scroll.dragging { scroll-behavior: auto; cursor: grabbing; user-select: none; }
        .drag-scroll.dragging * { pointer-events: none; }
        @media (hover: hover) and (pointer: fine) { .drag-scroll { cursor: grab; } }

        /* Location Selectors */
        .location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
        .glass-select { width: 100%; padding: 12px 15px; border-radius: 15px; background: rgba(255,255,255,0.6); border: 1px solid var(--glass-border); font-family: inherit; font-size: 14px; color: var(--dark); outline: none; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b2bec3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 15px center; background-size: 14px; }

        .search-splash { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--white); z-index: 3000; display: none; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
        .search-splash.active { display: flex; opacity: 1; }

        /* --- Category Grid --- */
        .category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
        .cat-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(255,255,255,0.5); border: 1px solid var(--glass-border); border-radius: 15px; padding: 15px 5px; cursor: pointer; transition: all 0.2s ease; position: relative; }
        .cat-item i { font-size: 24px; color: var(--primary); transition: color 0.2s ease; }
        .cat-item span { font-size: 12px; color: var(--dark); text-align: center; font-weight: 500; }
        .cat-item.selected { background: var(--primary); border-color: var(--primary-dark); box-shadow: 0 4px 10px rgba(239, 58, 75, 0.3); }
        .cat-item.selected i, .cat-item.selected span { color: white; }
        .cat-item .check-icon { position: absolute; top: 5px; left: 5px; color: white; font-size: 12px; display: none; }
        .cat-item.selected .check-icon { display: block; }

        .apply-filters-btn { position: absolute; bottom: 20px; left: 20px; right: 20px; background: var(--primary); color: white; border: none; padding: 15px; border-radius: 15px; font-family: inherit; font-size: 16px; font-weight: bold; cursor: pointer; box-shadow: 0 10px 20px rgba(239, 58, 75, 0.3); display: flex; align-items: center; justify-content: center; gap: 10px; }

        /* --- Cart Drawer --- */
        .cart-drawer { position: fixed; top: 0; bottom: 0; left: -350px; width: 350px; z-index: 1000; transition: left 0.3s ease; display: flex; flex-direction: column; background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-right: 1px solid var(--glass-border); box-shadow: 5px 0 20px rgba(0,0,0,0.1); }
        .cart-drawer.active { left: 0; }
        .cart-header { padding: 20px; border-bottom: 1px solid rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
        .cart-header h3 { font-size: 18px; color: var(--dark); }
        .cart-header i { font-size: 20px; color: var(--gray); cursor: pointer; }
        .vendor-tabs-swiper { width: 100%; padding: 15px 0; border-bottom: 1px solid rgba(0,0,0,0.05); flex-shrink: 0; background: rgba(255,255,255,0.3); }
        .vendor-tabs-swiper .swiper-wrapper { align-items: center; }
        .vendor-tab { padding: 8px 18px; border-radius: 20px; font-size: 13px; white-space: nowrap; cursor: pointer; background: var(--light); color: var(--dark); border: 1px solid transparent; transition: all 0.3s ease; display: inline-block; user-select: none; }
        .vendor-tab.active { background: var(--primary); color: white; border-color: var(--primary-dark); transform: scale(1.05); box-shadow: 0 4px 10px rgba(239, 58, 75, 0.2); }
        .cart-items { flex: 1; padding: 15px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
        .cart-item { display: flex; flex-direction: column; gap: 10px; background: rgba(255,255,255,0.6); padding: 12px; border-radius: 12px; margin-bottom: 15px; border: 1px solid var(--glass-border); }
        .cart-item-top { display: flex; gap: 12px; align-items: flex-start; }
        .cart-item img { width: 70px; height: 70px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
        .cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
        .cart-item-info h4 { font-size: 14px; color: var(--dark); }
        .cart-item-cat { font-size: 11px; color: var(--gray); background: var(--light); padding: 2px 8px; border-radius: 8px; width: fit-content; }
        .cart-remove-btn { color: #b2bec3; cursor: pointer; font-size: 16px; transition: color 0.2s; padding: 5px; }
        .cart-remove-btn:hover { color: var(--primary); }
        .cart-item-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px dashed rgba(0,0,0,0.1); }
        .cart-qty-selector { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 10px; padding: 4px; border: 1px solid var(--glass-border); }
        .qty-btn { width: 28px; height: 28px; background: var(--light); border: none; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--dark); font-weight: bold; font-size: 14px; transition: background 0.2s; }
        .qty-btn:hover { background: var(--primary); color: white; }
        .qty-num { font-size: 14px; font-weight: bold; min-width: 24px; text-align: center; }
        .cart-item-price { font-size: 16px; font-weight: 800; color: var(--primary); }
        .cart-footer { padding: 20px; border-top: 1px solid rgba(0,0,0,0.05); flex-shrink: 0; background: rgba(255,255,255,0.4); }
        .cart-total { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 16px; font-weight: bold; color: var(--dark); }
        .cart-checkout-btn { width: 100%; background: var(--primary); color: white; border: none; padding: 15px; border-radius: 12px; font-family: inherit; font-size: 16px; font-weight: bold; cursor: pointer; transition: background 0.3s; }
        .cart-checkout-btn:hover { background: var(--primary-dark); }

        @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

        /* --- Fancybox (product gallery lightbox) --- */
        .fancybox__container { --f-button-hover-bg: var(--primary); --f-button-active-bg: var(--primary-dark); --f-spinner-color-2: var(--primary); font-family: 'Vazirmatn', sans-serif; }
        .fancybox__caption { font-family: 'Vazirmatn', sans-serif; font-size: 14px; line-height: 1.9; }
        .fancybox__counter { direction: ltr; }

        /* --- Breadcrumb bar (top of the product page) --- */
        .pd-crumb-bar { display: flex; align-items: center; gap: 10px; background: var(--white); padding: 10px 15px; border-bottom: 1px solid rgba(0,0,0,0.05); }
        .pd-icon-btn { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: var(--light); color: var(--dark); border: none; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; }
        .pd-icon-btn:hover { background: var(--primary); color: #fff; }
        .pd-crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--gray); white-space: nowrap; }
        .pd-crumbs a { color: var(--gray); }
        .pd-crumbs a:hover { color: var(--primary); }
        .pd-crumbs i { font-size: 9px; color: #c8cfd3; }
        .pd-crumbs b { color: var(--dark); font-weight: 500; }

        /* --- Product Top: gallery + summary --- */
        .pd-top { background: var(--white); padding: 15px; display: grid; grid-template-columns: 1fr; gap: 20px; animation: fadeInUp 0.45s ease; }
        .pd-top > div { min-width: 0; } /* keep long specs from stretching the columns */
        .pd-gallery-main { position: relative; border-radius: 18px; overflow: hidden; background: var(--light); cursor: zoom-in; }
        .pd-gallery-main img { width: 100%; height: 300px; object-fit: cover; }
        .pd-badges { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
        .pd-badge { background: var(--primary); color: #fff; font-size: 11px; font-weight: bold; padding: 5px 11px; border-radius: 20px; }
        .pd-badge.new { background: #2e86de; }
        .pd-badge.best { background: var(--secondary); color: var(--footer-bg-start); }
        .pd-badge.orig { background: #27ae60; }
        .pd-gallery-actions { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; flex-direction: column; gap: 8px; }
        .pd-round-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: var(--dark); border: none; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.12); transition: transform 0.2s, color 0.2s; }
        .pd-round-btn:hover { transform: scale(1.08); color: var(--primary); }
        .pd-round-btn.active { color: var(--primary); }
        .pd-zoom-hint { position: absolute; bottom: 12px; left: 12px; background: rgba(0,0,0,0.5); color: #fff; font-size: 11px; padding: 5px 11px; border-radius: 20px; display: flex; align-items: center; gap: 6px; }
        .pd-out-overlay { position: absolute; inset: 0; background: rgba(255,255,255,0.72); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: bold; color: var(--primary); }
        .pd-thumbs { display: flex; gap: 8px; margin-top: 10px; }
        .pd-thumb { width: 62px; height: 62px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: var(--light); cursor: pointer; flex-shrink: 0; transition: border-color 0.2s; }
        .pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
        .pd-thumb.active { border-color: var(--primary); }

        .pd-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--gray); }
        .pd-brand-row b { color: var(--primary); font-weight: 500; }
        .pd-title { font-size: 18px; font-weight: 800; line-height: 1.9; color: var(--dark); margin-top: 8px; }
        .pd-title-en { font-size: 12px; color: var(--gray); direction: ltr; text-align: right; margin-top: 5px; }
        .pd-stat-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
        .pd-stat { background: var(--light); border-radius: 10px; padding: 6px 11px; font-size: 11px; color: var(--gray); display: flex; align-items: center; gap: 6px; }
        .pd-stat b { color: var(--dark); font-size: 12px; }
        .pd-stat i { color: var(--primary); font-size: 11px; }
        .pd-stat.rate i { color: var(--secondary); }

        .pd-shop-card { display: flex; align-items: center; gap: 11px; background: var(--light); border-radius: 15px; padding: 10px 12px; margin-top: 15px; }
        .pd-shop-card img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; border: 2px solid var(--white); flex-shrink: 0; }
        .pd-shop-info { flex: 1; min-width: 0; }
        .pd-shop-name { font-size: 13px; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: 5px; }
        .pd-shop-name .verify { color: #2e86de; font-size: 12px; }
        .pd-shop-meta { font-size: 11px; color: var(--gray); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 10px; }
        .pd-shop-meta i { color: var(--secondary); font-size: 10px; }
        .pd-shop-go { background: var(--white); color: var(--primary); border: none; border-radius: 10px; padding: 9px 13px; font-family: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; transition: background 0.2s, color 0.2s; }
        .pd-shop-go:hover { background: var(--primary); color: #fff; }

        /* --- Variants (color / warranty) --- */
        .pd-block-title { font-size: 13px; font-weight: 700; color: var(--dark); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
        .pd-block-title i { color: var(--primary); font-size: 12px; }
        .pd-block-title small { font-weight: 500; color: var(--gray); font-size: 11px; }
        .pd-color-row { display: flex; flex-wrap: wrap; gap: 10px; }
        .pd-color { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1.5px solid #e4e8ea; border-radius: 12px; padding: 7px 12px; font-size: 12px; color: var(--dark); cursor: pointer; transition: all 0.2s; }
        .pd-color .dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
        .pd-color.active { border-color: var(--primary); background: rgba(239, 58, 75, 0.06); color: var(--primary); font-weight: bold; }
        .pd-color.disabled { opacity: 0.45; cursor: not-allowed; }
        .pd-color.disabled span.name { text-decoration: line-through; }
        .pd-opt-row { display: flex; flex-direction: column; gap: 8px; }
        .pd-opt { display: flex; align-items: flex-start; gap: 10px; background: var(--white); border: 1.5px solid #e4e8ea; border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: all 0.2s; }
        .pd-opt.active { border-color: var(--primary); background: rgba(239, 58, 75, 0.05); }
        .pd-opt > i { color: var(--primary); font-size: 14px; margin-top: 2px; }
        .pd-opt div { flex: 1; min-width: 0; }
        .pd-opt h5 { font-size: 12px; color: var(--dark); }
        .pd-opt p { font-size: 11px; color: var(--gray); margin-top: 4px; line-height: 1.7; }
        .pd-opt .delta { font-size: 11px; color: var(--primary); font-weight: bold; white-space: nowrap; }

        /* --- Key highlights --- */
        .pd-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
        .pd-hl { background: var(--light); border-radius: 12px; padding: 9px 11px; }
        .pd-hl span { display: block; font-size: 11px; color: var(--gray); }
        .pd-hl b { display: block; font-size: 12px; color: var(--dark); font-weight: 600; margin-top: 4px; line-height: 1.6; }

        /* --- Buy box --- */
        .pd-buybox { margin-top: 18px; padding: 14px; border: 1px solid rgba(0,0,0,0.07); border-radius: 18px; background: var(--white); box-shadow: 0 6px 20px rgba(0,0,0,0.05); }
        .pd-price-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
        .pd-price { font-size: 22px; font-weight: 800; color: var(--dark); }
        .pd-price small { font-size: 12px; font-weight: 500; color: var(--gray); }
        .pd-price-left { text-align: left; }
        .pd-old { font-size: 13px; color: var(--gray); text-decoration: line-through; display: block; margin-bottom: 5px; }
        .pd-disc-tag { background: var(--primary); color: #fff; font-size: 12px; font-weight: bold; border-radius: 20px; padding: 4px 10px; }
        .pd-save { font-size: 12px; color: #27ae60; margin-top: 8px; display: flex; align-items: center; gap: 6px; }
        .pd-stock-line { font-size: 12px; margin-top: 10px; display: flex; align-items: center; gap: 7px; }
        .pd-stock-line.ok { color: #27ae60; }
        .pd-stock-line.low { color: var(--primary); }
        .pd-stock-line.out { color: var(--gray); }
        .pd-qty-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
        .pd-qty { display: flex; align-items: center; gap: 12px; background: var(--light); border-radius: 12px; padding: 5px; }
        .pd-qty button { width: 30px; height: 30px; border: none; border-radius: 8px; background: var(--white); color: var(--dark); font-size: 15px; font-weight: bold; cursor: pointer; transition: background 0.2s, color 0.2s; }
        .pd-qty button:hover:not(:disabled) { background: var(--primary); color: #fff; }
        .pd-qty button:disabled { color: #c8cfd3; cursor: not-allowed; }
        .pd-qty span { min-width: 26px; text-align: center; font-size: 14px; font-weight: bold; }
        .pd-total { font-size: 12px; color: var(--gray); }
        .pd-total b { display: block; font-size: 15px; color: var(--dark); margin-top: 4px; }
        .pd-buy-actions { display: flex; gap: 10px; margin-top: 14px; }
        .pd-btn-primary { flex: 1; background: var(--primary); color: #fff; border: none; border-radius: 14px; padding: 14px; font-family: inherit; font-size: 15px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.3s; }
        .pd-btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
        .pd-btn-primary:disabled { background: #dfe3e6; color: var(--gray); cursor: not-allowed; }
        .pd-btn-ghost { background: var(--light); color: var(--dark); border: none; border-radius: 14px; padding: 0 17px; font-family: inherit; font-size: 14px; cursor: pointer; transition: background 0.3s, color 0.3s; }
        .pd-btn-ghost:hover { background: var(--primary); color: #fff; }
        .pd-wallet-note { font-size: 11px; color: var(--gray); line-height: 1.8; margin-top: 11px; display: flex; align-items: flex-start; gap: 7px; }
        .pd-wallet-note i { color: var(--gold); margin-top: 3px; }

        /* --- Services (warranty, return, delivery...) --- */
        .pd-services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
        .pd-service { display: flex; align-items: flex-start; gap: 10px; background: var(--light); border-radius: 14px; padding: 11px; }
        .pd-service > i { width: 30px; height: 30px; border-radius: 9px; background: var(--white); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
        .pd-service h5 { font-size: 12px; color: var(--dark); }
        .pd-service p { font-size: 11px; color: var(--gray); margin-top: 3px; line-height: 1.6; }

        /* --- Sticky section tabs --- */
        .pd-tabs { position: sticky; top: var(--header-h, 60px); z-index: 50; display: flex; gap: 8px; padding: 10px 15px; background: var(--white); border-top: 1px solid rgba(0,0,0,0.05); border-bottom: 1px solid rgba(0,0,0,0.07); }
        .pd-tab { background: var(--light); border: 1px solid transparent; font-family: inherit; font-size: 13px; color: var(--dark); padding: 8px 14px; border-radius: 20px; cursor: pointer; white-space: nowrap; flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
        .pd-tab i { font-size: 11px; }
        .pd-tab.active { background: rgba(239, 58, 75, 0.1); color: var(--primary); border-color: var(--primary); font-weight: bold; }

        /* --- Shared content wrapper for the lower sections --- */
        .pd-wrap { padding: 0 15px; }

        /* --- Specifications --- */
        .pd-spec-group { background: var(--white); border-radius: 15px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 12px; }
        .pd-spec-head { padding: 12px 14px; background: var(--light); font-size: 13px; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: 8px; }
        .pd-spec-head i { color: var(--primary); font-size: 12px; }
        .pd-spec-row { display: flex; gap: 12px; padding: 11px 14px; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 12px; }
        .pd-spec-row:last-child { border-bottom: none; }
        .pd-spec-row span { width: 40%; flex-shrink: 0; color: var(--gray); line-height: 1.8; }
        .pd-spec-row b { flex: 1; min-width: 0; color: var(--dark); font-weight: 500; line-height: 1.8; word-break: break-word; }

        /* --- About / description --- */
        .pd-about { background: var(--white); border-radius: 15px; padding: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
        .pd-collapse { position: relative; max-height: 190px; overflow: hidden; transition: max-height 0.45s ease; }
        .pd-collapse.open { max-height: 3000px; }
        .pd-collapse:not(.open)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(rgba(255,255,255,0), var(--white)); }
        .pd-about p { font-size: 13px; color: #555; line-height: 2.1; margin-bottom: 12px; }
        .pd-about h4 { font-size: 13px; color: var(--dark); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
        .pd-about h4 i { color: var(--primary); font-size: 12px; }
        .pd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
        .pd-tag { font-size: 12px; background: var(--light); color: var(--dark); padding: 7px 12px; border-radius: 20px; display: flex; align-items: center; gap: 6px; }
        .pd-tag i { color: var(--primary); font-size: 11px; }
        .pd-toggle-btn { width: 100%; margin-top: 15px; background: none; border: 1px dashed rgba(0,0,0,0.15); border-radius: 12px; padding: 11px; font-family: inherit; font-size: 13px; color: var(--primary); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
        .pd-toggle-btn i { transition: transform 0.3s; }
        .pd-toggle-btn.open i { transform: rotate(180deg); }

        /* --- FAQ --- */
        .pd-faq { display: flex; flex-direction: column; gap: 10px; }
        .pd-faq-item { background: var(--white); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
        .pd-faq-q { padding: 13px 14px; font-size: 13px; font-weight: 600; color: var(--dark); display: flex; align-items: center; gap: 10px; cursor: pointer; }
        .pd-faq-q > i { color: var(--primary); font-size: 12px; }
        .pd-faq-q .chev { margin-right: auto; color: var(--gray); font-size: 12px; transition: transform 0.3s; }
        .pd-faq-item.open .pd-faq-q .chev { transform: rotate(180deg); }
        .pd-faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
        .pd-faq-item.open .pd-faq-a { max-height: 500px; }
        .pd-faq-a p { padding: 0 14px 14px; font-size: 12px; color: #555; line-height: 2; }

        /* --- Reviews --- */
        .pd-rate-summary { display: flex; align-items: center; gap: 15px; background: var(--white); border-radius: 15px; padding: 15px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
        .pd-rate-score { text-align: center; flex-shrink: 0; }
        .pd-rate-score b { display: block; font-size: 32px; color: var(--dark); }
        .pd-rate-score .stars { color: var(--secondary); font-size: 12px; margin-top: 4px; }
        .pd-rate-score span { display: block; font-size: 11px; color: var(--gray); margin-top: 5px; }
        .pd-rate-bars { flex: 1; min-width: 0; }
        .pd-rate-bar-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--gray); margin-bottom: 6px; }
        .pd-rate-bar-row:last-child { margin-bottom: 0; }
        .pd-rate-bar { flex: 1; height: 6px; border-radius: 4px; background: var(--light); overflow: hidden; }
        .pd-rate-bar i { display: block; height: 100%; border-radius: 4px; background: var(--secondary); }
        .pd-review-list { display: grid; gap: 12px; }
        .pd-review { background: var(--white); border-radius: 15px; padding: 14px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
        .pd-review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
        .pd-review-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
        .pd-review-head h4 { font-size: 13px; color: var(--dark); }
        .pd-review-head span { font-size: 11px; color: var(--gray); }
        .pd-review-stars { margin-right: auto; color: var(--secondary); font-size: 11px; }
        .pd-verified { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: #27ae60; background: rgba(39, 174, 96, 0.1); padding: 3px 8px; border-radius: 8px; margin-top: 4px; }
        .pd-review-text { font-size: 13px; color: #555; line-height: 2; }
        .pd-pc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 11px; }
        .pd-pc ul { list-style: none; }
        .pd-pc li { font-size: 11px; color: var(--gray); line-height: 1.8; display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; }
        .pd-pc li i { font-size: 10px; margin-top: 5px; }
        .pd-pc .pros i { color: #27ae60; }
        .pd-pc .cons i { color: var(--primary); }
        .pd-review-foot { display: flex; align-items: center; gap: 15px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed rgba(0,0,0,0.08); font-size: 11px; color: var(--gray); }
        .pd-review-foot button { background: none; border: none; font-family: inherit; font-size: 11px; color: var(--gray); cursor: pointer; display: flex; align-items: center; gap: 5px; }
        .pd-review-foot button:hover { color: var(--primary); }

        /* --- Product modals: review form and all reviews --- */
        .pd-modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 18px; direction: rtl; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility .25s ease; }
        .pd-modal.open { opacity: 1; visibility: visible; pointer-events: auto; }
        .pd-modal-backdrop { position: absolute; inset: 0; background: rgba(20, 27, 31, .68); backdrop-filter: blur(5px); }
        .pd-modal-dialog { position: relative; width: min(680px, 100%); max-height: min(90vh, 820px); overflow-y: auto; background: var(--white); border-radius: 24px; box-shadow: 0 24px 70px rgba(0,0,0,.28); transform: translateY(18px) scale(.98); transition: transform .25s ease; }
        .pd-modal.open .pd-modal-dialog { transform: translateY(0) scale(1); }
        .pd-all-reviews-dialog { width: min(820px, 100%); }
        .pd-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; background: linear-gradient(135deg, rgba(239,58,75,.10), rgba(249,168,37,.12)); border-bottom: 1px solid rgba(0,0,0,.06); }
        .pd-modal-kicker { display: flex; align-items: center; gap: 6px; color: var(--primary); font-size: 11px; font-weight: 700; margin-bottom: 7px; }
        .pd-modal-kicker i { font-size: 12px; }
        .pd-modal-head h3 { color: var(--dark); font-size: 18px; line-height: 1.6; }
        .pd-modal-close { width: 36px; height: 36px; border: 0; border-radius: 12px; background: rgba(255,255,255,.82); color: var(--gray); cursor: pointer; font-size: 16px; transition: color .2s, background .2s; flex-shrink: 0; }
        .pd-modal-close:hover { color: var(--primary); background: var(--white); }
        .pd-review-dialog { display: flex; flex-direction: column; overflow: hidden; }
        .pd-review-dialog .pd-modal-head { flex: 0 0 auto; }
        .pd-review-form { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; overflow: hidden; }
        .pd-review-form-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 20px 24px 12px; }
        .pd-review-form-footer { flex: 0 0 auto; padding: 0 24px 20px; background: var(--white); border-top: 1px solid rgba(0,0,0,.06); box-shadow: 0 -10px 24px rgba(20,27,31,.06); }
        .pd-review-product { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid rgba(0,0,0,.07); border-radius: 15px; background: var(--light); margin-bottom: 18px; }
        .pd-review-product img { width: 54px; height: 54px; object-fit: cover; border-radius: 12px; background: var(--white); }
        .pd-review-product div { min-width: 0; }
        .pd-review-product b { display: block; color: var(--dark); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .pd-review-product span { display: block; color: var(--gray); font-size: 11px; margin-top: 5px; line-height: 1.7; }
        .pd-review-field { margin-top: 14px; }
        .pd-review-field label { display: block; color: var(--dark); font-size: 12px; font-weight: 700; margin-bottom: 7px; }
        .pd-review-field label small { color: var(--gray); font-size: 10px; font-weight: 400; }
        .pd-review-field input, .pd-review-field textarea { width: 100%; border: 1px solid #e1e6e9; border-radius: 12px; background: #fbfcfd; color: var(--dark); padding: 11px 12px; font: inherit; font-size: 12px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
        .pd-review-field input:focus, .pd-review-field textarea:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(239,58,75,.10); }
        .pd-review-field textarea { min-height: 110px; resize: vertical; line-height: 1.9; }
        .pd-star-picker { display: flex; align-items: center; gap: 5px; direction: ltr; }
        .pd-star-picker button { width: 34px; height: 34px; border: 0; border-radius: 10px; color: #d3d9de; background: #f5f6f8; cursor: pointer; font-size: 17px; transition: color .2s, background .2s, transform .2s; }
        .pd-star-picker button:hover { transform: translateY(-2px); color: var(--secondary); }
        .pd-star-picker button.active { color: var(--secondary); background: rgba(249,168,37,.13); }
        .pd-review-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
        .pd-review-two-col textarea { min-height: 82px; }
        .pd-modal-error { min-height: 20px; color: #c0392b; font-size: 11px; line-height: 1.8; margin-top: 10px; }
        .pd-modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 6px; }
        .pd-modal-primary, .pd-modal-secondary { border: 0; border-radius: 12px; padding: 11px 17px; font: inherit; font-size: 12px; cursor: pointer; transition: transform .2s, background .2s, opacity .2s; }
        .pd-modal-primary { background: linear-gradient(135deg, var(--primary), #d63041); color: #fff; box-shadow: 0 8px 18px rgba(239,58,75,.22); }
        .pd-modal-primary:hover:not(:disabled) { transform: translateY(-2px); }
        .pd-modal-primary:disabled { opacity: .65; cursor: wait; }
        .pd-modal-secondary { background: var(--light); color: var(--gray); }
        .pd-modal-secondary:hover { background: #e9edef; color: var(--dark); }
        .pd-all-reviews-body { padding: 20px 24px 24px; min-height: 130px; }
        .pd-all-reviews-list { display: grid; gap: 12px; }
        .pd-all-reviews-list .pd-review { box-shadow: none; border: 1px solid rgba(0,0,0,.07); }
        .pd-modal-loading, .pd-modal-empty { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 130px; color: var(--gray); font-size: 12px; text-align: center; flex-direction: column; }
        .pd-modal-empty i { color: #c8cfd3; font-size: 32px; }
        .pd-modal-empty.error i { color: var(--primary); }
        .pd-modal-spinner { width: 24px; height: 24px; border: 3px solid rgba(239,58,75,.18); border-top-color: var(--primary); border-radius: 50%; animation: pd-spin .8s linear infinite; }
        .pd-modal-spinner.small { display: inline-block; width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; margin-left: 6px; }
        @keyframes pd-spin { to { transform: rotate(360deg); } }
        .pd-toast { position: fixed; left: 50%; bottom: 88px; z-index: 700; display: flex; align-items: center; gap: 8px; max-width: min(470px, calc(100vw - 30px)); padding: 12px 16px; border-radius: 13px; color: #fff; font-size: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.22); opacity: 0; transform: translate(-50%, 12px); transition: opacity .25s, transform .25s; }
        .pd-toast.show { opacity: 1; transform: translate(-50%, 0); }
        .pd-toast.success { background: #218c5a; }
        .pd-toast.error { background: #c0392b; }

        /* --- Sticky buy bar (mobile & tablet) --- */
        .pd-buybar { position: fixed; bottom: 70px; left: 50%; width: 100%; max-width: 600px; z-index: 99; transform: translateX(-50%) translateY(130%); transition: transform 0.3s ease; display: flex; align-items: center; gap: 12px; padding: 12px 15px; background: var(--white); border-radius: 18px 18px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,0.12); }
        .pd-buybar.show { transform: translateX(-50%) translateY(0); }
        .pd-buybar .bar-price { flex: 1; min-width: 0; }
        .pd-buybar .bar-price b { display: block; font-size: 16px; font-weight: 800; color: var(--dark); }
        .pd-buybar .bar-price span { font-size: 11px; color: var(--gray); }
        .pd-buybar .pd-btn-primary { flex: 0 0 auto; padding: 12px 20px; font-size: 14px; }

        /* --- Section Styles --- */
        .section { padding: 25px 0; }
        .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 0 15px; }
        .section-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
        .section-title i { color: var(--primary); }
        .section-more { font-size: 13px; color: var(--primary); }
        .swiper-carousel { padding: 0 15px !important; padding-right: 0 !important; }
        .swiper-carousel .swiper-slide { width: 85%; margin-left: 15px !important; }

        /* Cards (similar products & other products of this shop) */
        .prod-card { background: var(--white); border-radius: 15px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); height: 100%; position: relative; cursor: pointer; transition: transform 0.2s; }
        .prod-card:hover { transform: translateY(-3px); }
        .prod-img { width: 100%; height: 180px; object-fit: cover; }
        .prod-info { padding: 12px; }
        .prod-name { font-size: 14px; font-weight: 500; margin-bottom: 8px; height: 40px; overflow: hidden; }
        .prod-price { font-size: 15px; font-weight: 800; color: var(--primary); }
        .prod-old-price { font-size: 12px; color: var(--gray); text-decoration: line-through; margin-right: 5px; }
        .prod-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
        .prod-cat { font-size: 10px; color: var(--gray); background: var(--light); padding: 3px 8px; border-radius: 10px; }
        .prod-rate { font-size: 11px; color: var(--secondary); font-weight: bold; display: flex; align-items: center; gap: 3px; }
        .prod-badge { position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--primary); color: #fff; padding: 5px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; }
        .prod-badge.current { background: var(--secondary); color: var(--footer-bg-start); }

        /* --- Desktop Footer & Wave --- */
        .footer-wave { display: none; line-height: 0; }
        .footer-wave svg { width: 100%; height: 80px; display: block; }
        footer { display: none; background: linear-gradient(135deg, var(--footer-bg-start) 0%, var(--footer-bg-end) 100%); color: #ccc; padding: 0 5% 40px; }
        footer .footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 40px; max-width: 1200px; margin: 0 auto; padding-top: 20px; }
        footer h4 { color: var(--gold); font-size: 18px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
        footer h4::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
        footer ul { list-style: none; }
        footer ul li { margin-bottom: 12px; font-size: 14px; color: #dcdcdc; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: color 0.3s, padding-right 0.3s; }
        footer ul li:hover { color: var(--gold); padding-right: 5px; }
        footer ul li i { color: var(--gold); width: 16px; text-align: center; }
        .footer-contact li { align-items: flex-start; }
        .newsletter-form { display: flex; background: rgba(255,255,255,0.1); border-radius: 10px; padding: 5px; margin-bottom: 20px; border: 1px solid rgba(212, 175, 55, 0.3); }
        .newsletter-form input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: white; padding: 10px; font-family: inherit; font-size: 14px; }
        .newsletter-form input::placeholder { color: #aaa; }
        .newsletter-form button { flex-shrink: 0; background: var(--gold); color: var(--footer-bg-start); border: none; padding: 0 15px; border-radius: 8px; cursor: pointer; font-family: inherit; font-weight: bold; transition: background 0.3s; }
        .newsletter-form button:hover { background: var(--gold-light); }
        .footer-badges { display: flex; gap: 15px; margin-top: 20px; }
        .badge-placeholder { width: 90px; height: 100px; background: white; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
        .badge-placeholder i { font-size: 30px; color: #555; margin-bottom: 5px; }
        .badge-placeholder span { font-size: 10px; color: #333; font-weight: bold; }
        .footer-copyright { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; color: #888; }

        /* Bottom Navigation */
        .bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 600px; background: linear-gradient(135deg, var(--footer-bg-start) 0%, var(--footer-bg-end) 100%); display: flex; justify-content: space-around; padding: 10px 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.2); z-index: 100; }
        .nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #dcdcdc; cursor: pointer; }
        .nav-item i { font-size: 20px; }
        .nav-item span { font-size: 10px; }
        .nav-item.active { color: var(--gold); }

        @media (min-width: 768px) {
            body { max-width: 100%; }
            .swiper-carousel .swiper-slide { width: 250px; }
            header { max-width: 100%; padding: 15px 5%; }
            .section-header { padding-left: 5%; padding-right: 5%; }
            .section { padding: 30px 0; }
            .category-grid { grid-template-columns: repeat(6, 1fr); }
            .pd-crumb-bar { padding: 12px 5%; }
            .pd-top { grid-template-columns: 1fr 1fr; gap: 30px; padding: 25px 5%; align-items: start; }
            .pd-gallery-main img { height: 400px; }
            .pd-tabs { padding: 10px 5%; }
            .pd-wrap { padding: 0 5%; }
            .pd-review-list { grid-template-columns: 1fr 1fr; }
        }

        /* Real desktop only: horizontal top menu replaces the drawer, bottom-nav
           gives way to the full footer. Tablet keeps the mobile-style bottom-nav + drawer. */
        @media (min-width: 1024px) {
            .menu-btn { display: none; }
            .desktop-nav { display: flex; }
            .user-menu-wrap { display: block; }
            body { padding-bottom: 0; }
            .bottom-nav { display: none; }
            .footer-wave, footer { display: block; }
            .pd-buybar { display: none; }
            .pd-gallery { position: sticky; top: calc(var(--header-h, 60px) + 20px); }
        }

        @media (max-width: 767px) {
            .pd-modal { align-items: flex-end; padding: 0; }
            .pd-modal-dialog { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; }
            .pd-modal-head { padding: 19px 17px 15px; }
            .pd-modal-head h3 { font-size: 16px; }
            .pd-review-form-scroll { padding: 16px 17px 10px; }
            .pd-review-form-footer { padding: 0 17px calc(16px + env(safe-area-inset-bottom)); }
            .pd-all-reviews-body { padding: 16px 17px 20px; }
            .pd-review-two-col { grid-template-columns: 1fr; gap: 0; }
            .pd-review-dialog .pd-modal-actions { padding-top: 10px; }
            .pd-toast { bottom: 82px; }

            /* «مشاهده همه دیدگاه‌ها» در موبایل یک صفحه کامل مستقل است. */
            #pdAllReviewsModal {
                align-items: stretch;
            }

            #pdAllReviewsModal .pd-all-reviews-dialog {
                width: 100vw;
                height: 100vh;
                height: 100dvh;
                max-height: none;
                border-radius: 0;
                display: flex;
                flex-direction: column;
                overflow: hidden;
            }

            #pdAllReviewsModal .pd-modal-head {
                flex: 0 0 auto;
                padding-top: calc(19px + env(safe-area-inset-top));
            }

            #pdAllReviewsModal .pd-all-reviews-body {
                flex: 1 1 auto;
                min-height: 0;
                overflow-y: auto;
                overscroll-behavior: contain;
                -webkit-overflow-scrolling: touch;
                padding-bottom: calc(20px + env(safe-area-inset-bottom));
            }
        }
