/* ============================================
   Matjari Product Page Styles (Modernized Responsive Grid & Logical RTL)
   ============================================ */

/* Global Box Sizing Safety for Product Page */
.product-page,
.product-page *,
.product-page *::before,
.product-page *::after {
    box-sizing: border-box;
}

/* ============================================
   UPSELL POPUP STYLES — PREMIUM REDESIGN
   ============================================ */

/* Overlay */
.upsell-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(8px) saturate(1.5);
    -webkit-backdrop-filter: blur(8px) saturate(1.5);
    z-index: 9900;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.upsell-overlay.active {
    display: flex;
    animation: upsellFadeIn 0.3s ease forwards;
}

@keyframes upsellFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- Main Modal ---- */
.upsell-modal {
    background: #fff;
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.12),
        0 32px 80px rgba(2, 6, 23, 0.45),
        0 8px 24px rgba(2, 6, 23, 0.2);
    text-align: center;
    animation: upsellBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}
.upsell-modal::-webkit-scrollbar { display: none; }

@keyframes upsellBounceIn {
    0%   { transform: translateY(60px) scale(0.88); opacity: 0; }
    60%  { transform: translateY(-8px) scale(1.02); opacity: 1; }
    80%  { transform: translateY(4px)  scale(0.99); }
    100% { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* ---- Decorative Header Strip ---- */
.upsell-header-strip {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 40%, #0ea5e9 100%);
    border-radius: 24px 24px 0 0;
    padding: 22px 20px 18px;
    position: relative;
    overflow: hidden;
}
.upsell-header-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}
.upsell-header-strip::after {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}

/* ---- Close Button (inside header) ---- */
.upsell-close-x {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 15px;
    color: #fff;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.upsell-close-x:hover {
    background: rgba(255,255,255,0.32);
    transform: rotate(90deg);
}

/* ---- Flash Badge ---- */
.upsell-flash-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: upsellPulse 2s ease-in-out infinite;
}
@keyframes upsellPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.35); }
    50%       { box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}
.upsell-flash-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fbbf24;
    animation: upsellDotBlink 1s ease-in-out infinite;
}
@keyframes upsellDotBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.6); }
}

/* ---- Header Title (inside strip) ---- */
.upsell-header-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}
.upsell-header-sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.78);
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ---- Modal Body ---- */
.upsell-body {
    padding: 22px 20px 24px;
}

/* ---- Product Card inside popup ---- */
.upsell-product-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 18px;
    text-align: right;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.upsell-product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124,58,237,0.04) 0%, transparent 60%);
    pointer-events: none;
}
.upsell-product-card:hover {
    border-color: rgba(124,58,237,0.3);
    box-shadow: 0 4px 16px rgba(124,58,237,0.1);
}

/* ---- Product Image ---- */
.upsell-img-wrap {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(124,58,237,0.15);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
}
.upsell-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.upsell-img-wrap:hover .upsell-img {
    transform: scale(1.06);
}
.upsell-img-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%);
    pointer-events: none;
}

/* ---- Product Info ---- */
.upsell-product-info {
    flex: 1;
    min-width: 0;
}
.upsell-product-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.92rem;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.upsell-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.upsell-old-price {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.82rem;
}
.upsell-current-price {
    font-size: 1.25rem;
    font-weight: 900;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.upsell-save-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
}

/* ---- Trust Row ---- */
.upsell-trust-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.upsell-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    padding: 4px 10px;
    font-weight: 600;
}

/* ---- Buttons ---- */
.upsell-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* YES button */
.upsell-btn-yes {
    position: relative;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #6366f1 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow:
        0 4px 20px rgba(124,58,237,0.45),
        inset 0 1px 0 rgba(255,255,255,0.2);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    letter-spacing: 0.01em;
}
.upsell-btn-yes::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}
.upsell-btn-yes::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}
.upsell-btn-yes:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        0 8px 28px rgba(124,58,237,0.55),
        inset 0 1px 0 rgba(255,255,255,0.2);
}
.upsell-btn-yes:hover::after {
    width: 300px;
    height: 300px;
}
.upsell-btn-yes:active {
    transform: translateY(0) scale(0.99);
}
.upsell-btn-yes:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.upsell-yes-text { position: relative; z-index: 1; }
.upsell-yes-loading { position: relative; z-index: 1; }

