/**
 * VELDT Mobile Commerce UX — Sovereign Stylesheet
 * Phase 7B: Mobile Commerce Repair & Refinement
 * Author: VELDT Engineering
 */

/* ==========================================================================
   0. DESIGN TOKENS & SYSTEM BASE
   ========================================================================== */
:root {
    --vdt-ink: #202124;
    --vdt-warm-white: #FAF9F7;
    --vdt-pure-white: #FFFFFF;
    --vdt-sand: #F4EFEA;
    --vdt-stone: #E6E2DD;
    --vdt-gold: #C4A482;
    --vdt-green: #2E7D32;
    --vdt-muted: #706E6B;
    --vdt-font-ar: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --vdt-font-lat: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   0.1 UNIVERSAL ARABIC TYPOGRAPHY SOVEREIGNTY (PREVENT COLLISION & OVERLAP)
   ========================================================================== */
body, button, input, select, textarea {
    font-family: var(--vdt-font-ar) !important;
}

body, p, li, dd, dt,
.woocommerce-product-details__short-description,
.woocommerce-product-details__short-description p,
.woocommerce-product-details__short-description ul,
.woocommerce-product-details__short-description li,
.woocommerce-Tabs-panel,
.woocommerce-Tabs-panel p,
.woocommerce-Tabs-panel ul,
.woocommerce-Tabs-panel li,
.veldt-commerce-row-content,
.veldt-commerce-row-content p,
.comment-text,
.entry-content,
.entry-content p,
.entry-content li {
    font-family: var(--vdt-font-ar) !important;
    line-height: 1.85 !important;
    letter-spacing: normal !important;
}

h1, h2, h3, h4, h5, h6,
.product_title,
.entry-title {
    font-family: var(--vdt-font-ar) !important;
    line-height: 1.45 !important;
}

.woocommerce-product-details__short-description ul {
    margin: 12px 0 16px !important;
    padding-right: 20px !important;
    padding-left: 0 !important;
    list-style: disc !important;
}

.woocommerce-product-details__short-description li {
    margin-bottom: 8px !important;
    line-height: 1.85 !important;
    color: #444444 !important;
}

/* ==========================================================================
   1. GLOBAL COMMERCE CONTROLS (SHARED BY DESKTOP & MOBILE)
   ========================================================================== */
/* Hide native WooCommerce selects & generic links from visual display */
.single-product table.variations tr,
form.variations_form a.reset_variations,
.woocommerce-variation-availability,
.single-product div.product p.stock,
body.single-product .veldt-btn-buy-now {
    display: none !important;
}

/* Remove duplicate static trust boxes on product page */
body.single-product .veldt-trust-badges {
    display: none !important;
}

/* In-Stock Badge */
.veldt-stock-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #E8F5E9 !important;
    color: #1B5E20 !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 14px !important;
    border: 1px solid #C8E6C9 !important;
}

.veldt-stock-pulse {
    width: 8px !important;
    height: 8px !important;
    background-color: #2E7D32 !important;
    border-radius: 50% !important;
    display: inline-block !important;
}

/* Section Wrapper */
.veldt-pdp-section {
    margin-bottom: 16px !important;
}

.veldt-pdp-section-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--vdt-ink) !important;
    margin-bottom: 8px !important;
}

.veldt-pdp-section-header .veldt-label {
    color: #555555 !important;
    font-weight: 500 !important;
}

.veldt-size-head-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Color Swatches: Strict Single Coherent Row with Visible Titles */
.veldt-pdp-swatches-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
    margin: 8px 0 16px !important;
}

.veldt-pdp-swatch-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    min-width: 52px !important;
    text-align: center !important;
    user-select: none;
    transition: transform 0.15s ease;
}

.veldt-pdp-swatch-item:hover {
    transform: translateY(-2px);
}

.veldt-pdp-swatch {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    border: 2.5px solid var(--vdt-pure-white) !important;
    box-shadow: 0 0 0 1px var(--vdt-stone), 0 2px 5px rgba(0,0,0,0.08) !important;
    cursor: pointer !important;
    position: relative !important;
    outline: none !important;
    padding: 0 !important;
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.veldt-pdp-swatch:hover {
    transform: scale(1.06) !important;
}

.veldt-pdp-swatch:active,
.veldt-pdp-swatch-item:active .veldt-pdp-swatch {
    transform: scale(0.92) !important;
}

.veldt-pdp-swatch-item.active .veldt-pdp-swatch,
.veldt-pdp-swatch.active {
    box-shadow: 0 0 0 2px var(--vdt-pure-white), 0 0 0 4.5px var(--vdt-ink) !important;
    transform: scale(1.08) !important;
}

.veldt-pdp-swatch-title {
    font-size: 11px !important;
    font-weight: 600 !important;
    font-family: 'Cairo', sans-serif !important;
    color: #5F6368 !important;
    white-space: nowrap !important;
    transition: color 0.15s ease, font-weight 0.15s ease !important;
}

.veldt-pdp-swatch-item.active .veldt-pdp-swatch-title {
    color: #202124 !important;
    font-weight: 800 !important;
}

.veldt-color-head-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.veldt-swatch-badge {
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    background: #EFECE6 !important;
    color: #4A463F !important;
}

/* Size Pills: Compact 44px Horizontal Pills */
.veldt-size-pills-group {
    display: flex !important;
    gap: 12px !important;
    margin: 6px 0 16px !important;
}

.veldt-size-pill-btn {
    flex: 1 1 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 46px !important;
    padding: 0 16px !important;
    background: var(--vdt-pure-white) !important;
    border: 1.5px solid var(--vdt-stone) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1), border-color 160ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 120ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 160ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.veldt-size-pill-btn:active {
    transform: scale(0.96) !important;
}

.veldt-size-pill-btn .veldt-size-letter {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--vdt-ink) !important;
    line-height: 1 !important;
}

