/* ==========================================================================
   Sri Vanitha Covering - Shop By Video (Reels Slider) Styling
   Clean Luxury UI/UX with perfect card sizing and rounded video clipping
   ========================================================================== */

.vanitha-shop-by-video-section {
    width: 100%;
    padding: 40px 0 50px;
    position: relative;
    box-sizing: border-box;
    clear: both;
}

.sbv-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 35px; /* Added padding so side buttons fit cleanly outside cards */
    position: relative;
    box-sizing: border-box;
}

/* Header */
.sbv-header {
    text-align: center;
    margin-bottom: 28px;
}

.sbv-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(179, 125, 78, 0.12);
    color: #9d6836;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(179, 125, 78, 0.3);
    margin-bottom: 8px;
}

.sbv-badge svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.sbv-title {
    font-size: 32px;
    font-family: 'Marcellus', serif, sans-serif;
    color: #1a1a1a;
    margin: 0 0 6px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.sbv-subtitle {
    font-size: 14px;
    color: #777777;
    margin: 0;
    font-family: 'Rubik', sans-serif;
}

/* Carousel Wrapper & Side Navigation Arrows */
.sbv-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 8px 0 16px;
}

.sbv-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(179, 125, 78, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 25 !important;
    outline: none !important;
    padding: 0 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16) !important;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.sbv-prev {
    left: -24px !important;
}

.sbv-next {
    right: -24px !important;
}

.sbv-nav-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(157, 104, 54, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(0.9);
    pointer-events: none;
}

.sbv-nav-btn:hover,
.sbv-nav-btn:focus,
.sbv-nav-btn:active {
    background: linear-gradient(135deg, #b37d4e 0%, #9d6836 100%) !important;
    border-color: #9d6836 !important;
    transform: translateY(-50%) scale(1.15) !important;
    box-shadow: 0 8px 26px rgba(157, 104, 54, 0.55) !important;
}

.sbv-nav-btn:hover::after {
    opacity: 1;
    transform: scale(1.08);
}

.sbv-nav-btn svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    stroke: #1a1a1a !important;
    transition: transform 0.25s ease, stroke 0.25s ease !important;
}

.sbv-nav-btn:hover svg,
.sbv-nav-btn:focus svg,
.sbv-nav-btn:active svg {
    stroke: #ffffff !important;
}

.sbv-prev:hover svg {
    transform: translateX(-3px) !important;
}

.sbv-next:hover svg {
    transform: translateX(3px) !important;
}

/* Carousel Track & Slider */
.sbv-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 8px 2px 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sbv-track::-webkit-scrollbar {
    display: none;
}

/* ==========================================================================
   Exact Proportional Card Sizing (Desktop):
   5 full cards fit the container width. Zero cut-off!
   ========================================================================== */
.sbv-card {
    flex: 0 0 calc((100% - 4 * 16px) / 5);
    width: calc((100% - 4 * 16px) / 5);
    height: 390px;
    position: relative;
    border-radius: 16px !important;
    overflow: hidden !important;
    scroll-snap-align: start;
    cursor: pointer;
    background: #111111;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    user-select: none;
    box-sizing: border-box;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: -webkit-radial-gradient(white, black);
}

.sbv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* Video Player with Hardware-Accelerated Corner Masking */
.sbv-video-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px !important;
    overflow: hidden !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: -webkit-radial-gradient(white, black);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.sbv-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px !important;
}

/* Dark Gradient Overlay */
.sbv-overlay {
    position: absolute;
    inset: 0;
    border-radius: 16px !important;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.05) 30%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.88) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Top Bar: Tag Badge & Sound Button */
.sbv-top-bar {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.sbv-item-tag {
    background: rgba(26, 26, 26, 0.7);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.sbv-sound-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    outline: none;
    padding: 0;
}

.sbv-sound-btn:hover {
    background: rgba(179, 125, 78, 0.9);
    transform: scale(1.08);
}

.sbv-sound-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    pointer-events: none;
}

/* Center Play Indicator */
.sbv-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}

.sbv-card:hover .sbv-play-indicator {
    opacity: 0.9;
}

.sbv-play-indicator svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    margin-left: 2px;
}

/* Bottom Product Floating Card */
.sbv-product-pill {
    position: absolute;
    bottom: 10px;
    left: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 2;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
    text-decoration: none !important;
    box-sizing: border-box;
}

.sbv-product-pill:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

