/* ================================================================
PACKAGING SINGLE PAGE - Two-Column Text Grid
================================================================ */

/* ========== BASE ========== */
.packaging-single-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: var(--bg-dark);
    overflow-x: hidden;
    overflow-y: visible;
}
.packaging-single-bg { position: absolute; inset: 0; z-index: 0; }
.packaging-single-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    z-index: 1;
    padding-bottom: clamp(24px, 4vw, 48px);
    box-sizing: border-box;
}

/* ========== DESKTOP LAYOUT ========== */
.packaging-desktop-layout { display: block; }
.packaging-mobile-layout { display: none; }

.packaging-main-container {
    position: relative;
    width: 100%;
    max-width: min(1280px, calc(100% - 24px));
    margin-left: auto;
    margin-right: auto;
    border-radius: 0 600px 0 600px;
    border-top: 3px solid rgba(255, 255, 255, 0.5);
    border-bottom: 3px solid rgba(255, 255, 255, 0.5);
    border-left: none;
    border-right: none;
    background: var(--c-bg-gradient);
    padding: 48px clamp(14px, 3vw, 28px) 56px;
    box-sizing: border-box;
}

[dir="rtl"] .packaging-main-container {
    border-radius: 600px 0 600px 0;
}

.packaging-line-title {
    font-family: var(--font-latin);
    font-weight: 400;
    font-size: 48px;
    line-height: 100%;
    color: rgba(255,255,255,1);
    text-align: center;
    margin: 50px 0 20px;
}

.packaging-title-divider {
    display: block;
    width: 400px;
    height: 3px;
    background: rgba(212,175,55,1);
    margin: 0 auto 50px;
    border-radius: 2px;
}

.packaging-content-box {
    position: relative;
    width: 90%;
    margin: 0 auto;
    padding: 40px;
    box-sizing: border-box;
}

.packaging-main-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 1018px;
    aspect-ratio: 3 / 2;
    max-height: min(678px, 68vh);
    margin: 0 auto 40px;
    overflow: hidden;
}

.packaging-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
}

.packaging-text-grid-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
    overflow: hidden; /* Prevent any overflow */
}

/* ==========  TWO-COLUMN TEXT GRID (DESKTOP) ========== */
.packaging-text-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    grid-template-rows: repeat(3, auto);   /* 3 rows */
    gap: 50px 25px; /* row-gap 171px, column-gap 116px */
    width: 100%;
    max-width: 100%;
    margin: 40px auto 0; 
    padding: 0;
}

.packaging-text-item {
    max-width: 499px;
    height: 98px;
    border-radius: 5px;
    border-top: 2.5px solid rgb(255, 255, 255, 0.3);
    border-bottom: 2.5px solid rgb(255, 255, 255, 0.3);
    border-right: none;
    border-left: none;
    /* background: var(--c-bg-gradient); */
    border-image-slice: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 auto;
}

.packaging-text-content {
    font-family: var(--font-arabic);
    font-weight: 400;
    font-style: normal;
    font-size: 36px;
    letter-spacing: 0;
    text-align: center;
    vertical-align: middle;
    color: var(--c-white);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}


/* ========== MOBILE LAYOUT (≤767px) ========== */
@media (max-width: 767.98px) {
    .packaging-desktop-layout { display: none; }
    .packaging-mobile-layout { display: block; }

    .packaging-main-container-mobile {
        position: relative;
        width: 94%;
        min-width: 320px;
        margin: 0 auto;
        border-radius: 0 100px 0 100px;
        border-top: 1.5px solid rgba(255, 255, 255, 0.5);
        border-bottom: 1.5px solid rgba(255, 255, 255, 0.5);
        background: var(--c-bg-gradient);
        padding: 20px 15px;
        box-sizing: border-box;
    }

    .packaging-line-title-mobile {
        font-family: var(--font-latin);
        font-weight: 400;
        font-size: 12px;
        line-height: 100%;
        color: var(--c-white);
        text-align: center;
        margin: 0 0 8px;
    }

    .packaging-title-divider-mobile {
        display: block;
        width: 150px;
        height: 2px;
        background: rgba(212,175,55,1);
        margin: 0 auto 20px;
        border-radius: 1px;
    }

    .packaging-content-box-mobile {
        position: relative;
        width: 100%;
        margin: 0 auto;
        padding: 15px;
        box-sizing: border-box;
    }

    /* ==========  WRAPPED IMAGE BOX (MOBILE) ========== */
    .packaging-image-wrapper-box {
        position: relative;
        width: 250px;
        height: auto;
        min-height: 0;
        margin: 0 auto 20px;
        border-radius: 0 50px 0 50px; /* Top-right + Bottom-left */
        border: 1px solid var(--c-white);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px); /* Safari support */
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 15px;
        box-sizing: border-box;
    }

    /* [dir="rtl"] .packaging-image-wrapper-box {
        border-radius: 50px 0 50px 0; /* Flip for RTL */
    } */

    /* Image inside wrapper */
    .packaging-main-image-wrapper-mobile {
        position: relative;
        width: 150px;
        height: 100px;
        margin: 0 auto 10px;
        border-radius: 0 10px 0 10px;
        border: 2px solid var(--c-white);
        border-image-slice: 1;
        overflow: hidden;
    }

    /* [dir="rtl"] .packaging-main-image-wrapper-mobile {
        border-radius: 10px 0 10px 0;
    } */

    .packaging-main-image-mobile {
        width: 150px;
        height: 100px;
        object-fit: cover;
        opacity: 0.9;
    }

    .packaging-mobile-description {
        width: 100%;
        max-width: min(920px, 100%);
        margin: 0 auto 24px;
        padding: 0 clamp(8px, 3vw, 16px);
        box-sizing: border-box;
    }

   
    /* ==========  SINGLE-COLUMN TEXT GRID (MOBILE) ========== */
    .packaging-text-grid-mobile {
        display: grid;
        grid-template-columns: 1fr; /*  1 column only */
        grid-template-rows: repeat(6, auto); /* 6 rows */
        gap: 20px; /* Vertical gap between items */
        width: 100%;
        max-width: 280px;
        margin: 20px auto 0;
        padding: 0;
    }

    .packaging-text-item-mobile {
        width: auto;
        max-width: 250px;
        height: 25px;
        max-height: 50px; /* Slightly taller for single column */
        border-top: 1.5px solid var(--c-white);
        border-bottom: 1.5px solid var(--c-white);
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .packaging-text-content-mobile {
        font-family: var(--font-arabic);
        font-weight: 400;
        font-size: 12px; /* Slightly larger for readability */
        /* line-height: 16px; */
        text-align: center;
        color: var(--c-white);
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 10px;
    }

/* Small Mobile (≤319px) */
@media (max-width: 319.98px) {
    .packaging-main-container-mobile {
        width: calc(100vw - 40px);
        max-width: 320px;
    }
    .packaging-image-wrapper-box {
        width: 114px;
        max-width: 114px;
        height: auto;
        min-height: 200px;
        padding: 10px;
    }
    .packaging-main-image-wrapper-mobile {
        width: 130px;
        height: 85px;
    }
    .packaging-text-grid-mobile {
        gap: 15px;
    }
    .packaging-text-item-mobile {
        height: 45px;
    }
    .packaging-text-content-mobile {
        font-size: 10px;
        line-height: 14px;
    }
}
}