/* NO button */
.upsell-btn-no {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
    width: 100%;
    letter-spacing: 0.01em;
}
.upsell-btn-no:hover {
    color: #475569;
}

/* ---- Confetti particles ---- */
.upsell-confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    pointer-events: none;
    animation: upsellConfettiFall 1.2s ease-out forwards;
}
@keyframes upsellConfettiFall {
    0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(80px) rotate(360deg); opacity: 0; }
}

/* Mobile: Premium Bottom Sheet */
@media (max-width: 520px) {
    .upsell-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .upsell-modal {
        border-radius: 24px 24px 0 0;
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        animation: upsellSheetUp 0.4s cubic-bezier(0.32, 0.72, 0, 1) forwards;
    }
    .upsell-header-strip {
        border-radius: 24px 24px 0 0;
    }
    @keyframes upsellSheetUp {
        from { transform: translateY(100%); opacity: 1; }
        to   { transform: translateY(0); opacity: 1; }
    }
    .upsell-img-wrap {
        width: 76px;
        height: 76px;
    }
    .upsell-header-title { font-size: 1.05rem; }
    .upsell-body { padding: 18px 16px 28px; }
    /* Drag handle for bottom sheet */
    .upsell-modal::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: rgba(0,0,0,0.15);
        border-radius: 2px;
        margin: -6px auto 14px;
        flex-shrink: 0;
    }
}



/* ---- Product Page Layout ---- */
.product-page {
    padding-block: var(--space-6) var(--space-16);
    width: 100%;
    /* NOTE: overflow-x:hidden is intentionally removed here — it breaks position:sticky on child elements */
    overflow-x: clip; /* clip doesn't create a scroll container, so sticky still works */
}

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(1.5rem, 3.5vw, 2.5rem);
    align-items: start;
    width: 100%;
    max-width: 100%;
    margin-block-end: var(--space-12);
    /* Ensure the grid itself doesn't create overflow issues */
    overflow: visible;
}

/* ---- Gallery (Sticky on Desktop) ---- */
.product-gallery { 
    position: -webkit-sticky;
    position: sticky; 
    top: calc(var(--header-height, 84px) + 12px); 
    align-self: start; 
    z-index: 10;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.gallery-main {
    position: relative;
    width: 100%;
    max-width: 470px; /* مصغرة غير شوي باش تبقى الصورة فخمة ومعمارة وبنفس الوقت مجمدة مع المعرض */
    aspect-ratio: 1 / 1;
    margin-inline: auto;
    margin-block-end: 12px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gray-50);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 1) {
    .gallery-main::before {
        content: '';
        display: block;
        padding-top: 100%;
    }
    .gallery-main-img {
        position: absolute;
        inset: 0;
    }
}

.gallery-main-img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.25s ease;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(3rem, 6vw, 5rem);
}

.gallery-badge {
    position: absolute;
    top: var(--space-4);
    inset-inline-end: var(--space-4);
    background: var(--danger);
    color: var(--white);
    padding-block: var(--space-2);
    padding-inline: var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.gallery-badge-primary { 
    background: var(--primary); 
    top: auto; 
    bottom: var(--space-4); 
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: visible;
    padding-block: 4px var(--space-2);
    padding-inline: 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
    width: 100%;
    max-width: 470px;
    margin-inline: auto;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 881px) {
    .gallery-thumbs {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
}

.gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}
.gallery-thumbs::-webkit-scrollbar-track {
    background: transparent;
}
.gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.gallery-thumb {
    width: clamp(58px, 5.5vw, 68px);
    height: clamp(58px, 5.5vw, 68px);
    border-radius: var(--radius-md, 10px);
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    background: var(--white);
    padding: 2px;
}

.gallery-thumb.active, 
.gallery-thumb:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-100);
    transform: translateY(-2px);
}

.gallery-thumb img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-md, 10px) - 2px);
    display: block;
}

/* في الحواسيب ذات الارتفاع المتوسط: تصغير طفيف ومدروس بحيث يبقى المعرض كاملاً مجمداً ومريئاً */
@media (min-width: 881px) and (max-height: 760px) {
    .product-gallery {
        top: calc(var(--header-height, 84px) + 6px);
    }
    .gallery-main {
        max-width: min(430px, calc(100vh - 190px));
        margin-block-end: 8px;
    }
    .gallery-thumbs {
        max-width: min(430px, calc(100vh - 190px));
        gap: 6px;
    }
    .gallery-thumb {
        width: 56px;
        height: 56px;
    }
}