.sbv-thumb-wrap {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.sbv-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sbv-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sbv-prod-name {
    font-size: 11px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    margin-bottom: 2px;
    font-family: 'Rubik', sans-serif;
}

/* Prevent Price Wrapping */
.sbv-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap !important;
    overflow: hidden;
}

.sbv-price {
    font-size: 12px;
    font-weight: 700;
    color: #9d6836;
    line-height: 1;
    white-space: nowrap !important;
}

.sbv-reg-price {
    font-size: 10px;
    color: #999999;
    text-decoration: line-through;
    white-space: nowrap !important;
}

.sbv-shop-btn {
    background: #9d6836;
    color: #ffffff !important;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: 5px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
    display: inline-block;
}

.sbv-shop-btn:hover {
    background: #845529;
    transform: scale(1.04);
}

/* Slider Dots Pagination */
.sbv-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.sbv-dot {
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background: #d8cebe;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sbv-dot.active {
    width: 28px;
    background: #9d6836;
}

.sbv-dot:hover:not(.active) {
    background: #bfa895;
}

/* Modal Reel Viewer */
.sbv-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.sbv-modal-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 85vh;
    max-height: 680px;
    border-radius: 20px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

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

.sbv-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s, transform 0.15s;
}

.sbv-modal-close:hover {
    background: rgba(179, 125, 78, 0.9);
    transform: scale(1.1);
}

.sbv-modal-close svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Laptops / Small Desktops (992px - 1199px): 4 full cards */
@media (min-width: 992px) and (max-width: 1199px) {
    .sbv-card {
        flex: 0 0 calc((100% - 3 * 16px) / 4);
        width: calc((100% - 3 * 16px) / 4);
    }
}

/* Tablets (768px - 991px): 3 full cards */
@media (min-width: 768px) and (max-width: 991px) {
    .sbv-card {
        flex: 0 0 calc((100% - 2 * 14px) / 3);
        width: calc((100% - 2 * 14px) / 3);
        height: 370px;
    }
}

/* Small Tablets / Large Phones (576px - 767px): 2 full cards */
@media (min-width: 576px) and (max-width: 767px) {
    .sbv-card {
        flex: 0 0 calc((100% - 1 * 12px) / 2);
        width: calc((100% - 1 * 12px) / 2);
        height: 360px;
    }
}

/* ==========================================================================
   Mobile Devices (<576px): EXACTLY 2 FULL CARDS side-by-side!
   Zero cut cards! Clean, balanced view!
   ========================================================================== */
@media (max-width: 575px) {
    .vanitha-shop-by-video-section {
        padding: 25px 0 35px;
    }

    .sbv-container {
        padding: 0 12px;
    }

    .sbv-title {
        font-size: 24px;
    }

    .sbv-subtitle {
        font-size: 13px;
    }

    /* 2 FULL CARDS SIDE BY SIDE */
    .sbv-track {
        gap: 10px;
        padding: 6px 1px 12px;
        scroll-snap-type: x mandatory;
    }

    .sbv-card {
        flex: 0 0 calc((100% - 10px) / 2) !important;
        width: calc((100% - 10px) / 2) !important;
        max-width: none !important;
        height: 310px !important;
        border-radius: 14px !important;
        scroll-snap-align: start;
    }

    .sbv-card .sbv-product-pill {
        padding: 5px 6px;
        bottom: 8px;
        left: 6px;
        right: 6px;
        gap: 6px;
        border-radius: 8px;
    }

    .sbv-card .sbv-thumb-wrap {
        width: 30px;
        height: 30px;
        border-radius: 5px;
    }

    .sbv-card .sbv-prod-name {
        font-size: 10px;
        margin-bottom: 1px;
    }

    .sbv-card .sbv-price {
        font-size: 11px;
    }

    .sbv-card .sbv-reg-price {
        font-size: 9px;
    }

    .sbv-card .sbv-shop-btn {
        font-size: 9px;
        padding: 4px 6px;
        border-radius: 4px;
    }

    .sbv-top-bar {
        top: 8px;
        left: 8px;
        right: 8px;
    }

    .sbv-item-tag {
        font-size: 8px;
        padding: 2px 6px;
    }

    .sbv-sound-btn {
        width: 26px;
        height: 26px;
    }

    .sbv-sound-btn svg {
        width: 12px;
        height: 12px;
    }

    .sbv-nav-btn {
        display: none !important; /* Mobile uses clean touch swipe with pagination dots */
    }
}