.veldt-size-pill-btn .veldt-size-sep {
    color: #A09E9B !important;
    font-size: 14px !important;
    line-height: 1 !important;
}

.veldt-size-pill-btn .veldt-size-cm {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #555555 !important;
    line-height: 1 !important;
}

.veldt-size-pill-btn:hover {
    border-color: #999999 !important;
}

.veldt-size-pill-btn.is-selected {
    border-color: var(--vdt-ink) !important;
    background: var(--vdt-ink) !important;
    box-shadow: 0 2px 8px rgba(32, 33, 36, 0.15) !important;
}

.veldt-size-pill-btn.is-selected .veldt-size-letter,
.veldt-size-pill-btn.is-selected .veldt-size-sep,
.veldt-size-pill-btn.is-selected .veldt-size-cm {
    color: #FFFFFF !important;
}

/* Size Guide Trigger */
.veldt-size-guide-trigger {
    background: none !important;
    border: none !important;
    color: var(--vdt-ink) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    padding: 0 !important;
    font-family: var(--vdt-font-ar) !important;
}

.veldt-size-guide-trigger:hover {
    color: var(--vdt-gold) !important;
}

/* Unified Primary CTA Button */
.single-product div.product form.cart .single_add_to_cart_button {
    width: 100% !important;
    height: 52px !important;
    background: var(--vdt-ink) !important;
    color: var(--vdt-pure-white) !important;
    border-radius: 8px !important;
    font-family: var(--vdt-font-ar) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 120ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 160ms cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(32, 33, 36, 0.12) !important;
    margin-top: 10px !important;
}

.single-product div.product form.cart .single_add_to_cart_button:hover {
    background: #000000 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(32, 33, 36, 0.2) !important;
}

.single-product div.product form.cart .single_add_to_cart_button:active {
    transform: scale(0.97) !important;
    box-shadow: 0 2px 6px rgba(32, 33, 36, 0.12) !important;
}

/* Authoritative Accordion Commerce Rows */
.veldt-commerce-rows-accordion {
    margin-top: 20px !important;
    border-top: 1px solid var(--vdt-stone) !important;
}

.veldt-commerce-row {
    border-bottom: 1px solid var(--vdt-stone) !important;
}

.veldt-commerce-row-summary {
    width: 100% !important;
    background: none !important;
    border: none !important;
    padding: 14px 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    text-align: right !important;
    font-family: var(--vdt-font-ar) !important;
    font-size: 14px !important;
    color: var(--vdt-ink) !important;
}

.veldt-commerce-row-summary .veldt-row-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.veldt-commerce-row-summary .veldt-arrow {
    font-size: 10px !important;
    color: #999999 !important;
    transition: transform 0.2s ease !important;
}

.veldt-commerce-row.is-open .veldt-arrow {
    transform: rotate(180deg) !important;
}

.veldt-commerce-row-content {
    display: none;
    padding: 0 0 14px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #555555 !important;
}

.veldt-commerce-row.is-open .veldt-commerce-row-content {
    display: block !important;
    animation: vdtAccordionReveal 180ms cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes vdtAccordionReveal {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   2. DESKTOP EXPERIENCE PASS (>= 992px)
   ========================================================================== */
@media screen and (min-width: 992px) {
    header.bhfb-desktop .site-title,
    header.bhfb-desktop .site-description {
        display: none !important;
    }

    header.bhfb-desktop .bhfb-cols-3 {
        min-height: 64px !important;
        height: auto !important;
    }

    header.bhfb-desktop .bhfb-column {
        height: auto !important;
        display: flex !important;
        align-items: center !important;
    }

    header.bhfb-desktop .custom-logo {
        height: 52px !important;
        max-height: 54px !important;
        width: auto !important;
    }

    /* Container: Controlled Premium Width (1280px) */
    .single-product .site-main,
    .single-product .content-area {
        max-width: 1280px !important;
        margin: 0 auto !important;
        padding: 24px 24px 60px !important;
    }

    .single-product div.product {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    /* The real 2-column container in Botiga */
    .single-product .product-gallery-summary {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 32px !important;
        width: 100% !important;
        margin-bottom: 48px !important;
    }

    /* Gallery (54%): Clean, spacious, unconstrained */
    .single-product .woocommerce-product-gallery {
        width: 54% !important;
        max-width: 54% !important;
        flex: 0 0 54% !important;
        float: none !important;
        margin: 0 !important;
    }

    .single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        border-radius: 8px !important;
        overflow: hidden !important;
    }

    .single-product .woocommerce-product-gallery img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }

    /* Summary Buy Box (46% - 32px): Prestigious, calm, sticky */
    .single-product .summary.entry-summary {
        width: calc(46% - 32px) !important;
        max-width: calc(46% - 32px) !important;
        flex: 0 0 calc(46% - 32px) !important;
        float: none !important;
        margin: 0 !important;
        position: sticky !important;
        top: 88px !important;
        background: #FFFFFF !important;
        border: 1px solid #ECE7E1 !important;
        border-radius: 12px !important;
        padding: 32px 28px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
        box-sizing: border-box !important;
    }

    .single-product .summary .product_title {
        font-family: var(--vdt-font-ar) !important;
        font-size: 30px !important;
        line-height: 1.4 !important;
        font-weight: 700 !important;
        color: var(--vdt-ink) !important;
        margin: 0 0 8px !important;
    }

    .single-product .summary .price {
        font-size: 26px !important;
        font-weight: 700 !important;
        color: var(--vdt-ink) !important;
        margin-bottom: 16px !important;
    }

    .single-product .summary .price::after {
        content: ' (شامل ضريبة القيمة المضافة)';
        font-size: 13px !important;
        font-weight: 400 !important;
        color: #767676 !important;
        margin-right: 6px !important;
    }

    /* Full-width tabs below Gallery & Summary */
    .single-product .woocommerce-tabs {
        width: 100% !important;
        max-width: 100% !important;
        clear: both !important;
        border-top: 1px solid var(--vdt-stone) !important;
        padding-top: 36px !important;
        margin-top: 36px !important;
    }

    #veldt-sticky-buy-bar {
        display: none !important;
    }
}

