/* ═══════════════════════════════════════════════════════
   Broodle Shoppable Reels — Popup & Carousel Styles
   Modern redesign v1.6
   ═══════════════════════════════════════════════════════ */

/* ── Carousel Slide ── */
.reelUpSlider .slick-slide {
    padding: 10px;
    position: relative;
    height: unset !important;
}

.reelUpSlider .slide_product_image {
    height: 93px;
    width: 93px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    border-radius: 12px;
    z-index: 100 !important;
    background: white;
    flex-shrink: 0;
    margin-top: -28px; /* Pop out more into the video area */
    position: relative;
}

.reelUpSlider .reel_product_image video {
    border-radius: 10px 10px 0 0;
}

.reelUpSlider .slide_product_image img {
    border-radius: 10px;
    max-width: 100%;
    height: auto;
    position: relative;
    z-index: 101 !important;
    display: block;
}

.reelUpSlider .reel_product_image {
    position: relative;
}

.reelUpSlider .product_name h5 {
    color: #111;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reelUpSlider .sel_org_price {
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
    display: flex;
    gap: 6px;
    margin: 4px 0 0;
    font-family: inherit;
}

.reelUpSlider .sel_org_price .selling_price {
    color: #b30000;
}

.reelUpSlider .sel_org_price .regular_price {
    color: gray;
}

/* ── Carousel Arrows ── */
button.slick-arrow:before {
    font-size: 40px;
}

button.slick-prev.slick-arrow {
    z-index: 100;
    left: 40px !important;
    top: calc(50% - 80px) !important;
}

button.slick-next.slick-arrow {
    right: 40px !important;
    z-index: 100;
    top: calc(50% - 80px) !important;
}

/* ── Carousel Card ── */
.reelUpSlider .reel_product {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    cursor: pointer;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reelUpSlider .reel_product:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ── Discount & Views Badges ── */
.reelUpSlider .reel_product .off_views,
.slider_productDetail .off_views {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    position: absolute;
    width: 100%;
    top: 10px;
}

.reelUpSlider .off_views .off,
.slider_productDetail .off_views .off {
    background: #B30000;
    padding: 3px 10px;
    font-size: 13px;
    color: #fff;
    position: relative;
    font-family: inherit;
    border-radius: 5px 0px 0px 5px;
    z-index: 1;
}

.reelUpSlider .off_views .off::after,
.slider_productDetail .off_views .off::after {
    content: '';
    height: 16.5px;
    width: 16.5px;
    background: #B30000;
    position: absolute;
    top: calc(50% - 8px);
    right: -9px;
    transform: rotate(45deg);
    z-index: -1;
}

.reelUpSlider .off_views .view,
.slider_productDetail .off_views .view {
    background: rgba(0,0,0,0.35);
    padding: 1px 10px;
    font-size: 14px;
    color: #fff;
    border-radius: 5px;
    backdrop-filter: blur(4px);
}

/* ═══════════════════════════════════════════════════════
   POPUP MODAL — Modern Redesign
   ═══════════════════════════════════════════════════════ */

#productDetail_model {
    --bs-modal-bg: unset !important;
}

#productDetail_modal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.18), 0 8px 24px rgba(0,0,0,0.08);
}

/* ── Close Button ── */
#productDetail_modal .modal-header {
    position: absolute;
    background: transparent;
    right: 12px;
    top: 12px;
    border: 0;
    z-index: 1000;
    padding: 0;
}

#productDetail_modal .modal-header button {
    border: none;
    background: rgba(255,255,255,0.95);
    font-size: 18px;
    padding: 0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

#productDetail_modal .modal-header button:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

/* ── Modal Layout ── */
.productData_modal {
    display: flex;
    overflow: hidden;
    border-radius: inherit;
    background: #fff;
}

.reel {
    width: 40%;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: #000;
}

.reel_video {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.productData_modal .productDataSide {
    overflow: hidden auto;
    max-height: 600px !important;
    width: 60%;
    background: #fff;
}

.productData_modal .productDataSide::-webkit-scrollbar {
    width: 3px;
}

.productData_modal .productDataSide::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.productData_modal .productDataSide::-webkit-scrollbar-track {
    background: transparent;
}

/* ── Product Gallery ── */
.product_slider {
    height: 300px;
    padding-top: 16px;
}

.product_slider .product_image {
    max-width: 100%;
    height: 300px;
    width: 100%;
    filter: opacity(0.4);
    object-fit: contain;
    transition: filter 0.3s ease, transform 0.3s ease;
    border-radius: 12px;
}

.product_slider .slick-active .product_image {
    filter: opacity(1) !important;
    transform: scale(1.02);
}

/* Related product images in popup */
#productDetail_modal .relproductModel img {
    border-radius: 10px;
}

