/* prozoo_shoppablereels/views/css/front.css */

.shoppablereels-container {
    margin: 40px auto;
    font-family: inherit;
    width: 100%;
}

@media (min-width: 992px) {
    .shoppablereels-container {
        padding-left: 4.16667vw;
        padding-right: 4.16667vw;
    }
}

@media (max-width: 991px) {
    .shoppablereels-container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

.shoppablereels-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #000;
}

/* Scroll snap container */
.shoppablereels-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-top: 16px;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    -webkit-overflow-scrolling: touch;
}

.shoppablereels-carousel::before,
.shoppablereels-carousel::after {
    content: '';
    margin: auto;
}

.shoppablereels-carousel::-webkit-scrollbar {
    height: 6px;
}

.shoppablereels-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.shoppablereels-carousel::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

/* Card */
.shoppablereel-card {
    display: flex;
    flex-direction: column;
    width: 200px;
    min-width: 200px;
    scroll-snap-align: start;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eaeaea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: inherit;
}

.shoppablereel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

/* Image wrapper */
.shoppablereel-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    overflow: hidden;
    background-color: #000;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.shoppablereel-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

/* Sound Icon overlay */
.shoppablereel-sound-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: auto;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
}

.shoppablereel-sound-icon:hover {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
}

.shoppablereel-sound-icon.unmuted svg {
    fill: #27d962;
    /* Highlight icon when unmuted */
}

.shoppablereel-sound-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Mini thumbnail override */
.shoppablereel-product-thumb {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 8px;
    padding: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.shoppablereel-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

/* Details Section */
.shoppablereel-details {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-start;
}

.shoppablereel-product-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}

.shoppablereel-product-price {
    font-size: 14px;
    font-weight: 700;
    color: #e50000;
    margin: 0;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .shoppablereels-carousel {
        gap: 12px;
    }

    .shoppablereel-card {
        width: 72vw;
        min-width: 72vw;
        max-width: 250px;
    }

    .shoppablereel-product-thumb {
        width: 44px;
        height: 44px;
    }
}

/* Nav Arrows */
.shoppablereels-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.shoppablereels-carousel-wrapper:hover .shoppablereels-nav-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.shoppablereels-prev {
    left: -20px;
}

.shoppablereels-next {
    right: -20px;
}

/* Modal Overlay */
.shoppablereels-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Box */
.shoppablereels-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90vw;
    max-width: 900px;
    height: 80vh;
    max-height: 700px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.shoppablereels-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.shoppablereels-modal-close:hover {
    color: #000;
}

/* Split layout */
.shoppablereels-modal-split {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: 100%;
}

.shoppablereels-modal-video-col {
    flex: 1 1 50%;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 300px;
    height: 100%;
}

.shoppablereels-modal-video-col video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shoppablereels-modal-info-col {
    flex: 1 1 50%;
    background: #fff;
    padding: 0;
    /* padding moved to inner content */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-width: 300px;
    height: 100%;
}