/* ==========================================================================
   3. MOBILE & TABLET REFINEMENT PASS (<= 991px & <= 600px)
   ========================================================================== */
@media screen and (max-width: 991px) {
    html {
        overflow-x: clip !important;
        -webkit-text-size-adjust: 100% !important;
    }

    body {
        overflow-x: hidden !important;
        position: relative !important;
        width: 100% !important;
        padding-top: 58px !important;
    }

    /* Compact Sovereign Header: 56px - 60px Fixed & Guaranteed */
    header.bhfb-mobile {
        background: #FFFFFF !important;
        border-bottom: 1px solid #E6E2DD !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        width: 100% !important;
        min-height: 56px !important;
        max-height: 60px !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
    }

    header.bhfb-mobile .bhfb-main_header_row {
        padding: 6px 14px !important;
        min-height: 56px !important;
        display: flex !important;
        align-items: center !important;
    }

    header.bhfb-mobile .site-branding {
        display: flex !important;
        align-items: center !important;
    }

    header.bhfb-mobile .custom-logo-link {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }

    header.bhfb-mobile .custom-logo {
        height: 42px !important;
        max-height: 44px !important;
        width: auto !important;
        object-fit: contain !important;
    }

    /* Hide redundant textual VELDT and unstyled search bar in mobile header */
    header.bhfb-mobile .custom-logo-link span,
    header.bhfb-mobile .site-title,
    header.bhfb-mobile .site-description,
    header.bhfb-mobile .header-search-form-row {
        display: none !important;
    }

    /* Single Product Mobile Layout Hierarchy */
    .single-product .product-gallery-summary {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px !important;
    }

    .single-product .woocommerce-product-gallery,
    .single-product .summary.entry-summary {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        float: none !important;
    }

    /* On mobile PDP, hide floating hoopoe badge to prevent collision with sticky CTA & description */
    .single-product #veldt-hoopoe-corner-companion {
        display: none !important;
    }

    /* Edge-to-Edge 1:1 Gallery Viewport */
    body.single-product .woocommerce-product-gallery .flex-viewport {
        aspect-ratio: 1 / 1 !important;
        max-height: 85vw !important;
        overflow: hidden !important;
        background: var(--vdt-warm-white) !important;
    }

    body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        display: flex !important;
        aspect-ratio: 1 / 1 !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scrollbar-width: none !important;
    }

    body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper::-webkit-scrollbar {
        display: none !important;
    }

    body.single-product .woocommerce-product-gallery__image {
        flex: 0 0 100% !important;
        width: 100% !important;
        scroll-snap-align: start !important;
    }

    body.single-product .woocommerce-product-gallery__image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* Gallery Counter */
    .veldt-gallery-counter {
        position: absolute !important;
        bottom: 12px !important;
        left: 12px !important;
        background: rgba(32, 33, 36, 0.75) !important;
        color: #FFFFFF !important;
        padding: 4px 10px !important;
        border-radius: 12px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        backdrop-filter: blur(4px) !important;
        z-index: 10 !important;
    }

    /* Sticky Buy Bar */
    #veldt-sticky-buy-bar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(255, 255, 255, 0.96) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        border-top: 1px solid var(--vdt-stone) !important;
        padding: 10px 16px !important;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
        z-index: 995 !important;
        transform: translateY(100%) !important;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    #veldt-sticky-buy-bar.is-visible {
        transform: translateY(0) !important;
    }

    .veldt-sticky-price-wrap {
        display: flex !important;
        flex-direction: column !important;
    }

    .veldt-sticky-price {
        font-size: 20px !important;
        font-weight: 800 !important;
        color: var(--vdt-ink) !important;
        line-height: 1.1 !important;
    }

    .veldt-sticky-variant {
        font-size: 11px !important;
        color: #777777 !important;
        margin-top: 2px !important;
    }

    .veldt-sticky-btn {
        background: var(--vdt-ink) !important;
        color: #FFFFFF !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 12px 24px !important;
        font-family: var(--vdt-font-ar) !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1), background-color 160ms ease !important;
    }

    .veldt-sticky-btn:active {
        transform: scale(0.97) !important;
    }

    /* Padding compensation for Sticky Buy Bar */
    body.single-product {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Suppress back-to-top button on mobile PDP so it does not overlap sticky buy bar */
    body.single-product .back-to-top {
        display: none !important;
    }
}