/* ---- Product Details ---- */
.product-details {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.product-title {
    font-size: clamp(1.5rem, 2.5vw, var(--font-size-3xl));
    font-weight: var(--font-weight-extrabold);
    color: var(--gray-900);
    margin-block-end: var(--space-2);
    line-height: 1.3;
    word-break: break-word;
}

/* Interactive Social Proof Rating */
.product-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    padding-block: var(--space-1);
    padding-inline: var(--space-3);
    border-radius: var(--radius-full);
    margin-block-end: var(--space-4);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    width: fit-content;
}

.product-rating-badge:hover {
    background: #FEF3C7;
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}

.product-rating-badge .rating-count {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: #92400E;
}

.product-price-block {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-block-end: var(--space-4);
    flex-wrap: wrap;
}

.product-current-price {
    font-size: clamp(1.75rem, 3vw, var(--font-size-4xl));
    font-weight: var(--font-weight-extrabold);
    color: var(--primary);
    letter-spacing: -0.02em;
}

.product-original-price {
    font-size: var(--font-size-xl);
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-discount-badge {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FECACA;
    padding-block: 2px;
    padding-inline: var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
}

/* Free Shipping Promotional Bar */
.free-shipping-promo-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding-block: var(--space-2);
    padding-inline: var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    margin-block-end: var(--space-4);
    transition: all var(--transition-normal);
}

.free-shipping-promo-bar .promo-icon {
    font-size: 1.25rem;
}

.product-short-desc {
    margin-block-end: var(--space-5);
}

.product-short-desc p {
    font-size: var(--font-size-base);
    color: var(--gray-600);
    line-height: 1.8;
    margin: 0;
}

/* Trust Inline */
.product-trust-inline {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-block-end: var(--space-6);
}

.product-trust-inline span {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
    background: var(--gray-100);
    border: 1px solid var(--border);
    padding-block: var(--space-1);
    padding-inline: var(--space-3);
    border-radius: var(--radius-full);
}

/* ============================================================
   ---- Shopify-Style Luxury COD Checkout Block ----
   ============================================================ */
.cod-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: clamp(1rem, 2.5vw, var(--space-6));
    border: 2px solid rgba(15, 118, 110, 0.25);
    box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(15, 118, 110, 0.08);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin-block-end: var(--space-8);
}

.cod-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary, #0f766e), #14b8a6, var(--secondary, #f59e0b));
}

/* ============================================================
   ---- 3 DYNAMIC COD FORM THEMES (MODERN / EXPRESS / LUXURY) ----
   ============================================================ */