/* Custom Product Quickview AJAX */
.sr-quickview {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sr-qv-image-col {
    text-align: center;
    padding: 20px 20px 10px;
    background: #fff;
}

.sr-qv-img {
    max-width: 100% !important;
    max-height: 250px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    margin: 0 auto !important;
    display: block !important;
}

.sr-qv-info-col {
    padding: 10px 30px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sr-qv-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #222 !important;
    margin: 0 0 10px !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    word-break: break-word !important;
    text-align: left !important;
    /* Limit title to 3 lines to contain huge texts */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sr-qv-prices {
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.sr-qv-price {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #e50000 !important;
    letter-spacing: normal !important;
}

.sr-qv-regular-price {
    font-size: 16px;
    color: #888;
    text-decoration: line-through;
}

/* Accordion Description Styling */
.sr-qv-accordion {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}

.sr-qv-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #222;
    user-select: none;
}

.sr-qv-accordion-icon {
    transition: transform 0.3s ease;
    color: #555;
}

.sr-qv-accordion.expanded .sr-qv-accordion-icon {
    transform: rotate(180deg);
}

.sr-qv-accordion-content {
    /* 14px * 1.5 line-height = 21px per line. 2 lines = 42px */
    max-height: 42px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.35s ease, padding 0.35s ease;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.sr-qv-accordion-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sr-qv-accordion.expanded .sr-qv-accordion-content {
    max-height: 1500px;
    padding-bottom: 15px;
}

.sr-qv-accordion.expanded .sr-qv-accordion-content::after {
    opacity: 0;
}

.sr-qv-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    /* Ensure buttons wrap if too wide */
}

.sr-qv-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

/* Variant UI Styling */
.sr-qv-variants {
    margin-bottom: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.sr-qv-variant-group {
    margin-bottom: 15px;
}

.sr-qv-variant-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.sr-qv-color-list,
.sr-qv-radio-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sr-qv-color-item label,
.sr-qv-radio-item label {
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.sr-qv-color-input,
.sr-qv-radio-input {
    display: none;
}

.sr-qv-color-swatch {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px #ddd;
    transition: all 0.2s;
}

.sr-qv-color-input:checked+.sr-qv-color-swatch {
    box-shadow: 0 0 0 2px #e50000;
    transform: scale(1.1);
}

.sr-qv-radio-label {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
    background: #fff;
    color: #333;
}

.sr-qv-radio-input:checked+.sr-qv-radio-label {
    border-color: #e50000;
    background: #fff5f5;
    color: #e50000;
    font-weight: 600;
}

.sr-qv-btn-more {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

/* 
 * Native PrestaShop Quickview overrides 
 * Applies when we inject Native Quickview HTML instead of custom 
 */
.sr-native-quickview-wrap {
    width: 100%;
    height: 100%;
    padding: 20px 30px;
    box-sizing: border-box;
}

.sr-native-quickview-wrap .product-container {
    padding: 0;
}

.sr-native-quickview-wrap .images-container {
    margin-bottom: 20px;
}

.sr-native-quickview-wrap .product-images>li.thumb-container {
    position: relative;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, .15);
}

.sr-native-quickview-wrap .product-price-and-shipping {
    font-size: 24px;
    font-weight: 700;
    color: #e50000;
    margin-bottom: 20px;
}

.sr-native-quickview-wrap h1 {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 10px;
    line-height: 1.3;
    text-transform: none;
}

.sr-native-quickview-wrap .product-information {
    margin-top: 15px;
}

.sr-native-quickview-wrap #product-description-short {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}

.sr-native-quickview-wrap .product-actions {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.sr-native-quickview-wrap .add-to-cart {
    background: #e50000;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    width: 100%;
    margin-top: 15px;
}

.sr-native-quickview-wrap .add-to-cart:hover {
    background: #cc0000;
}

.sr-native-quickview-wrap .product-variants-item {
    margin-bottom: 15px;
}

.sr-native-quickview-wrap .product-variants-item label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    display: block;
}

.sr-native-quickview-wrap .control-label {
    display: none;
    /* Hide 'Quantity' label if present */
}

.sr-qv-btn-more:hover {
    background: #ebebeb;
}

.sr-qv-add-to-cart {
    flex: 1;
    display: flex;
    margin: 0;
}

.sr-qv-btn-cart {
    background: #e50000;
    color: #fff;
    width: 100%;
}

.sr-qv-btn-cart:hover {
    background: #cc0000;
}

.sr-qv-out-of-stock {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    background: #ffebeb;
    color: #cc0000;
    border: 1px solid #ffcccc;
}

/* Related Products Carousel */
.sr-qv-related {
    margin-top: auto;
    padding-top: 30px;
    padding-bottom: 10px;
    border-top: 1px solid #eee;
}

.sr-qv-related-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #333;
}

.sr-qv-related-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.sr-qv-related-carousel::-webkit-scrollbar {
    height: 6px;
}

.sr-qv-related-carousel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.sr-qv-related-carousel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.sr-qv-related-item {
    flex: 0 0 110px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #333;
}

.sr-qv-related-item:hover {
    text-decoration: none;
    color: #000;
}

.sr-qv-related-img-wrap {
    width: 110px;
    height: 110px;
    background: #f9f9f9;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sr-qv-related-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sr-qv-related-name {
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sr-qv-related-price {
    font-size: 14px;
    font-weight: 700;
    color: #e50000;
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .shoppablereels-modal-content {
        height: 90vh;
        overflow-y: auto;
        /* Allow the entire modal to scroll on mobile */
        -webkit-overflow-scrolling: touch;
    }

    .shoppablereels-modal-split {
        flex-direction: column;
        flex-wrap: nowrap;
        height: auto;
    }

    .shoppablereels-modal-video-col {
        height: auto;
        flex: 0 0 auto;
    }

    .shoppablereels-modal-video-col video {
        max-height: 55vh;
        /* Keep video visible within a fixed viewport chunk */
        width: 100%;
        object-fit: cover;
    }

    .shoppablereels-modal-info-col {
        height: auto;
        /* Let Iframe resize itself dynamically without a secondary scrollbar */
        flex: 0 0 auto;
        padding: 0;
        overflow-y: visible;
    }
}