/* Strict Mobile Width & Unboxed Discipline (<= 600px) */
@media screen and (max-width: 600px) {
    .single-product .container.content-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .single-product .main-row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .single-product .site-main {
        padding-left: 14px !important;
        padding-right: 14px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Gallery is strictly Edge-to-Edge 100% full width */
    body.single-product .woocommerce-product-gallery {
        margin-left: -14px !important;
        margin-right: -14px !important;
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        width: calc(100% + 28px) !important;
        max-width: calc(100% + 28px) !important;
        position: relative !important;
    }

    /* Remove excessive boxing/borders on mobile PDP */
    .single-product div.product,
    .single-product .summary.entry-summary {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Product Title & Price */
    body.single-product .summary .product_title {
        font-family: var(--vdt-font-ar) !important;
        font-size: 22px !important;
        line-height: 28px !important;
        font-weight: 700 !important;
        color: var(--vdt-ink) !important;
        margin: 0 0 6px !important;
    }

    body.single-product .summary .price {
        font-size: 26px !important;
        font-weight: 800 !important;
        color: var(--vdt-ink) !important;
        margin: 0 0 14px !important;
    }

    /* Hide bulky quantity wrapper on mobile */
    body.single-product .quantity,
    body.single-product .botiga-single-addtocart-wrapper .quantity {
        display: none !important;
    }

    .single-product div.product form.cart .single_add_to_cart_button {
        width: 100% !important;
        height: 50px !important;
        margin-top: 10px !important;
    }
}

/* ==========================================================================
   4. HOME PAGE REFINED HIERARCHY & WHITESPACE ELIMINATION
   ========================================================================== */
body.home header.woocommerce-page-header,
body.home .woocommerce-page-header,
body.archive:not(.single-product) header.woocommerce-page-header {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.home .container.content-wrapper,
body.home .content-wrapper,
body.home .main-row {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.home .site-main {
    padding-top: 20px !important;
}

/* Multi-Column Responsive Side-by-Side Product Grid */
ul.products,
.woocommerce ul.products,
.woocommerce-shop ul.products,
body.archive ul.products,
body.home ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 28px !important;
    max-width: 1200px !important;
    margin: 0 auto 50px auto !important;
    padding: 10px 16px !important;
    list-style: none !important;
    box-sizing: border-box !important;
    float: none !important;
    clear: both !important;
}

@media (max-width: 860px) {
    ul.products,
    .woocommerce ul.products,
    .woocommerce-shop ul.products,
    body.archive ul.products,
    body.home ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
        padding: 8px 12px !important;
    }
}

ul.products li.product,
.woocommerce ul.products li.product,
.woocommerce-shop ul.products li.product,
body.home ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    background: #FFFFFF !important;
    border: 1px solid #EFECE6 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03) !important;
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease !important;
    text-align: center !important;
    box-sizing: border-box !important;
    padding: 0 0 16px 0 !important;
}

ul.products li.product:hover,
.woocommerce ul.products li.product:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 24px rgba(32,33,36,0.07) !important;
    border-color: #BFA57A !important;
}

ul.products li.product:active,
.woocommerce ul.products li.product:active {
    transform: scale(0.985) !important;
}

ul.products li.product a.woocommerce-LoopProduct-link,
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    text-decoration: none !important;
    display: block !important;
}

ul.products li.product img,
.woocommerce ul.products li.product img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 8px 8px 0 0 !important;
    margin-bottom: 12px !important;
    display: block !important;
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

ul.products li.product:hover img,
.woocommerce ul.products li.product:hover img {
    transform: scale(1.025) !important;
}

ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Cairo', sans-serif !important;
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #202124 !important;
    text-align: center !important;
    margin: 8px 12px 4px !important;
    padding: 0 !important;
}

ul.products li.product .price,
.woocommerce ul.products li.product .price {
    font-family: 'Cairo', sans-serif !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #8C6D3F !important;
    text-align: center !important;
    margin: 4px 0 14px !important;
    display: block !important;
}

/* ==========================================================================
   5. FLOATING CONTROLS & WHATSAPP (SINGLE CLEAN SVG, NO GLITCH)
   ========================================================================== */