/* ── Product Info ── */
.productData_modal .product_name h5 {
    color: #111;
    font-weight: 700;
    font-size: 17px;
    font-family: inherit;
    margin: 20px 0 6px;
    text-align: center;
    line-height: 1.4;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.productData_modal .sel_org_price {
    font-size: 18px;
    line-height: 1;
    margin: 8px 0 4px;
    font-weight: 700;
    font-family: inherit;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: baseline;
}

.productData_modal .relatedProductSection .sel_org_price {
    display: unset !important;
}

.productData_modal .sel_org_price .selling_price {
    padding: 5px 0;
    color: #111;
}

.productData_modal .sel_org_price .regular_price {
    color: #999;
    padding: 5px 0;
    font-size: 14px;
    font-weight: 500;
}

/* ── Size Selector ── */
#productDetail_modal .size {
    text-align: center;
    margin: 12px 0;
}

#productDetail_modal .size .option {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

#productDetail_modal .size .option .option_item {
    background: #fff;
    color: #333;
    padding: 6px 20px;
    position: relative;
    border-radius: 24px;
    border: 1.5px solid #e0e0e0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#productDetail_modal .size .option .option_item:hover {
    border-color: #333;
    background: #fafafa;
}

#productDetail_modal .size .option .option_item.active {
    background-color: #111;
    color: #fff;
    border-color: #111;
}

#productDetail_modal .size .option .option_item input {
    position: absolute;
    visibility: hidden;
}

/* ── Action Buttons ── */
.productData_modal .addtocart_moreinfo {
    display: flex;
    gap: 10px;
    margin: 16px 0;
    justify-content: center;
}

.productData_modal .addtocart_moreinfo a {
    padding: 12px 28px;
    text-decoration: none;
    border: 1.5px solid #111;
    background: #111;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    border-radius: 28px;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.productData_modal .addtocart_moreinfo a:hover {
    background: #333;
    border-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.productData_modal .addtocart_moreinfo .more-info {
    background: #fff;
    color: #111;
}

.productData_modal .addtocart_moreinfo .more-info:hover {
    background: #f5f5f5;
    border-color: #111;
}

/* ── Gallery Dots (pill style) ── */
#productDetail_modal .slick-dots {
    bottom: -30px !important;
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex !important;
    justify-content: center;
    gap: 4px;
}

#productDetail_modal .slick-dots li {
    width: 24px !important;
    height: 4px !important;
    margin: 0 !important;
}

#productDetail_modal .slick-dots li button {
    width: 24px !important;
    height: 4px !important;
    padding: 0 !important;
    border: none;
    background: #e0e0e0;
    border-radius: 2px;
    transition: all 0.25s ease;
}

#productDetail_modal .slick-dots li button:before {
    display: none !important;
}

#productDetail_modal .slick-dots li.slick-active button {
    background: #111;
    width: 32px !important;
}

#productDetail_modal .slick-dots li button:focus,
#productDetail_modal .slick-dots li button:hover {
    background: #999;
    outline: none;
}

/* ── Related Products ── */
#productDetail_modal .relproductModel {
    cursor: pointer;
}

/* ── Loader ── */
#productDetail_modal .loader {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: #fff;
    z-index: 999;
    display: grid;
    place-content: center;
    border-radius: inherit;
}

#productDetail_modal .load {
    height: 40px;
    width: 40px;
    border: 3px solid #e0e0e0;
    border-radius: 50%;
    border-top-color: #111;
    animation: loader 0.7s ease-in-out infinite;
}

@keyframes loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(359deg); }
}

/* ═══════════════════════════════════════════════════════
   TABLET (768–992px)
   ═══════════════════════════════════════════════════════ */
@media (max-width:992px) and (min-width:768px) {
    #productDetail_modal .modal-dialog {
        min-width: 720px !important;
    }
}

/* ═══════════════════════════════════════════════════════
   MOBILE (<767px) — Full-screen modal, video 70% top
   ═══════════════════════════════════════════════════════ */