/* Top Strip Badges */
.cod-luxury-top-strip,
.cod-express-top-strip {
    margin: -1.25rem -1.25rem 1.25rem -1.25rem;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* ---------------------------------------------
   THEME 1: MODERN (الكلاسيكي العصري - Balanced & Clean)
   --------------------------------------------- */
.cod-theme-modern {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.cod-theme-modern::before {
    height: 4px;
    background: linear-gradient(90deg, var(--primary, #0f766e), #38bdf8);
}

.cod-theme-modern .cod-urgency-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.cod-theme-modern .urgency-countdown {
    background: #1e293b;
    color: #ffffff;
}

.cod-theme-modern .bundle-selector-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.cod-theme-modern .bundle-card {
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
}

.cod-theme-modern .bundle-card.active {
    border-color: var(--primary, #0f766e);
    background: rgba(15, 118, 110, 0.04);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.1);
}

.cod-theme-modern .cod-form input,
.cod-theme-modern .cod-form select {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
}

.cod-theme-modern .cod-form input:focus,
.cod-theme-modern .cod-form select:focus {
    background: #ffffff;
    border-color: var(--primary, #0f766e);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

/* ---------------------------------------------
   THEME 2: EXPRESS (المباشر السريع - High Conversion)
   --------------------------------------------- */
.cod-theme-express {
    background: #ffffff;
    border: 2.5px solid #ea580c;
    border-radius: 18px;
    box-shadow: 0 14px 40px -6px rgba(234, 88, 12, 0.18), 0 0 0 1px rgba(234, 88, 12, 0.1);
}

.cod-theme-express::before {
    height: 5px;
    background: linear-gradient(90deg, #ea580c, #f59e0b, #ef4444);
}

.cod-express-top-strip {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(234, 88, 12, 0.3);
    border-bottom: 2px solid #b91c1c;
}

.cod-express-top-strip .express-bolt {
    font-size: 1.15rem;
    animation: boltJitter 1.6s infinite ease-in-out;
}

@keyframes boltJitter {
    0%, 100% { transform: scale(1) rotate(0deg); }
    20% { transform: scale(1.25) rotate(-10deg); }
    40% { transform: scale(1.1) rotate(8deg); }
}

.cod-theme-express .cod-urgency-bar {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1.5px solid #fed7aa;
    color: #9a3412;
}

.cod-theme-express .urgency-countdown {
    background: #ea580c;
    color: #ffffff;
    animation: countdownPulse 1.2s infinite alternate;
}

@keyframes countdownPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.cod-theme-express .bundle-selector-wrap {
    background: #fffaf5;
    border: 1.5px solid #fed7aa;
}

.cod-theme-express .bundle-card {
    border: 2px solid #cbd5e1;
    background: #ffffff;
}

.cod-theme-express .bundle-card:hover {
    border-color: #ea580c;
    background: #fff7ed;
}

.cod-theme-express .bundle-card.active {
    border-color: #ea580c;
    background: #fff7ed;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.2);
}

.cod-theme-express .bundle-card.active .bundle-radio {
    border-color: #ea580c;
}

.cod-theme-express .bundle-card.active .bundle-radio::after {
    background: #ea580c;
}

.cod-theme-express .bundle-badge {
    background: linear-gradient(135deg, #ea580c, #dc2626);
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4);
}

.cod-theme-express .cod-form input,
.cod-theme-express .cod-form select {
    background: #ffffff;
    border: 1.5px solid #94a3b8;
    border-radius: 8px;
}

.cod-theme-express .cod-form input:focus,
.cod-theme-express .cod-form select:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 3.5px rgba(234, 88, 12, 0.2);
}

.cod-theme-express .cod-submit-btn {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%) !important;
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.45) !important;
    animation: expressPulseCta 2.2s infinite ease-in-out;
}

@keyframes expressPulseCta {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(234, 88, 12, 0.45);
    }
    50% {
        transform: scale(1.025);
        box-shadow: 0 12px 32px rgba(234, 88, 12, 0.65);
    }
}

.cod-theme-express .cod-submit-btn:hover {
    transform: scale(1.03) translateY(-1px) !important;
    box-shadow: 0 14px 36px rgba(234, 88, 12, 0.7) !important;
}

/* ---------------------------------------------
   THEME 3: LUXURY (المتدرج الفاخر - VIP Gold & Deep Obsidian)
   --------------------------------------------- */
.cod-theme-luxury {
    background: #ffffff;
    border: 2px solid rgba(217, 119, 6, 0.35);
    border-radius: 22px;
    box-shadow: 0 20px 48px -10px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(217, 119, 6, 0.15);
}

.cod-theme-luxury::before {
    height: 5px;
    background: linear-gradient(90deg, #d97706, #fbbf24, #b45309, #d97706);
}

.cod-luxury-top-strip {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fef3c7;
    border-bottom: 2px solid #d97706;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

.cod-luxury-top-strip .luxury-crown {
    font-size: 1.2rem;
    animation: crownGlow 2.5s infinite alternate;
}

@keyframes crownGlow {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.4)); }
    100% { transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.9)); }
}

.cod-theme-luxury .cod-header-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1.5px solid #d97706;
    box-shadow: 0 3px 12px rgba(217, 119, 6, 0.25);
}