html body a.veldt-float-whatsapp {
    position: fixed !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background-color: #25D366 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35) !important;
    z-index: 998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: none !important;
    text-decoration: none !important;
    transition: transform 140ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 140ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body a.veldt-float-whatsapp:active {
    transform: scale(0.92) !important;
}

/* Neutralize any pseudo-element duplication */
html body a.veldt-float-whatsapp::before,
html body a.veldt-float-whatsapp::after {
    display: none !important;
    content: none !important;
}

/* Hide text label */
html body a.veldt-float-whatsapp span {
    display: none !important;
}

/* Scale and center the single inner svg */
html body a.veldt-float-whatsapp svg {
    display: block !important;
    width: 26px !important;
    height: 26px !important;
    fill: #FFFFFF !important;
    color: #FFFFFF !important;
    margin: 0 !important;
}

/* WhatsApp Placement: Strictly Left Corner (Hoopoe is on Right Corner) */
@media screen and (max-width: 991px) {
    html body a.veldt-float-whatsapp {
        left: 16px !important;
        right: auto !important;
        bottom: 24px !important;
    }
}

@media screen and (min-width: 992px) {
    html body a.veldt-float-whatsapp {
        left: 24px !important;
        right: auto !important;
        bottom: 24px !important;
    }

    html body a.veldt-float-whatsapp:hover {
        transform: scale(1.06) !important;
    }
}

/* ==========================================================================
   6. SIZE GUIDE MODAL (STRICTLY HIDDEN BY DEFAULT, OPENS ONLY ON INTERACTION)
   ========================================================================== */
.veldt-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.55) !important;
    z-index: 10000 !important;
    display: none !important; /* STRICTLY HIDDEN BY DEFAULT */
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    backdrop-filter: blur(4px) !important;
}

.veldt-modal-backdrop.is-open {
    display: flex !important; /* ONLY WHEN EXPLICITLY OPENED */
}

.veldt-modal-dialog {
    background: #FFFFFF !important;
    border-radius: 12px !important;
    max-width: 580px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 24px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    font-family: var(--vdt-font-ar) !important;
}

.veldt-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid var(--vdt-stone) !important;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
}

.veldt-modal-header h3 {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--vdt-ink) !important;
}

.veldt-modal-close {
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    color: #888888 !important;
    cursor: pointer !important;
}

.veldt-size-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 16px 0 !important;
    font-size: 14px !important;
}

.veldt-size-table th,
.veldt-size-table td {
    padding: 10px 12px !important;
    border: 1px solid var(--vdt-stone) !important;
    text-align: right !important;
}

.veldt-size-table th {
    background: var(--vdt-warm-white) !important;
    font-weight: 700 !important;
    color: var(--vdt-ink) !important;
}

.veldt-modal-footer-note {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    font-size: 12px !important;
    color: #666666 !important;
    border-top: 1px dashed var(--vdt-stone) !important;
    padding-top: 12px !important;
}

/* ==========================================================================
   7. CHECKOUT QUIET ZONE (STRICT RESPECT)
   ========================================================================== */
.woocommerce-checkout #veldt-brand-companion,
.woocommerce-checkout .veldt-companion-hoopoe {
    display: none !important;
}

/* ==========================================================================
   8. MOBILE DRAWER LUXURY NAVIGATION
   ========================================================================== */
#site-navigation-mobile {
    background: #FFFFFF !important;
    padding: 24px 20px 40px !important;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12) !important;
}

#site-navigation-mobile .mobile-menu-close {
    position: absolute !important;
    top: 18px !important;
    left: 20px !important; /* Left for RTL */
    right: auto !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #F4EFEA !important;
    border-radius: 50% !important;
    color: #202124 !important;
    z-index: 100 !important;
    text-decoration: none !important;
}

#site-navigation-mobile .bhfb-mobile-offcanvas-rows {
    margin-top: 48px !important;
}

#site-navigation-mobile .veldt-client-navigation ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-top: 1px solid #ECE7E1 !important;
}

#site-navigation-mobile .veldt-client-navigation li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #ECE7E1 !important;
}

#site-navigation-mobile .veldt-client-navigation a.veldt-nav-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 8px !important;
    font-family: var(--vdt-font-ar) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #202124 !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

#site-navigation-mobile .veldt-client-navigation a.veldt-nav-item::after {
    content: '←';
    font-size: 14px;
    color: #C4A482;
}

#site-navigation-mobile .header-search-form {
    margin-top: 24px !important;
    padding: 0 !important;
}

#site-navigation-mobile .header-search-form input.search-field {
    border: 1px solid #ECE7E1 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-family: var(--vdt-font-ar) !important;
    font-size: 14px !important;
    width: 100% !important;
    background: #FAF9F7 !important;
}

/* ==========================================================================
   9. UNIVERSAL PRICE PROTECTION & MOBILE CART REFINEMENT
   ========================================================================== */
.woocommerce-Price-amount,
.price,
.amount,
span.amount,
.product-price,
.product-subtotal,
.cart-subtotal .woocommerce-Price-amount,
.order-total .woocommerce-Price-amount {
    white-space: nowrap !important;
    display: inline-block !important;
}

/* Cart Page Notices */
.woocommerce-message,
.woocommerce-info {
    background: #FAF9F7 !important;
    border: 1px solid #ECE7E1 !important;
    border-radius: 8px !important;
    color: #202124 !important;
    font-family: var(--vdt-font-ar) !important;
    font-size: 14px !important;
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
}