@media (max-width:767px) {
    /* Modal fills viewport */
    #productDetail_modal .modal-dialog {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        display: flex;
        align-items: flex-end;
    }

    #productDetail_modal .modal-content {
        border-radius: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #productDetail_modal .modal-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0 !important;
    }

    /* Close button — white */
    #productDetail_modal .modal-header {
        right: 10px;
        top: 10px;
        z-index: 1001;
    }

    #productDetail_modal .modal-header button {
        width: 34px;
        height: 34px;
        font-size: 18px;
        background: rgba(255,255,255,0.95) !important;
        color: #333 !important;
        backdrop-filter: blur(8px);
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    #productDetail_modal .modal-header button:hover {
        background: #fff !important;
    }

    /* Hide desktop product column */
    #productDetail_modal .modal-dialog .productColumn {
        display: none;
    }

    /* Vertical stack — video top, product bottom */
    .productData_modal {
        flex-direction: column !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        flex: 1;
        overflow: hidden;
    }

    /* Video section — 70% */
    .reel {
        width: 100% !important;
        flex: 0 0 70% !important;
        height: 70% !important;
        max-height: 70% !important;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #000 !important;
        border-radius: 0;
        overflow: hidden;
    }

    .reel_video {
        width: 100%;
        height: 100%;
        object-fit: contain !important;
    }

    /* Product info — bottom 30% */
    .productDataSide {
        width: 100% !important;
        flex: 0 0 30% !important;
        height: 30% !important;
        max-height: 30% !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        display: flex !important;
        flex-direction: row !important;
        padding: 0 !important;
        gap: 0 !important;
        background: #fff;
        border-top: 1px solid #eee;
    }

    /* ── Product gallery in mobile — left 35% ── */
    .productDataSide > .product_slider {
        width: 35% !important;
        min-width: 35% !important;
        max-width: 35% !important;
        height: 100% !important;
        flex-shrink: 0;
        padding: 6px 4px !important;
        box-sizing: border-box;
        overflow: visible !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative;
    }

    .productDataSide .product_slider .slick-list {
        height: auto !important;
        width: 100% !important;
        overflow: hidden;
    }

    .productDataSide .product_slider .slick-track {
        display: flex !important;
        align-items: center !important;
    }

    .productDataSide .product_slider .slick-slide {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 4px !important;
    }

    .productDataSide .product_slider .product_image {
        height: auto !important;
        max-height: none !important;
        width: 100% !important;
        max-width: 120px !important;
        object-fit: contain !important;
        border-radius: 8px !important;
        filter: opacity(1) !important;
        margin: 0 auto;
        display: block;
    }

    /* Show gallery arrows on mobile */
    .productDataSide .product_slider .slick-prev,
    .productDataSide .product_slider .slick-next {
        display: block !important;
        z-index: 10;
        width: 22px;
        height: 22px;
    }

    .productDataSide .product_slider .slick-prev {
        left: -2px !important;
    }

    .productDataSide .product_slider .slick-next {
        right: -2px !important;
    }

    .productDataSide .product_slider .slick-prev:before,
    .productDataSide .product_slider .slick-next:before {
        font-size: 18px !important;
        color: #333 !important;
        opacity: 0.7;
    }

    /* Show dots on mobile gallery */
    #productDetail_modal .product_slider .slick-dots {
        display: flex !important;
        bottom: 2px !important;
        gap: 3px;
    }

    #productDetail_modal .product_slider .slick-dots li {
        width: 14px !important;
        height: 3px !important;
    }

    #productDetail_modal .product_slider .slick-dots li button {
        width: 14px !important;
        height: 3px !important;
        background: #ccc;
    }

    #productDetail_modal .product_slider .slick-dots li.slick-active button {
        background: #333;
        width: 20px !important;
    }

    /* ── Product details — right 65% ── */
    .productDataSide > div[style*="padding"] {
        width: 65% !important;
        min-width: 65% !important;
        max-width: 65% !important;
        padding: 10px 12px !important;
        margin: 0 !important;
        flex-shrink: 0;
        overflow-y: auto;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        box-sizing: border-box;
    }

    /* Product name */
    .productDataSide .product_name h5 {
        font-size: 13px !important;
        margin: 0 0 3px !important;
        line-height: 1.3;
        text-align: left !important;
        font-weight: 600;
    }

    /* Price */
    .productDataSide .sel_org_price {
        font-size: 13px !important;
        margin: 0 0 6px !important;
        justify-content: flex-start !important;
    }

    /* Size options */
    .productDataSide .size {
        text-align: left !important;
        margin: 0 0 6px !important;
    }

    .productDataSide .size .option {
        justify-content: flex-start !important;
        gap: 4px !important;
    }

    .productDataSide .size .option .option_item {
        font-size: 10px !important;
        padding: 3px 10px !important;
    }

    /* Buttons */
    .productDataSide .addtocart_moreinfo {
        justify-content: flex-start !important;
        gap: 6px !important;
        margin: 2px 0 0 !important;
    }

    .productDataSide .addtocart_moreinfo a {
        padding: 7px 14px !important;
        font-size: 11px !important;
        border-radius: 18px !important;
    }
}

/* ═══════════════════════════════════════════════════════
   SMALL MOBILE (<400px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 400px) {
    .productDataSide .addtocart_moreinfo a {
        padding: 6px 12px !important;
        font-size: 10px !important;
    }

    .productDataSide .product_name h5 {
        font-size: 12px !important;
    }
}