.cod-theme-luxury .cod-urgency-bar {
    background: linear-gradient(135deg, #fdfbf7 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    color: #78350f;
}

.cod-theme-luxury .urgency-countdown {
    background: linear-gradient(135deg, #b45309, #d97706);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(180, 83, 9, 0.3);
}

.cod-theme-luxury .bundle-selector-wrap {
    background: #fffdf9;
    border: 1px solid #fde68a;
}

.cod-theme-luxury .bundle-card {
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
}

.cod-theme-luxury .bundle-card.active {
    border-color: #d97706;
    background: #fffdf7;
    box-shadow: 0 4px 18px rgba(217, 119, 6, 0.16);
}

.cod-theme-luxury .bundle-card.active .bundle-radio {
    border-color: #d97706;
}

.cod-theme-luxury .bundle-card.active .bundle-radio::after {
    background: #d97706;
}

.cod-theme-luxury .bundle-badge {
    background: linear-gradient(135deg, #b45309, #f59e0b);
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.35);
}

.cod-theme-luxury .cod-form input,
.cod-theme-luxury .cod-form select {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
}

.cod-theme-luxury .cod-form input:focus,
.cod-theme-luxury .cod-form select:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 3.5px rgba(217, 119, 6, 0.22);
}

.cod-theme-luxury .cod-submit-btn {
    background: linear-gradient(135deg, #064e3b 0%, #0f766e 50%, #047857 100%) !important;
    border: 1.5px solid #fbbf24 !important;
    box-shadow: 0 10px 30px rgba(6, 78, 59, 0.4), 0 0 15px rgba(251, 191, 36, 0.25) !important;
}

.cod-theme-luxury .cod-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(6, 78, 59, 0.5), 0 0 22px rgba(251, 191, 36, 0.4) !important;
}

/* Responsive adjustments for top strips */
@media (max-width: 768px) {
    .cod-luxury-top-strip,
    .cod-express-top-strip {
        margin: -1rem -1rem 1rem -1rem;
        padding: 8px 12px;
        font-size: 0.82rem;
    }
}

@media (max-width: 600px) {
    .cod-luxury-top-strip,
    .cod-express-top-strip {
        margin: -0.75rem -0.75rem 0.75rem -0.75rem;
        padding: 7px 10px;
        font-size: 0.8rem;
    }
}

/* ---- Urgency & Social Proof Bar ---- */
.cod-urgency-bar {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-block-end: var(--space-5);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: var(--font-size-xs);
    color: #9a3412;
}

.urgency-timer-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.urgency-fire {
    font-size: 1.15rem;
    animation: firePulse 1.5s infinite alternate;
}

@keyframes firePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

.urgency-countdown {
    background: #ea580c;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 800;
}

.urgency-viewers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ---- COD Header ---- */
.cod-form-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-block-end: var(--space-5);
    padding-block-end: var(--space-4);
    border-block-end: 1px solid var(--border-light, #e2e8f0);
}

.cod-header-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-50, #f0fdfa), var(--primary-100, #ccfbf1));
    border: 1px solid var(--primary-100, #99f6e4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.1);
}

.cod-header-text h3 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 3px;
    line-height: 1.3;
}