.woocommerce-message .button,
.woocommerce-info .button {
    background: #202124 !important;
    color: #FFFFFF !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    font-family: var(--vdt-font-ar) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

/* Mobile Cart Table Architecture (<= 768px) */
@media screen and (max-width: 768px) {
    .woocommerce-cart-form table.shop_table {
        border: none !important;
        background: transparent !important;
        display: block !important;
        width: 100% !important;
    }

    .woocommerce-cart-form table.shop_table thead {
        display: none !important;
    }

    .woocommerce-cart-form table.shop_table tbody {
        display: block !important;
        width: 100% !important;
    }

    .woocommerce-cart-form table.shop_table tr.cart_item {
        display: grid !important;
        grid-template-columns: 72px 1fr auto !important;
        grid-template-areas:
            "thumb name remove"
            "thumb price remove"
            "qty total total";
        gap: 10px 14px !important;
        background: #FFFFFF !important;
        border: 1px solid #ECE7E1 !important;
        border-radius: 12px !important;
        padding: 16px !important;
        margin-bottom: 16px !important;
        position: relative !important;
        align-items: center !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    }

    .woocommerce-cart-form td.product-thumbnail {
        grid-area: thumb !important;
        width: 72px !important;
        height: 72px !important;
        padding: 0 !important;
        border: none !important;
    }

    .woocommerce-cart-form td.product-thumbnail img {
        width: 72px !important;
        height: 72px !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }

    .woocommerce-cart-form td.product-name {
        grid-area: name !important;
        padding: 0 !important;
        border: none !important;
        font-family: var(--vdt-font-ar) !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        line-height: 1.4 !important;
        text-align: right !important;
    }

    .woocommerce-cart-form td.product-name a {
        color: #202124 !important;
        text-decoration: none !important;
    }

    .woocommerce-cart-form td.product-price {
        grid-area: price !important;
        padding: 0 !important;
        border: none !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #706E6B !important;
        text-align: right !important;
    }

    .woocommerce-cart-form td.product-remove {
        grid-area: remove !important;
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
    }

    .woocommerce-cart-form td.product-remove a.remove {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 28px !important;
        height: 28px !important;
        border-radius: 50% !important;
        background: #F4EFEA !important;
        color: #706E6B !important;
        font-size: 18px !important;
        text-decoration: none !important;
        margin: 0 !important;
    }

    .woocommerce-cart-form td.product-quantity {
        grid-area: qty !important;
        padding: 0 !important;
        border: none !important;
    }

    .woocommerce-cart-form td.product-quantity .quantity {
        display: flex !important;
        align-items: center !important;
        border: 1px solid #ECE7E1 !important;
        border-radius: 6px !important;
        overflow: hidden !important;
        width: fit-content !important;
    }

    .woocommerce-cart-form td.product-quantity .quantity input {
        width: 36px !important;
        height: 32px !important;
        padding: 0 !important;
        text-align: center !important;
        border: none !important;
        font-weight: 700 !important;
    }

    .woocommerce-cart-form td.product-quantity .quantity button {
        width: 28px !important;
        height: 32px !important;
        background: #FAF9F7 !important;
        border: none !important;
        cursor: pointer !important;
    }

    .woocommerce-cart-form td.product-subtotal {
        grid-area: total !important;
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
        font-size: 16px !important;
        font-weight: 800 !important;
        color: #202124 !important;
    }

    .woocommerce-cart-form td.actions {
        background: transparent !important;
        border: none !important;
        padding: 12px 0 !important;
    }

    .woocommerce-cart-form .actions .coupon {
        display: flex !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }

    .woocommerce-cart-form .actions .coupon input.input-text {
        flex: 1 !important;
        height: 44px !important;
        border: 1px solid #ECE7E1 !important;
        border-radius: 8px !important;
        padding: 0 12px !important;
        font-family: var(--vdt-font-ar) !important;
        font-size: 13px !important;
    }

    .woocommerce-cart-form .actions .coupon button.button {
        height: 44px !important;
        border-radius: 8px !important;
        padding: 0 16px !important;
        background: #F4EFEA !important;
        color: #202124 !important;
        border: 1px solid #ECE7E1 !important;
        font-family: var(--vdt-font-ar) !important;
        font-weight: 700 !important;
    }

    .woocommerce-cart-form .actions button[name="update_cart"] {
        display: none !important;
    }

    .cart-collaterals .cart_totals {
        background: #FFFFFF !important;
        border: 1px solid #ECE7E1 !important;
        border-radius: 12px !important;
        padding: 20px 16px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    }

    .cart-collaterals .cart_totals h2 {
        font-family: var(--vdt-font-ar) !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        margin-bottom: 14px !important;
    }

    .wc-proceed-to-checkout a.checkout-button {
        background: #202124 !important;
        color: #FFFFFF !important;
        height: 52px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-family: var(--vdt-font-ar) !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        box-shadow: 0 4px 14px rgba(32, 33, 36, 0.15) !important;
    }
}

/* ==========================================================================
   10. CLEAN FLOATING CONTROLS & BACK-TO-TOP SUPPRESSION
   ========================================================================== */
@media screen and (max-width: 991px) {
    .back-to-top,
    a.back-to-top,
    div.back-to-top {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* ==========================================================================
   11. SOVEREIGN EDITORIAL & BRAND CONTENT TYPOGRAPHY (RESPONSIVE H1-H3)
   ========================================================================== */
@media screen and (max-width: 768px) {
    h1.entry-title,
    h1.page-title,
    .entry-header h1,
    .page-header h1,
    body.page .entry-title,
    body.page-template-default .entry-title {
        font-size: 1.75rem !important; /* 28px vs old 64px */
        line-height: 1.35 !important;
        font-weight: 700 !important;
        text-align: center !important;
        margin-top: 14px !important;
        margin-bottom: 18px !important;
        letter-spacing: -0.01em !important;
        word-break: keep-all !important;
    }

    .entry-content h2,
    body.page h2,
    .veldt-page-container h2 {
        font-size: 1.3rem !important; /* ~21px */
        line-height: 1.45 !important;
        font-weight: 700 !important;
        margin-top: 24px !important;
        margin-bottom: 12px !important;
        word-break: keep-all !important;
    }

    .entry-content h3,
    body.page h3,
    .veldt-page-container h3 {
        font-size: 1.15rem !important;
        line-height: 1.5 !important;
        font-weight: 700 !important;
        margin-top: 18px !important;
        margin-bottom: 10px !important;
        word-break: keep-all !important;
    }

    .veldt-page-container {
        padding: 0 16px 40px !important;
    }
}

/* Responsive Editorial Tables */
.entry-content table,
.veldt-page-container table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #ECE7E1 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    margin: 20px 0 !important;
    font-size: 14px !important;
}

.entry-content table th,
.veldt-page-container table th {
    background: #FAF9F7 !important;
    color: #202124 !important;
    font-weight: 700 !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid #ECE7E1 !important;
    text-align: right !important;
}

.entry-content table td,
.veldt-page-container table td {
    padding: 12px 14px !important;
    border-bottom: 1px solid #F4EFEA !important;
    color: #444444 !important;
    line-height: 1.6 !important;
    text-align: right !important;
}

.entry-content table tr:last-child td,
.veldt-page-container table tr:last-child td {
    border-bottom: none !important;
}

@media screen and (max-width: 768px) {
    .entry-content table,
    .veldt-page-container table {
        font-size: 12.5px !important;
    }
    .entry-content table th,
    .entry-content table td,
    .veldt-page-container table th,
    .veldt-page-container table td {
        padding: 10px 8px !important;
    }
}

/* ==========================================================================
   12. ARABIC WORD-BREAK & MOBILE CART CARD POLISH
   ========================================================================== */
.woocommerce-cart-form td.product-name,
.woocommerce-cart-form td.product-name a,
.product_title,
.entry-title,
.veldt-pdp-section-header,
.veldt-size-pill-btn,
.woocommerce-checkout .product-name {
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
}

@media screen and (max-width: 768px) {
    .woocommerce-cart-form table.shop_table tr.cart_item td,
    .woocommerce-cart-form table.shop_table tr.cart_item td:before {
        border: none !important;
        border-top: none !important;
        border-bottom: none !important;
        background: transparent !important;
    }

    .woocommerce-cart-form table.shop_table tr.cart_item {
        display: grid !important;
        grid-template-columns: 76px 1fr auto !important;
        grid-template-areas:
            "thumb name   remove"
            "thumb price  remove"
            "qty   total  total" !important;
        gap: 8px 12px !important;
        background: #FFFFFF !important;
        border: 1px solid #ECE7E1 !important;
        border-radius: 12px !important;
        padding: 16px !important;
        margin-bottom: 16px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
        align-items: center !important;
    }

    .woocommerce-cart-form td.product-thumbnail {
        grid-area: thumb !important;
        width: 76px !important;
        height: 76px !important;
    }

    .woocommerce-cart-form td.product-thumbnail img {
        width: 76px !important;
        height: 76px !important;
        border-radius: 8px !important;
        object-fit: cover !important;
    }

    .woocommerce-cart-form td.product-name {
        grid-area: name !important;
        font-size: 14.5px !important;
        font-weight: 700 !important;
        line-height: 1.4 !important;
        text-align: right !important;
    }

    .woocommerce-cart-form td.product-price {
        grid-area: price !important;
        font-size: 13px !important;
        color: #706E6B !important;
        font-weight: 600 !important;
        text-align: right !important;
    }

    .woocommerce-cart-form td.product-quantity {
        grid-area: qty !important;
    }

    .woocommerce-cart-form td.product-subtotal {
        grid-area: total !important;
        text-align: left !important;
        font-size: 16px !important;
        font-weight: 800 !important;
        color: #202124 !important;
    }

    .woocommerce-cart-form .actions .coupon {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        margin-bottom: 16px !important;
    }

    .woocommerce-cart-form .actions .coupon input.input-text {
        flex: 1 !important;
        min-width: 0 !important;
        height: 46px !important;
        border: 1px solid #ECE7E1 !important;
        border-radius: 8px !important;
        padding: 0 12px !important;
        font-size: 14px !important;
    }

    .woocommerce-cart-form .actions .coupon button.button {
        flex-shrink: 0 !important;
        height: 46px !important;
        padding: 0 18px !important;
        white-space: nowrap !important;
        border-radius: 8px !important;
        background: #F4EFEA !important;
        color: #202124 !important;
        border: 1px solid #ECE7E1 !important;
        font-weight: 700 !important;
    }
}

/* ==========================================================================
   13. SOVEREIGN MOBILE CHECKOUT ARCHITECTURE & REPAIR
   ========================================================================== */
@media screen and (max-width: 768px) {
    .woocommerce-checkout form.checkout,
    .woocommerce-checkout .checkout-wrapper,
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout .col2-set,
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        display: block !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    .woocommerce-checkout #order_review {
        margin-top: 24px !important;
        background: #FFFFFF !important;
        border: 1px solid #ECE7E1 !important;
        border-radius: 12px !important;
        padding: 20px 16px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    }

    /* Checkout Terms Checkbox Alignment & Collision Fix */
    .woocommerce-checkout .woocommerce-form__label-for-checkbox.checkbox {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        cursor: pointer !important;
        margin: 16px 0 !important;
        font-size: 13.5px !important;
        line-height: 1.6 !important;
    }

    .woocommerce-checkout .woocommerce-form__label-for-checkbox input[type="checkbox"] {
        flex-shrink: 0 !important;
        width: 20px !important;
        height: 20px !important;
        margin-top: 2px !important;
        float: none !important;
        position: static !important;
        accent-color: #202124 !important;
    }

    .woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text {
        flex: 1 !important;
        color: #444444 !important;
    }

    /* Checkout Place Order Button */
    .woocommerce-checkout #place_order {
        width: 100% !important;
        height: 52px !important;
        border-radius: 8px !important;
        background: #202124 !important;
        color: #FFFFFF !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        box-shadow: 0 4px 14px rgba(32, 33, 36, 0.15) !important;
        margin-top: 16px !important;
    }

    .woocommerce-checkout .veldt-checkout-trust-box,
    .woocommerce-checkout div[style*="border: 1px solid #ECE7E1"] {
        margin-top: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   14. BIDI & TEXT ISOLATION SOVEREIGNTY
   ========================================================================== */
.entry-content bdi,
.bidi-isolate,
.latin-text {
    unicode-bidi: isolate !important;
    direction: ltr !important;
    display: inline-block !important;
}

/* ==========================================================================
   15. BOTTOM CLEARANCE FOR FLOATING CONTROLS (WHATSAPP & HOOPOE)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .site-main,
    .content-wrapper,
    .entry-content,
    .woocommerce-cart,
    .woocommerce-checkout,
    .veldt-page-container {
        padding-bottom: 95px !important;
    }
}

/* ==========================================================================
   16. CLS PREVENTION — LAYOUT SHIFT STABILIZATION
   Root Cause: bhfb-builder (Botiga Header Footer Builder) repaints header
   at ~5s and ~19s causing CLS 0.20 + 0.22 = 0.42 (FAIL, target <0.1)
   Fix: Reserve stable dimensions for header zones before JS executes.
   ========================================================================== */

/* 16.1 — Lock header min-height to prevent reflow when bhfb initialises */
#masthead,
.site-header,
header.site-header {
    min-height: 72px;
    contain: layout size;
}

/* 16.2 — Stabilize bhfb row/col/item containers */
.bhfb-row,
.bhfb-inner-row,
.bhfb-col,
.bhfb-builder-item {
    contain: layout;
}

/* 16.3 — Pre-reserve space for logo (primary CLS offender: 0.20 at 5351ms) */
.bhfb-builder-item.bhfb-component-logo,
.bhfb-builder-item.bhfb-component-logo a {
    display: block;
    min-width: 80px;
    min-height: 36px;
}
.bhfb-builder-item.bhfb-component-logo img,
header.bhfb-desktop img.custom-logo,
.site-header img[src*="logo"] {
    height: 52px !important;
    max-height: 54px !important;
    width: auto !important;
    object-fit: contain !important;
}

@media (max-width: 991px) {
    .bhfb-builder-item.bhfb-component-logo img,
    header.bhfb-mobile img.custom-logo,
    header.bhfb-mobile .custom-logo {
        height: 42px !important;
        max-height: 44px !important;
        width: auto !important;
        object-fit: contain !important;
    }
}

/* 16.4 — Pre-reserve HTML injection zones (WhatsApp / Hoopoe companion) */
.bhfb-builder-item.bhfb-component-html {
    min-height: 1px;
    contain: layout;
}

/* 16.5 — Prevent cart count badge from shifting adjacent layout */
.bhfb-component-woo_icons,
.bhfb-component-woo_icons .count,
.bhfb-component-woo_icons .count-number,
span.count-number {
    contain: layout;
    min-width: 18px;
    display: inline-flex;
    align-items: center;
}

/* 16.6 — content-wrapper: contain layout to stop header height cascade */
.content-wrapper {
    contain: layout;
}

/* 16.7 — Suppress FOUT that triggers text-based layout shifts */
@font-face { font-family: 'Cairo'; font-display: optional; }
@font-face { font-family: 'Inter'; font-display: optional; }

/* ==========================================================================
   16-B. CLS DEEP FIX — FREEZE HEADER GEOMETRY (89px MEASURED)
   bhfb-row height=0 at HTML parse, reflows to 89px after JS loads.
   Fix: Hardcode header height to prevent page-level layout cascade.
   ========================================================================== */

/* Force header to pre-occupy its final space before bhfb JS runs */
header.site-header,
.site-header {
    height: 89px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* bhfb-row was reported as height=0 — force it to fill the header */
.bhfb-row {
    min-height: 89px !important;
}

/* Pre-reserve space for the main content so it doesn't shift up/down */
body.botiga-page #page,
body.botiga-product #page,
body.woocommerce #page {
    padding-top: 0 !important;
}

/* Ensure .site-main doesn't reflux from header size changes */
.site-main,
#main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ==========================================================================
   17. TASTEFUL TOUCH & PREFERS-REDUCED-MOTION POLISH (EMIL KOWALSKI STANDARD)
   ========================================================================== */
a, button, input, select, .veldt-pdp-swatch, .veldt-size-pill-btn {
    -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