/* Inline rich description (product + packaging — replaces hover popup) */
.product-body-description {
    width: 100%;
    max-width: 920px;
    margin: 28px auto 0;
    padding: 0 clamp(12px, 3vw, 24px);
    box-sizing: border-box;
    font-family: var(--font-arabic);
    font-size: clamp(16px, 1.6vw, 22px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
}
/* Default copy inherits the light color; do not use !important on all descendants —
   that strips inline colors / highlights from the CMS. Elements with inline color keep it. */
.product-body-description a {
    color: var(--c-accent-light);
    text-decoration: underline;
}
.product-body-description p {
    margin: 0 0 0.75em;
}
.product-body-description p:last-child {
    margin-bottom: 0;
}

/* Framed description — matches detail-row top/bottom lines, larger type (packaging single only) */
.packaging-single-page .packaging-rich-description.product-body-description {
    max-width: min(980px, 94%);
    margin-top: clamp(36px, 4.5vw, 56px);
    margin-bottom: clamp(24px, 3.5vw, 40px);
    padding: clamp(36px, 4vw, 52px) clamp(24px, 4.5vw, 52px);
    border-top: 3px solid rgba(255, 255, 255, 0.42);
    border-bottom: 3px solid rgba(255, 255, 255, 0.42);
    border-radius: 0;
    font-size: clamp(20px, 2.05vw, 30px);
    line-height: 1.65;
    letter-spacing: 0.01em;
}

@media (max-width: 767.98px) {
    .packaging-single-page .packaging-mobile-description.packaging-rich-description.product-body-description {
        max-width: 100%;
        margin-top: 12px;
        margin-bottom: 28px;
        padding: clamp(28px, 6vw, 40px) clamp(14px, 4vw, 22px);
        border-top-width: 2px;
        border-bottom-width: 2px;
        font-size: clamp(17px, 4.8vw, 22px);
        line-height: 1.62;
    }
}

/* Product prev/next (same visual language as former chips nav, inline flow) */
.product-single-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 36px;
    padding: 0 4px 12px;
    box-sizing: border-box;
}

/* Desktop: keep prev/next inside the curved main container (inset from rounded edges) */
@media (min-width: 768px) {
    .packaging-desktop-layout .packaging-content-box > .product-single-nav {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        margin-top: clamp(20px, 2.5vw, 36px);
        padding-inline: clamp(20px, 5vw, 64px);
        padding-bottom: clamp(12px, 2vw, 28px);
        box-sizing: border-box;
    }
}
.product-single-nav--mobile {
    margin-top: 16px;
    padding-bottom: 4px;
}
.product-single-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 148px;
    min-height: 52px;
    padding: 8px 18px;
    border-radius: 0 40px 0 40px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    background: rgba(212, 175, 55, 1);
    color: #fff;
    text-decoration: none;
    font-family: 'Tajawal', var(--font-arabic);
    font-weight: 700;
    font-size: clamp(16px, 1.8vw, 24px);
    line-height: 1;
    box-sizing: border-box;
}
.product-single-nav-btn--sm {
    min-width: 72px;
    min-height: 30px;
    font-size: 10px;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 0 10px 0 10px;
}
.product-single-nav-arrow {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.product-single-nav-arrow--prev {
    rotate: -140deg;
}
.product-single-nav-arrow--next {
    rotate: 40deg;
}

@media (prefers-reduced-motion: reduce) {
    .product-single-nav-btn {
        transition: none !important;
    }
}

/* ========== SINGLE PAGE: gallery + video band match hero (same gradient, no frosted overlay) ========== */
.packaging-single-page .packaging-gallery-section {
    background: var(--c-bg-gradient);
}

.packaging-single-page .packaging-gallery-bg {
    opacity: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.packaging-single-page .packaging-youtube-section {
    background: var(--c-bg-gradient);
    margin-top: clamp(12px, 2vw, 32px);
    padding-block: clamp(12px, 2.5vw, 40px);
}