.cod-header-text p {
    font-size: var(--font-size-xs);
    color: var(--text-light, #64748b);
    margin: 0;
}

/* ============================================================
   ---- Shopify Bundle / Quantity Offer Cards ----
   ============================================================ */
.bundle-selector-wrap {
    margin-block-end: var(--space-5);
    background: #f8fafc;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.bundle-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--gray-800);
    margin-block-end: var(--space-3);
}

.badge-discount-hint {
    background: #dcfce7;
    color: #15803d;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.bundle-options-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.bundle-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 12px 14px;
    background: #ffffff;
    border: 2px solid var(--border, #cbd5e1);
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    user-select: none;
}

.bundle-card:hover {
    border-color: var(--primary, #0f766e);
    background: #f0fdfa;
    transform: translateY(-1px);
}

.bundle-card.active {
    border-color: var(--primary, #0f766e);
    background: #f0fdfa;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.15);
}

.bundle-badge {
    position: absolute;
    top: -11px;
    inset-inline-end: 14px;
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    z-index: 2;
    white-space: nowrap;
}

.bundle-badge.badge-gold {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.bundle-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gray-300, #cbd5e1);
    background: #ffffff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bundle-card.active .bundle-radio {
    border-color: var(--primary, #0f766e);
    background: var(--primary, #0f766e);
}

.bundle-card.active .bundle-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
}

.bundle-info {
    flex: 1;
    min-width: 0;
}

.bundle-name {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--gray-900);
}

.bundle-desc {
    font-size: 12px;
    color: var(--text-light, #64748b);
}

.bundle-price-wrap {
    text-align: left;
    flex-shrink: 0;
}

.bundle-price {
    font-size: var(--font-size-base);
    font-weight: 800;
    color: var(--primary, #0f766e);
}

.bundle-original {
    font-size: 11px;
    color: #94a3b8;
    text-decoration: line-through;
}

.custom-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-block-start: var(--space-3);
    padding-block-start: var(--space-3);
    border-block-start: 1px dashed var(--border, #e2e8f0);
}

.custom-qty-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--gray-600);
}

/* ---- Moroccan Inputs Styling ---- */
.morocco-badge {
    font-size: 11px;
    background: #f1f5f9;
    color: #334155;
    padding: 1px 6px;
    border-radius: 4px;
    margin-inline-start: 6px;
    font-weight: 600;
}

.phone-input-container {
    position: relative;
}

.phone-validation-check {
    position: absolute;
    inset-inline-end: 14px;
    color: #10b981;
    font-weight: 800;
    font-size: 1.1rem;
    pointer-events: none;
}

.cod-form .form-group {
    margin-block-end: var(--space-4);
}

.cod-form label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--gray-800);
    margin-block-end: 6px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-icon .field-icon {
    position: absolute;
    inset-inline-start: 14px;
    color: var(--gray-400);
    pointer-events: none;
    display: flex;
    align-items: center;
    z-index: 1;
}

.input-with-icon input,
.input-with-icon select {
    padding-inline-start: 44px !important;
    padding-inline-end: 14px !important;
    width: 100%;
}

.cod-form input,
.cod-form textarea,
.cod-form select {
    width: 100%;
    max-width: 100%;
    background: #f8fafc;
    border: 1.5px solid var(--border, #cbd5e1);
    border-radius: var(--radius-md, 8px);
    font-size: var(--font-size-sm);
    padding-block: 11px;
    padding-inline: 14px;
    transition: all var(--transition-fast);
    color: var(--gray-900);
    font-family: inherit;
}

.cod-form input:focus,
.cod-form textarea:focus,
.cod-form select:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
    outline: none;
}

/* ---- Moroccan City Quick Chips ---- */
.city-quick-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-block-start: 8px;
}

.chips-label {
    font-size: 11px;
    color: var(--text-light, #64748b);
    font-weight: 600;
}

.city-chip {
    border: 1px solid var(--border, #cbd5e1);
    background: #ffffff;
    color: #334155;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.city-chip:hover,
.city-chip.active {
    background: var(--primary, #0f766e);
    border-color: var(--primary, #0f766e);
    color: #ffffff;
}

/* ---- Quantity Selector ---- */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-50);
}

.qty-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--white);
    border: none;
    user-select: none;
}

.qty-btn:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.qty-input {
    width: 44px;
    height: 38px;
    text-align: center;
    border: none !important;
    background: var(--gray-50) !important;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    padding: 0 !important;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---- Order Summary Box ---- */
.order-summary {
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-block: var(--space-5);
    border: 1.5px dashed rgba(15, 118, 110, 0.25);
    width: 100%;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding-block: 5px;
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.free-shipping-tag {
    color: #15803d;
    font-weight: 700;
}

.summary-total {
    border-block-start: 1px solid var(--border, #e2e8f0);
    margin-block-start: var(--space-2);
    padding-block-start: var(--space-3);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--gray-900);
}

.summary-total span:last-child {
    color: var(--primary, #0f766e);
    font-size: 1.25rem;
}

/* ---- Pulsing High-Converting CTA Button ---- */
.cod-submit-btn {
    position: relative;
    overflow: hidden;
    padding-block: 14px !important;
    background: linear-gradient(135deg, var(--primary, #0f766e) 0%, #047857 100%) !important;
    border: none !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.35) !important;
    transition: all 0.25s ease !important;
}

.cod-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.45) !important;
}

.cod-submit-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 80%
    );
    transform: rotate(30deg);
    animation: shimmerSweep 3.2s infinite;
}

@keyframes shimmerSweep {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

.cta-main-text {
    display: block;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.cta-sub-text {
    display: block;
    font-size: 11.5px;
    opacity: 0.9;
    font-weight: 500;
    margin-top: 2px;
}

/* ---- Direct WhatsApp Order Button ---- */
.whatsapp-order-wrap {
    margin-block-start: var(--space-3);
}

.whatsapp-quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #25d366;
    color: #ffffff !important;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.whatsapp-quick-btn:hover {
    background: #1eb857;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.whatsapp-quick-btn .wa-icon {
    font-size: 1.25rem;
}

/* ---- Trust Micro Badges ---- */
.cod-trust-badges {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-2);
    margin-block-start: var(--space-4);
    padding-block-start: var(--space-4);
    border-block-start: 1px solid var(--border-light);
}

.cod-trust-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.cod-trust-badge-item .badge-icon {
    font-size: 1.3rem;
}

.cod-trust-badge-item span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-700);
    line-height: 1.3;
}

.cod-assurance {
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-block-start: var(--space-3);
    margin-bottom: 0;
}

/* ---- Celebration Success State ---- */
.cod-success {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    animation: successFadeIn 0.3s ease-out;
}

@keyframes successFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.success-icon-big {
    font-size: 4rem;
    margin-block-end: var(--space-2);
}

.cod-success h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #059669;
    margin-block-end: var(--space-2);
}

.success-lead {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    margin-block-end: var(--space-5);
}

.success-order-box {
    background: #f8fafc;
    border: 2px dashed #99f6e4;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-block-end: var(--space-6);
}

.order-box-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.order-number-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    color: var(--primary, #0f766e);
}

.btn-copy-order {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

.btn-copy-order:hover {
    background: #f1f5f9;
}

.order-eta {
    font-size: 12px;
    color: #047857;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 0;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
}

.btn-whatsapp-success {
    background: #25d366;
    color: #ffffff !important;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-success:hover {
    background: #1eb857;
}

/* ============================================================
   ---- Moroccan Guarantees Grid ----
   ============================================================ */
.morocco-guarantees-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-block-end: var(--space-8);
}

.guarantee-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

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

.guarantee-text h4 {
    font-size: var(--font-size-sm);
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 4px;
}

.guarantee-text p {
    font-size: 12px;
    color: var(--text-light, #64748b);
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   ---- High Converting FAQ Accordion ----
   ============================================================ */
.product-faq-section {
    margin-block-end: var(--space-12);
}

.product-faq-section h2 {
    font-size: var(--font-size-2xl);
    margin-block-end: var(--space-5);
    padding-block-end: var(--space-3);
    border-block-end: 2px solid var(--border-light);
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item[open] {
    border-color: var(--primary, #0f766e);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.05);
}

.faq-question {
    padding: 14px 18px;
    font-weight: 700;
    font-size: var(--font-size-base);
    color: var(--gray-900);
    cursor: pointer;
    user-select: none;
    position: relative;
    list-style: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    position: absolute;
    inset-inline-end: 18px;
    font-size: 1.3rem;
    color: var(--primary, #0f766e);
    font-weight: 700;
    transition: transform 0.2s;
}

.faq-item[open] .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 0 18px 16px 18px;
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    line-height: 1.8;
}

.faq-answer p {
    margin: 0;
}

/* ============================================================
   ---- Lightbox Modal ----
   ============================================================ */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -42px;
    inset-inline-end: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
}

/* ============================================================
   ---- Live Social Proof Toast ----
   ============================================================ */
.recent-order-toast {
    position: fixed;
    bottom: 24px;
    inset-inline-start: 24px;
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    max-width: 320px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.recent-order-toast.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast-close {
    position: absolute;
    top: 4px;
    inset-inline-end: 6px;
    background: none;
    border: none;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
}

.toast-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--gray-50, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.toast-avatar img,
.toast-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.toast-buyer {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gray-900);
}

.toast-action {
    font-size: 11.5px;
    color: var(--primary, #0f766e);
    font-weight: 600;
}

.toast-time {
    font-size: 10px;
    color: #94a3b8;
    display: block;
}

/* Verified Buyer Badge */
.verified-buyer-badge {
    background: #ecfdf5;
    color: #059669;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-inline-start: 6px;
}

/* Description Images Responsive Protection */
.product-description-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-block: 8px;
}
.product-description-section,
.product-reviews-section,
.related-products-section {
    margin-block-end: var(--space-12);
    width: 100%;
}

.product-description-section h2,
.product-reviews-section h2,
.related-products-section h2 {
    font-size: var(--font-size-2xl);
    margin-block-end: var(--space-6);
    padding-block-end: var(--space-4);
    border-block-end: 2px solid var(--border-light);
}

.product-description-content {
    font-size: var(--font-size-base);
    color: var(--gray-600);
    line-height: 1.9;
    word-break: break-word;
}

.product-description-content h3 { 
    margin-block: var(--space-6) var(--space-3); 
    color: var(--gray-800); 
}

.product-description-content ul { 
    padding-inline-start: var(--space-5); 
    margin-block: var(--space-4); 
}

.product-description-content li { 
    margin-block-end: var(--space-2); 
    list-style: disc; 
}

.product-description-content p { 
    margin-block-end: var(--space-4); 
}

/* ---- Reviews ---- */
.reviews-list { 
    display: flex; 
    flex-direction: column; 
    gap: var(--space-4); 
    width: 100%;
}

.review-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: var(--space-5);
    border: 1px solid var(--border-light);
}

.review-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-block-end: var(--space-3);
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-100);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.review-meta strong { 
    font-size: var(--font-size-sm); 
    color: var(--gray-800); 
}

.review-city { 
    font-size: var(--font-size-xs); 
    color: var(--text-muted); 
    display: block; 
}

.review-rating { 
    margin-inline-start: auto; 
}

.review-comment { 
    font-size: var(--font-size-sm); 
    color: var(--gray-600); 
    line-height: 1.7; 
    margin: 0 0 var(--space-2); 
    word-break: break-word;
}

.review-date { 
    font-size: var(--font-size-xs); 
    color: var(--text-muted); 
}

/* ---- Sticky Mobile CTA ---- */
.sticky-cta-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    background: var(--white);
    border-block-start: 1px solid var(--border);
    padding-block: var(--space-3);
    padding-inline: var(--space-4);
    z-index: var(--z-sticky);
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.sticky-cta-price { 
    display: flex; 
    flex-direction: column; 
}

.sticky-price { 
    font-size: var(--font-size-lg); 
    font-weight: var(--font-weight-extrabold); 
    color: var(--primary-dark); 
}

.sticky-original { 
    font-size: var(--font-size-xs); 
    color: var(--text-muted); 
    text-decoration: line-through; 
}

.sticky-cta-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-100);
    border: 1px solid var(--border);
}

.sticky-cta-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sticky-cta-btn {
    padding-block: var(--space-3) !important;
    padding-inline: var(--space-6) !important;
    font-size: var(--font-size-base) !important;
    border-radius: var(--radius-full) !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.4) !important;
}

/* ---- Responsive Breakdown & High-DPI Scaling Protection ---- */

/* Tablet Landscape & Below (≤ 1024px) — keep 2-column for now */
@media (max-width: 1024px) and (min-width: 881px) {
    .product-layout {
        gap: clamp(1rem, 2.5vw, 1.5rem);
    }
}

/* Tablet Portrait (≤ 880px): single column */
@media (max-width: 880px) {
    .product-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-6);
    }

    .product-gallery { 
        position: static; 
        top: auto;
    }

    .product-title { 
        font-size: var(--font-size-2xl); 
    }

    .product-current-price { 
        font-size: var(--font-size-3xl); 
    }

    .sticky-cta-mobile { 
        display: flex; 
    }

    /* Add bottom padding to prevent sticky CTA overlap */
    .product-page { 
        padding-block-end: 90px; 
    }

    .cod-form-wrapper { 
        padding: var(--space-4); 
    }
}

/* Large Mobile (≤ 600px) */
@media (max-width: 600px) {
    .gallery-main {
        border-radius: var(--radius);
        max-height: 85vw;   /* cap at 85% of viewport width so thumbs are always visible */
    }

    .product-title {
        font-size: var(--font-size-xl);
    }

    .product-current-price {
        font-size: var(--font-size-2xl);
    }

    .cod-form-wrapper {
        padding: var(--space-3);
        border-radius: var(--radius);
    }

    .morocco-guarantees-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cod-urgency-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .recent-order-toast {
        bottom: 84px;
        inset-inline-start: 12px;
        inset-inline-end: 12px;
        max-width: calc(100vw - 24px);
    }
}

/* Small Mobile (≤ 480px) */
@media (max-width: 480px) {
    .product-page {
        padding-block-start: var(--space-3);
        padding-block-end: 100px;
    }

    .product-title {
        font-size: var(--font-size-lg);
        line-height: 1.4;
    }

    .product-current-price {
        font-size: var(--font-size-2xl);
    }

    .gallery-main {
        max-height: 80vw; /* keep image compact so thumbs strip fits on screen */
    }

    .gallery-thumbs {
        gap: var(--space-2);
    }

    .gallery-thumb {
        width: 56px;
        height: 56px;
    }
}

/* Tiny Phones (≤ 375px) */
@media (max-width: 375px) {
    .product-title {
        font-size: var(--font-size-base);
    }

    .cod-form-wrapper {
        padding: var(--space-2);
    }

    .gallery-thumb {
        width: 48px;
        height: 48px;
    }
}
