/* Smart Reels Frontend Styles - assets/frontend/css/smart-reels.css */

:root {
    --smart-primary: #F5004F;
    --smart-overlay: rgba(0, 0, 0, 0.6);
    --smart-white: #ffffff;
    --smart-border-radius: 12px;
    --smart-transition: all 0.3s ease;
    --smart-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
.smart-reels-playlist,
.smart-reels-stories,
.smart-reel-pop {
    box-sizing: border-box;
}
.smart-story-viewer *{
    outline: 0 !important;
}

.smart-reels-playlist *,
.smart-reels-stories *,
.smart-reel-pop * {
    box-sizing: inherit;
    outline: 0 !important;
}

/* ==== PLAYLIST LAYOUTS ==== */

/* Playlist Container */
.smart-reels-playlist {
    margin: 20px 0;
    width: 100%;
}

/* Grid Layout */
.smart-reels-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

.smart-reels-grid[data-videos-per-row="2"] { grid-template-columns: repeat(2, 1fr); }
.smart-reels-grid[data-videos-per-row="3"] { grid-template-columns: repeat(3, 1fr); }
.smart-reels-grid[data-videos-per-row="4"] { grid-template-columns: repeat(4, 1fr); }
.smart-reels-grid[data-videos-per-row="5"] { grid-template-columns: repeat(5, 1fr); }
.smart-reels-grid[data-videos-per-row="6"] { grid-template-columns: repeat(6, 1fr); }

/* Carousel Layout */
.smart-reels-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.smart-reels-carousel .smart-carousel-container {
    display: flex;
    transition: transform 0.3s ease;
    gap: 20px;
}

.smart-reels-carousel .smart-reel-item {
    flex: 0 0 auto;
    width: calc((100% - 60px) / 4); /* Default 4 per row */
}

.smart-reels-carousel[data-videos-per-row="2"] .smart-reel-item { width: calc((100% - 20px) / 2); }
.smart-reels-carousel[data-videos-per-row="3"] .smart-reel-item { width: calc((100% - 40px) / 3); }
.smart-reels-carousel[data-videos-per-row="4"] .smart-reel-item { width: calc((100% - 60px) / 4); }
.smart-reels-carousel[data-videos-per-row="5"] .smart-reel-item { width: calc((100% - 80px) / 5); }
.smart-reels-carousel[data-videos-per-row="6"] .smart-reel-item { width: calc((100% - 100px) / 6); }

/* Carousel Arrows */
.smart-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--smart-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--smart-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--smart-transition);
}

.smart-carousel-arrow:hover {
    background: var(--smart-primary);
    color: var(--smart-white);
}

.smart-carousel-arrow.prev {
    left: -20px;
}

.smart-carousel-arrow.next {
    right: -20px;
}

.smart-carousel-arrow svg {
    width: 16px;
    height: 16px;
}

/* Stacked Layout */
.smart-reels-stacked {
    position: relative;
    width: 300px;
    height: 400px;
    margin: 0 auto;
}

.smart-reels-stacked .smart-reel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: var(--smart-transition);
    cursor: pointer;
}

.smart-reels-stacked .smart-reel-item:nth-child(1) {
    z-index: 3;
    transform: translateY(0px);
}

.smart-reels-stacked .smart-reel-item:nth-child(2) {
    z-index: 2;
    transform: translateY(10px) translateX(10px);
}

.smart-reels-stacked .smart-reel-item:nth-child(3) {
    z-index: 1;
    transform: translateY(20px) translateX(20px);
}

/* Reel Item Base Styles */
.smart-reel-item {
    border-radius: var(--smart-border-radius);
    overflow: hidden;
    background: var(--smart-white);
    box-shadow: var(--smart-shadow);
    transition: var(--smart-transition);
    cursor: pointer;
}

.smart-reel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Reel Thumbnail */
.reel-thumbnail {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #f0f0f0;
}

.reel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--smart-transition);
}

.reel-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--smart-white);
    font-size: 24px;
}

/* Play Button */
.reel-play-button {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--smart-transition);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.reel-play-button:hover {
    background: var(--smart-primary);
    color: var(--smart-white);
    transform: scale(1.1);
}

.reel-play-button svg {
    width: 20px;
    height: 20px;
    margin-left: 2px; /* Optical centering */
}

/* Play Button Positions */
.reel-play-button.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.reel-play-button.bottom-left {
    bottom: 15px;
    left: 15px;
}

.reel-play-button.bottom-right {
    bottom: 15px;
    right: 15px;
}

.reel-play-button.top-left {
    top: 15px;
    left: 15px;
}

.reel-play-button.top-right {
    top: 15px;
    right: 15px;
}

/* Overlay Template */
.reel-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, var(--smart-overlay));
    padding: 30px 15px 15px;
    color: var(--smart-white);
}

.reel-overlay-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Classic and Title Templates */
.reel-info {
    padding: 15px;
}

.reel-info h4 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.smart-quick-add-to-cart {
    background: var(--smart-primary);
    color: var(--smart-white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--smart-transition);
}

.smart-quick-add-to-cart:hover {
    background: #d6003d;
    transform: translateY(-1px);
}

/* ==== STORIES LAYOUT ==== */

.smart-reels-stories {
    margin: 20px 0;
}

.smart-stories-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.smart-stories-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.smart-story-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--smart-transition);
}

.smart-story-item:hover {
    transform: translateY(-3px);
}

.story-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(45deg, var(--smart-primary), #ff8a80);
    padding: 3px;
    margin-bottom: 8px;
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--smart-white);
}

.story-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    border: 2px solid var(--smart-white);
}

.story-title {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Story Play Button */
.story-avatar .reel-play-button {
    width: 24px;
    height: 24px;
    background: var(--smart-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.story-avatar .reel-play-button svg {
    width: 12px;
    height: 12px;
}

/* ==== REEL POPS ==== */

.smart-reel-pop-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: smartFadeInUp 0.5s ease-out;
    transform-origin: bottom right;
}

.smart-reel-pop-wrapper.hidden {
    display: none;
}

/* Close animation - scale down and fade out */
.smart-reel-pop-wrapper.closing {
    animation: smartScaleOut 0.3s ease-in forwards;
}

@keyframes smartScaleOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

/* Close button - positioned outside top right */
.reel-pop-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reel-pop-close:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.reel-pop-close svg {
    width: 16px;
    height: 16px;
    color: #333;
}

.smart-reel-pop {
    position: relative;
    width: 150px;
    height: 267px;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@keyframes smartFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Title overlay - top left */
.reel-pop-title {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 40px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    z-index: 5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reel-pop-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.reel-pop-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Reel Pop Video (for autoplay) */
.reel-pop-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.reel-pop-poster {
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.reel-pop-poster.hidden,
.reel-pop-poster.hidden-when-playing {
    opacity: 0;
    pointer-events: none;
}

.smart-reel-pop.autoplay-enabled .reel-pop-poster,
.smart-reel-pop.autoplay-hover-enabled:hover .reel-pop-poster {
    opacity: 0;
}

/* Tap to unmute button - centered */
.reel-pop-unmute {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s ease, opacity 0.3s ease;
    white-space: nowrap;
}

.reel-pop-unmute:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
}

.reel-pop-unmute.hidden {
    opacity: 0;
    pointer-events: none;
}

.reel-pop-unmute svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Play button - centered (when autoplay disabled) */
.reel-pop-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.smart-reel-pop:hover .reel-pop-play {
    transform: translate(-50%, -50%) scale(1.1);
}

.reel-pop-play svg {
    width: 20px;
    height: 20px;
    color: #333;
    margin-left: 2px;
}

/* ==== POPUP MODAL ==== */

.smart-reels-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--smart-transition);
}

.smart-reels-popup.active {
    opacity: 1;
    visibility: visible;
}

.smart-popup-container {
    display: flex;
    max-width: 1200px;
    max-height: 90vh;
    width: 90%;
    background: var(--smart-white);
    border-radius: var(--smart-border-radius);
    overflow: hidden;
    position: relative;
    animation: smartPopupSlideIn 0.3s ease-out;
}

@keyframes smartPopupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Popup Video Section */
.smart-popup-video {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
}

.smart-popup-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.smart-popup-video .video-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.video-control-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--smart-white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--smart-transition);
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.video-control-btn svg {
    width: 16px;
    height: 16px;
}

/* Popup Product Section */
.smart-popup-product {
    flex: 0 0 400px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--smart-white);
    border-left: 1px solid #f0f0f0;
}

.smart-popup-product-info h2 {
    margin: 0 0 15px;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.product-price {
    margin-bottom: 20px;
}

.product-price .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--smart-primary);
}

.product-price del {
    color: #999;
    font-size: 20px;
    margin-right: 10px;
}

.product-description {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.6;
    font-size: 16px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-actions .single_add_to_cart_button {
    background: var(--smart-primary);
    color: var(--smart-white);
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--smart-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-actions .single_add_to_cart_button:hover {
    background: #d6003d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 0, 79, 0.3);
}

.product-actions .view-product {
    background: transparent;
    color: #333;
    border: 2px solid #ddd;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: var(--smart-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-actions .view-product:hover {
    border-color: var(--smart-primary);
    color: var(--smart-primary);
    background: rgba(245, 0, 79, 0.05);
}

/* Summary container resets */
.smart-popup-product-info .summary.entry-summary {
    width: 100% !important;
    float: none !important;
}

.smart-popup-product-info .summary.entry-summary .product_title.entry-title {
    margin-bottom: 0 !important;
}

.smart-popup-product-info .summary.entry-summary .price {
    margin-top: 0;
    margin-bottom: 0 !important;
}

.smart-popup-product-info .summary.entry-summary .single_variation_wrap {
    /* Placeholder for future customization */
}

.smart-popup-product-info .summary.entry-summary .single_variation_wrap .woocommerce-variation-add-to-cart {
    padding-top: 0;
    margin-top: 0;
}

/* Price styling in summary */
.smart-popup-product-info .summary .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--smart-primary);
    margin-bottom: 20px;
    display: block;
}

.smart-popup-product-info .summary .price del {
    color: #999;
    font-size: 20px;
    margin-right: 10px;
}

.smart-popup-product-info .summary .price ins {
    text-decoration: none;
}

/* Excerpt/Description */
.smart-popup-product-info .woocommerce-product-details__short-description {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.6;
    font-size: 16px;
}

/* Variations Form */
.smart-popup-product-info .variations {
    margin-bottom: 20px;
    border: none;
}

.smart-popup-product-info .variations tr {
    display: flex;
    flex-direction: column;
}

.smart-popup-product-info .variations .label {
    padding: 0 0 8px 0;
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smart-popup-product-info .variations .value {
    display: block;
    padding: 0;
}

.smart-popup-product-info .variations select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: white;
    cursor: pointer;
    transition: var(--smart-transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.smart-popup-product-info .variations select:hover {
    border-color: #bbb;
}

.smart-popup-product-info .variations select:focus {
    outline: none;
    border-color: var(--smart-primary);
    box-shadow: 0 0 0 3px rgba(245, 0, 79, 0.1);
}

/* Reset variations link */
.smart-popup-product-info .reset_variations {
    display: inline-block;
    margin-top: 10px;
    color: #666;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    transition: var(--smart-transition);
}

.smart-popup-product-info .reset_variations:hover {
    color: var(--smart-primary);
}

.smart-popup-product-info .woocommerce-variation-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.smart-popup-product-info .woocommerce-variation-price {
    margin-bottom: 10px;
}

.smart-popup-product-info .woocommerce-variation-availability {
    font-size: 14px;
    margin-bottom: 10px;
}

/* Quantity Input */
.smart-popup-product-info .quantity {
    display: inline-block;
    margin-right: 10px;
}

.smart-popup-product-info .quantity input[type="number"] {
    width: 80px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    transition: var(--smart-transition);
}

.smart-popup-product-info .quantity input[type="number"]:focus {
    outline: none;
    border-color: var(--smart-primary);
    box-shadow: 0 0 0 3px rgba(245, 0, 79, 0.1);
}

/* Add to Cart Button (all types) */
.smart-popup-product-info .cart .single_add_to_cart_button,
.smart-popup-product-info .single_add_to_cart_button {
    background: var(--smart-primary);
    color: var(--smart-white);
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--smart-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.smart-popup-product-info .cart .single_add_to_cart_button:hover,
.smart-popup-product-info .single_add_to_cart_button:hover {
    background: #d6003d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 0, 79, 0.3);
}

.smart-popup-product-info .cart .single_add_to_cart_button:disabled,
.smart-popup-product-info .single_add_to_cart_button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Stock Status */
.smart-popup-product-info .stock {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

.smart-popup-product-info .stock.in-stock {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.smart-popup-product-info .stock.out-of-stock {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* View Product Link */
.smart-popup-product-info .product-view-link {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.smart-popup-product-info .product-view-link a,
.smart-popup-product-info .view-product-link {
    display: block;
    background: transparent;
    color: #333;
    border: 2px solid #ddd;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: var(--smart-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smart-popup-product-info .product-view-link a:hover,
.smart-popup-product-info .view-product-link:hover {
    border-color: var(--smart-primary);
    color: var(--smart-primary);
    background: rgba(245, 0, 79, 0.05);
}

/* Grouped Products */
.smart-popup-product-info .woocommerce-grouped-product-list {
    margin-bottom: 20px;
    border-collapse: collapse;
    width: 100%;
}

.smart-popup-product-info .woocommerce-grouped-product-list tr {
    border-bottom: 1px solid #e0e0e0;
}

.smart-popup-product-info .woocommerce-grouped-product-list .woocommerce-grouped-product-list-item__label {
    padding: 12px 0;
    font-weight: 500;
}

.smart-popup-product-info .woocommerce-grouped-product-list .woocommerce-grouped-product-list-item__price {
    padding: 12px 0;
    color: #666;
}

.smart-popup-product-info .woocommerce-grouped-product-list .woocommerce-grouped-product-list-item__quantity {
    padding: 12px 0;
}

/* External Products */
.smart-popup-product-info .product_type_external {
    background: var(--smart-primary);
    color: var(--smart-white);
    text-decoration: none;
    display: block;
    text-align: center;
}

.highlight-content.no-product .story-viewer-video {
    border-radius: 12px;
}

/* Product Meta (if enabled) */
.smart-popup-product-info .product_meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #666;
}

.smart-popup-product-info .product_meta > span {
    display: block;
    margin-bottom: 8px;
}

/* Make sure cart form displays properly */
.smart-popup-product-info form.cart {
    margin-bottom: 20px;
}

.smart-popup-product-info form.cart .variations_button {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Loading state for add to cart */
.smart-popup-product-info .single_add_to_cart_button.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.smart-popup-product-info .single_add_to_cart_button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Override any theme max-width on popup */
.smart-popup-product-info .woocommerce {
    max-width: none;
}

.smart-popup-product-info .product {
    max-width: none;
}

/* Popup Close Button */
.smart-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--smart-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--smart-transition);
    backdrop-filter: blur(10px);
}

.smart-popup-close:hover {
    background: var(--smart-primary);
    transform: rotate(90deg);
}

.smart-popup-close svg {
    width: 20px;
    height: 20px;
}

/* Loading States */
.smart-popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #666;
}

.smart-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--smart-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add to Cart Notification */
.smart-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    background: var(--smart-primary);
    color: white;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.smart-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.smart-notification-success {
    background: #28a745;
}

.smart-notification-error {
    background: #dc3545;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .smart-popup-container {
        flex-direction: column;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .smart-popup-video {
        min-height: 300px;
    }
    
    .smart-popup-product {
        flex: none;
        border-left: none;
        border-top: 1px solid #f0f0f0;
    }
}

@media (max-width: 768px) {
    /* Grid Responsive */
    .smart-reels-grid[data-videos-per-row="4"],
    .smart-reels-grid[data-videos-per-row="5"],
    .smart-reels-grid[data-videos-per-row="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .smart-reels-grid[data-videos-per-row="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Carousel Responsive */
    .smart-reels-carousel[data-videos-per-row="4"] .smart-reel-item,
    .smart-reels-carousel[data-videos-per-row="5"] .smart-reel-item,
    .smart-reels-carousel[data-videos-per-row="6"] .smart-reel-item {
        width: calc((100% - 20px) / 2);
    }
    
    .smart-reels-carousel[data-videos-per-row="3"] .smart-reel-item {
        width: calc((100% - 20px) / 2);
    }
    
    /* Stories Mobile */
    .story-avatar {
        width: 60px;
        height: 60px;
    }
    
    .story-title {
        font-size: 11px;
        max-width: 60px;
    }
    
    /* Reel Pop Mobile */
    .smart-reel-pop {
        bottom: 15px;
        right: 15px;
        width: 70px;
        height: 105px;
    }
    
    /* Popup Mobile */
    .smart-popup-container {
        width: 95%;
        margin: 20px;
    }
    
    .smart-popup-product {
        padding: 20px;
    }
    
    .smart-popup-product-info h2 {
        font-size: 20px;
    }
    
    .product-price .price {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .smart-reels-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .smart-reels-carousel .smart-reel-item {
        width: 100%;
    }
    
    .smart-carousel-arrow {
        display: none;
    }
}

/* Accessibility */
.smart-reel-item:focus,
.smart-story-item:focus,
.smart-reel-pop:focus {
    outline: 2px solid var(--smart-primary);
    outline-offset: 2px;
}

.reel-play-button:focus {
    outline: 2px solid var(--smart-primary);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* ==== COMPLETE STORY HIGHLIGHTS CSS - FINAL VERSION ==== */

/* Story Highlights Frontend Display */
.smart-reels-stories {
    margin: 20px 0;
    width: 100%;
}

.smart-story-highlights {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 15px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.smart-story-highlights::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.smart-story-highlight {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--smart-transition);
    text-decoration: none;
    color: inherit;
    padding-left: 2px;
    padding-right: 2px;    
}

.smart-story-highlight:hover .story-highlight-avatar{
    transform: translateY(-3px);
}

.story-highlight-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(45deg, var(--smart-primary), #ff8a80);
    padding: 3px;
    margin-bottom: 8px;
    transition: var(--smart-transition);
}

.smart-story-highlight:hover .story-highlight-avatar {
    transform: scale(1.05);
}

.story-highlight-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--smart-white);
}

.story-highlight-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    border: 2px solid var(--smart-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
}

.story-highlight-title {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

/* Story Viewer Popup */
.smart-story-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--smart-transition);
}

.smart-story-viewer.active {
    opacity: 1;
    visibility: visible;
}
/* Enhanced Story Viewer with Swiper Integration */

/* Main story viewer container */
.smart-story-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.smart-story-viewer.active {
    opacity: 1;
    visibility: visible;
}

/* Story viewer container with Swiper */
.story-viewer-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Swiper container for highlights */
.story-highlights-swiper {
    width: 100%;
    height: 100%;
    position: relative;
}

.story-highlights-swiper .swiper-wrapper {
    display: flex;
    align-items: center;
}

.story-highlights-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Individual highlight content */
.highlight-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: 1000px;
    gap: 0px;
}

/* Video section within each highlight */
.story-viewer-video {
    position: relative;
    width: 400px;
    height: 600px;
    background: #000;
    border-radius: 12px 0 0 12px;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 1;
}

/* Story progress bars (per highlight) */
.story-progress-bars {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    background: #ffffff;
    width: 0%;
    transition: width 0.1s ease;
}

.story-progress-fill.story-progress-animating {
    transition: none;
}

/* Story header */
/* Close button - positioned at viewport edge */
#smart-story-viewer > .story-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

#smart-story-viewer > .story-close-btn:hover {
    background: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#smart-story-viewer > .story-close-btn svg {
    width: 15px;
    height: 20px;
    fill: #333 !important;
}

/* Video container */
#story-video-container,
[id^="story-video-container-"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1;
}

#story-video-container .video-js,
[id^="story-video-container-"] .video-js {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
}

#story-video-container .vjs-tech {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Hide VideoJS controls */
#story-video-container .vjs-control-bar,
#story-video-container .vjs-big-play-button,
#story-video-container .vjs-loading-spinner {
    display: none !important;
}

/* Story navigation areas */
.story-nav-left,
.story-nav-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 5;
    outline: none !important;
}

.story-nav-left {
    left: 0;
}

.story-nav-right {
    right: 0;
}

/* Video loader */
.story-video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.simple-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ff004f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Product info panel */
.story-product-info {
    flex: 0 0 400px;
    height: 600px;
    background: white;
    padding: 15px;
    border-radius: 0 12px 12px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

/* Highlight indicators */
.highlight-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 15;
}

.highlight-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.highlight-dot.active {
    background: #ffffff;
    transform: scale(1.2);
}

/* Swiper navigation arrows */
.swiper-button-next,
.swiper-button-prev {
    color: rgba(255, 255, 255, 0.8) !important;
    background: rgba(0, 0, 0, 0.3);
    width: 44px !important;
    height: 44px !important;
    margin-top: -22px !important;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 16px !important;
    font-weight: bold;
}

/* Highlight preview slides */
.highlight-preview {
    opacity: 0.7;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.swiper-slide-active .highlight-preview {
    opacity: 1;
    transform: scale(1);
}
/* Enhanced progress bar smoothness */
.story-progress-fill {
    will-change: width;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Prevent progress bar flickering */
.story-progress-bar {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Smooth progress animations */
.story-progress-fill.smooth-progress {
    transition: width 0.1s linear !important;
}

.story-progress-fill.completing {
    transition: width 0.3s ease-out !important;
}
/* Basic Video Controls CSS - Play/Pause & Mute/Unmute */

/* Play/Pause Button (Top Right) */
.story-play-pause-btn {
    position: absolute;
    top: 25px;
    outline: 0 !important;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100 !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    font-size: inherit !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    min-width: auto !important;
    min-height: auto !important;
}

.story-play-pause-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.story-play-pause-btn:active {
    transform: scale(0.95);
}

.story-play-pause-btn svg {
    width: 16px;
    height: 16px;
    transition: all 0.2s ease;
    fill: #fff !important;
}

/* Mute/Unmute Button (Bottom Right) */
.story-mute-btn {
    position: absolute;
    bottom: 20px;
    outline: 0 !important;
    right: 20px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100 !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    font-size: inherit !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    min-width: auto !important;
    min-height: auto !important;
}

.story-mute-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.story-mute-btn:active {
    transform: scale(0.95);
}

.story-mute-btn svg {
    width: 16px;
    height: 16px;
    fill: #fff !important;
    transition: all 0.2s ease;
}

/* Visual feedback when muted */
.story-mute-btn.muted {
    background: rgba(255, 152, 0, 0.8);
}

.story-mute-btn.muted:hover {
    background: rgba(255, 152, 0, 1);
}

/* Button activation animation */
@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.story-play-pause-btn.just-clicked,
.story-mute-btn.just-clicked {
    animation: buttonPress 0.2s ease;
}

/* Focus states for accessibility */
.story-play-pause-btn:focus,
.story-mute-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .story-play-pause-btn,
    .story-mute-btn {
        width: 32px;
        height: 32px;
    }

    .highlight-content.no-product .story-mute-btn {
        bottom: 40px;
        transition: none !important;
    }

    .story-play-pause-btn svg,
    .story-mute-btn svg {
        width: 16px;
    }

    .story-play-pause-btn {
        top: 24px;
        right: 50px;
    }

    .story-mute-btn {
        bottom: 12px;
        right: 15px;
    }

    .highlight-content > .story-close-btn {
        width: 28px;
        height: 28px;
        top: 10px;
        right: 10px;
    }

    .highlight-content > .story-close-btn svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .story-play-pause-btn,
    .story-mute-btn {
    }

    .story-play-pause-btn svg,
    .story-mute-btn svg {
    }

    .story-play-pause-btn {
    }

    .story-mute-btn {
        bottom: 10px;
    }

    .highlight-content > .story-close-btn {
        width: 26px;
        height: 26px;
        top: 8px;
        right: 8px;
    }

    .highlight-content > .story-close-btn svg {
        width: 12px;
        height: 12px;
    }
}

/* Enhanced hover effects */
.story-play-pause-btn:hover,
.story-mute-btn:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .story-play-pause-btn,
    .story-mute-btn {
        transition: none;
        animation: none;
    }
    
    .story-play-pause-btn:hover,
    .story-mute-btn:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .story-play-pause-btn,
    .story-mute-btn {
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid white;
    }
    
    .story-mute-btn.muted {
        background: orange;
        color: black;
    }
}

/* Ensure buttons don't interfere with navigation areas */
.story-nav-left,
.story-nav-right {
    /* Existing styles... */
    /* Make sure buttons don't overlap with control buttons */
}

.story-nav-right {
    right: 0;
    /* Ensure it doesn't conflict with positioned controls */
}

/* Button loading states (for future use) */
.story-play-pause-btn.loading,
.story-mute-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.story-play-pause-btn.loading svg,
.story-mute-btn.loading svg {
    animation: spin 1s linear infinite;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .story-viewer-video {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .highlight-content {
        flex-direction: column;
        gap: 0;
    }
    
    .story-product-info {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 20px 20px 0 0;
        max-height: 40%;
        z-index: 10;
    }
    
    .highlight-indicators {
        bottom: 20px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}
.story-viewer-container {
    display: flex;
    max-width: 1200px;
    max-height: 90vh;
    justify-content: center;
    width: 90%;
    position: relative;
    animation: smartStorySlideIn 0.3s ease-out;
}

@keyframes smartStorySlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* Story Progress Bars */
.story-progress-bars {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.story-progress-bar {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    background: white;
    width: 0%;
    transform-origin: left;
    will-change: width;
}

/* CSS ANIMATIONS FOR SMOOTH PROGRESS */
@keyframes story-progress-fill {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* Ensure smooth animations */
.story-progress-fill.story-progress-animating {
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

/* Story Header */
.story-header {
    position: absolute;
    top: 25px;
    left: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
    color: white;
}

.story-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    flex-shrink: 0;
}

.story-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-header-info {
    flex: 1;
}

.story-header-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.story-header-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Story Close Button - see .story-viewer-video .story-close-btn above */

/* Story Navigation Areas */
.story-nav-left,
.story-nav-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 5;
    outline: none !important;
}

.story-nav-left {
    left: 0;
}

.story-nav-right {
    right: 0;
}

.story-nav-left:hover,
.story-nav-right:hover {
    background: rgba(255, 255, 255, 0);
}

/* VIDEO CONTAINER AND VIDEOJS FIXES */
#story-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

#story-video-container .video-js {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
}

#story-video-container .vjs-tech {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Hide VideoJS controls */
#story-video-container .vjs-control-bar,
#story-video-container .vjs-big-play-button,
#story-video-container .vjs-loading-spinner {
    display: none !important;
}

/* SIMPLE VIDEO LOADER */
.story-video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.simple-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ff004f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.story-product-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-light);
}

.story-product-loading .smart-loading-spinner {
    margin-bottom: 15px;
}

.story-product-info h2 {
    margin: 0 0 15px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

.story-product-info .product-price {
    margin-bottom: 20px;
}

.story-product-info .product-price .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--smart-primary);
}

.story-product-info .product-description {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.6;
    font-size: 16px;
}

.story-product-info .product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.story-product-info .single_add_to_cart_button {
    background: var(--smart-primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--smart-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.story-product-info .single_add_to_cart_button:hover {
    background: #d6003d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 0, 79, 0.3);
}

.story-product-info .view-product {
    background: transparent;
    color: #333;
    border: 2px solid #ddd;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: var(--smart-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.story-product-info .view-product:hover {
    border-color: var(--smart-primary);
    color: var(--smart-primary);
    background: rgba(245, 0, 79, 0.05);
}

/* No Product Info State */
.no-product-info {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
}

.no-product-info p {
    margin: 0;
    font-size: 16px;
}

/* Product Error State */
.product-error {
    text-align: center;
    color: #dc2626;
    padding: 40px 20px;
    background: #fef2f2;
    border-radius: 8px;
}

.product-error p {
    margin: 0;
    font-size: 16px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .story-viewer-container {
        flex-direction: column;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .story-viewer-video {
        max-width: none;
        height: 60vh;
        aspect-ratio: auto;
    }
    
    .story-product-info {
        flex: none;
        margin-left: 0;
        margin-top: 20px;
        max-height: 35vh;
    }
}

@media (max-width: 768px) {
    .story-viewer-container {
        width: 95%;
        margin: 20px;
    }
    
    .story-product-info {
        padding: 20px;
    }
    
    .story-product-info h2 {
        font-size: 20px;
    }
    
    .story-product-info .product-price .price {
        font-size: 24px;
    }
    
    /* Mobile story highlights adjustments */
    .story-highlight-avatar {
        width: 70px;
        height: 70px;
    }
    
    .story-highlight-title {
        font-size: 11px;
        max-width: 70px;
    }
    
    .smart-story-highlights {
        gap: 12px;
        padding: 10px 0;
    }
    
    .story-progress-bars {
        top: 0;
        left: 0;
        right: 0;
        gap: 3px;
    }
    
    .story-progress-bar {
        height: 2px;
    }
}

@media (max-width: 480px) {
    .story-viewer-video {
        height: 50vh;
    }
    
    .story-product-info {
        padding: 15px;
    }
    
    .story-highlight-avatar {
        width: 60px;
        height: 60px;
    }
    
    .story-highlight-title {
        font-size: 10px;
        max-width: 60px;
    }
}

/* ACCESSIBILITY */
.smart-story-highlight:focus {
    outline: 2px solid var(--smart-primary);
    outline-offset: 4px;
    border-radius: 50%;
}

.story-close-btn:focus,
.story-nav-left:focus,
.story-nav-right:focus {
    outline: 2px solid var(--smart-primary);
    outline-offset: 2px;
}

/* REDUCED MOTION ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    .smart-story-highlight,
    .story-highlight-avatar,
    .story-progress-fill,
    .story-close-btn {
        transition: none;
    }
    
    .story-viewer-container {
        animation: none;
    }
    
    .story-progress-fill {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}

/* PERFORMANCE OPTIMIZATIONS */
.story-progress-bars {
    contain: layout style paint;
}

.story-progress-fill {
    contain: layout style paint size;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}
#story-video-player {
    width: 100%;
    height: 100%;
}
/* HIGH DPI DISPLAYS */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .story-progress-bar {
        height: 3px;
    }
}

/* ==== SINGLE REEL MODE ==== */
/* Used when Playlist/Reel Pops open a single reel via SmartReelsViewer */

.smart-story-viewer.single-reel-mode .swiper-button-next,
.smart-story-viewer.single-reel-mode .swiper-button-prev {
    display: none !important;
}

.smart-story-viewer.single-reel-mode .highlight-indicators {
    display: none !important;
}

/* Hide story count in header for single reel */
.smart-story-viewer.single-reel-mode .story-header-info p {
    display: none;
}

/* Adjust header for single reel - show title more prominently */
.smart-story-viewer.single-reel-mode .story-header-title {
    font-size: 16px;
    font-weight: 600;
}

/* Single reel doesn't need left/right navigation hints since there's only one reel */
.smart-story-viewer.single-reel-mode .story-nav-left,
.smart-story-viewer.single-reel-mode .story-nav-right {
    display: none;
}

/* Playlist mode - Show navigation for multiple reels */
.smart-story-viewer.playlist-mode .story-nav-left,
.smart-story-viewer.playlist-mode .story-nav-right {
    display: block;
}

/* Add visual indicators for playlist navigation */
.smart-story-viewer.playlist-mode .story-nav-left::before,
.smart-story-viewer.playlist-mode .story-nav-right::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.smart-story-viewer.playlist-mode .story-nav-left::before {
    left: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
}

.smart-story-viewer.playlist-mode .story-nav-right::before {
    right: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
}

.smart-story-viewer.playlist-mode .story-nav-left:hover::before,
.smart-story-viewer.playlist-mode .story-nav-right:hover::before {
    opacity: 1;
}

/* Progress bars show how many reels in playlist */
.smart-story-viewer.playlist-mode .story-progress-bars {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

/* Show story count in playlist mode (overrides single-reel-mode hiding) */
.smart-story-viewer.playlist-mode .story-header-info p {
    display: block;
}

/* Mobile touch hints for playlist navigation */
@media (max-width: 768px) {
    .smart-story-viewer.playlist-mode .story-nav-left::before,
    .smart-story-viewer.playlist-mode .story-nav-right::before {
        opacity: 0.5;
        width: 32px;
        height: 32px;
        background-size: 20px;
    }
}

/* ============================================== */
/* POPUP PRODUCT PANEL V2 - Competitor Design    */
/* ============================================== */

.smart-popup-product-panel.smart-panel-v2 {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    background: #fff;
}

/* Horizontal Swipe Gallery */
.smart-swipe-gallery {
    position: relative;
    width: 100%;
    background: #f8f8f8;
}

.smart-gallery-swiper {
    width: 100%;
    aspect-ratio: 1 / 0.9;
}

.smart-gallery-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.smart-swipe-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.smart-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    background: #f8f8f8;
}

/* Gallery Pagination Bars - Competitor Style */
.smart-gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0px;
    padding: 12px 40px;
    background: #fff;
}

.smart-gallery-pagination .swiper-pagination-bullet {
    flex: 1;
    height: 4px;
    border-radius: 1.5px;
    background: #e5e5e5;
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0;
}

.smart-gallery-pagination .swiper-pagination-bullet-active {
    background: #1a1a1a;
    height: 4px;
}

/* Compact Product Info */
.smart-compact-info {
    padding: 0;
    position: relative;
    background: #fff;
    padding-bottom: 20px;
    padding-top: 10px;
}

.smart-panel-v2 .smart-product-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Star Rating - Compact */
.smart-panel-v2 .smart-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.smart-panel-v2 .smart-stars {
    display: flex;
    gap: 1px;
}

.smart-panel-v2 .smart-stars svg {
    width: 16px;
    height: 16px;
}

.smart-stars .star.filled {
    fill: #fbbf24;
}

.smart-stars .star.half {
    fill: #fbbf24;
}

.smart-stars .star.empty {
    fill: #e0e0e0;
}

.smart-stars.small svg {
    width: 14px;
    height: 14px;
}

.smart-stars.tiny svg {
    width: 12px;
    height: 12px;
}

/* Price - Compact */
.smart-panel-v2 .smart-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.smart-panel-v2 .smart-current-price {
    font-size: 22px;
    font-weight: 700;
    color: #dc2626;
}

.smart-panel-v2 .smart-current-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.smart-panel-v2 .smart-original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.smart-panel-v2 .smart-discount-badge {
    display: inline-block;
    background: #dc2626;
    color: white;
    left: initial;
    right: 0;
}

/* Compact Variations */
.smart-variations-compact {
    margin-bottom: 15px;
}

.smart-variation-row-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.smart-var-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.smart-var-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.smart-var-btn {
    min-width: 36px;
    height: 32px;
    padding: 0 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
}

.smart-var-btn:hover {
    border-color: #999;
}

.smart-var-btn.selected {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: white;
}

/* Dual Action Buttons */
.smart-dual-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-right: 15px;
}

/* When Add to Cart button is in "added" state, show View Cart link properly */
.smart-dual-buttons .smart-btn-primary.added {
    background: #16a34a;
}

/* Handle View Cart button that WooCommerce might inject */
.smart-dual-buttons .added_to_cart,
.smart-dual-buttons .wc-forward {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    background: transparent;
    color: #16a34a;
    border: 1.5px solid #16a34a;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    order: 3;
}

.smart-dual-buttons .added_to_cart:hover,
.smart-dual-buttons .wc-forward:hover {
    background: #16a34a;
    color: white;
}

.smart-btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    background: #fff;
    color: #1a1a1a;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.smart-btn-secondary:hover {
    border-color: #1a1a1a;
    background: #fafafa;
}

.smart-btn-secondary svg {
    width: 18px;
    height: 18px;
}

.smart-btn-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    background: var(--secondary-color, #1a1a1a);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.smart-btn-primary:hover:not(:disabled) {
    background: var(--secondary-color, #1a1a1a);
    filter: brightness(1.2);
    color: #fff;
}

.smart-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.smart-btn-primary .cart-icon {
    width: 18px;
    height: 18px;
}

.smart-btn-primary .btn-loading {
    display: none;
}

/* Cart Icon Button */
.smart-btn-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 48px;
    height: 48px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.smart-btn-cart-icon:hover {
    background: #e8e8e8;
}

.smart-btn-cart-icon svg {
    width: 22px;
    height: 22px;
    fill: #1a1a1a;
}

.smart-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
}

/* Hide View Cart link when cart icon is present */
.smart-dual-buttons .added_to_cart,
.smart-dual-buttons .wc-forward {
    display: none !important;
}

.smart-btn-primary .btn-loading .spinner {
    width: 18px;
    height: 18px;
    animation: smart-spin 1s linear infinite;
}

@keyframes smart-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.smart-btn-primary.loading .btn-text,
.smart-btn-primary.loading .cart-icon {
    display: none;
}

.smart-btn-primary.loading .btn-loading {
    display: flex !important;
}

.smart-btn-primary.added {
    background: #16a34a;
}

/* Accordion Sections */
.smart-accordions {
    border-top: 1px solid #f0f0f0;
}

.smart-accordion {
    border-bottom: 1px solid #f0f0f0;
}

.smart-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    text-align: left;
    outline: 0 !important;
    transition: background 0.2s ease;
}

.smart-accordion-header:hover {
    background: #fafafa;
}

.accordion-chevron {
    width: 20px;
    height: 20px;
    fill: #666;
    transition: transform 0.3s ease;
}

.smart-accordion-header[aria-expanded="true"] .accordion-chevron {
    transform: rotate(180deg);
}

.smart-accordion-content {
    display: none;
    padding: 0 20px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.smart-accordion.open .smart-accordion-content {
    display: block;
}

/* Reviews Summary */
.smart-reviews-summary {
    margin-bottom: 15px;
}

.smart-avg-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.smart-avg-rating .rating-number {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.smart-avg-rating .review-count {
    font-size: 13px;
    color: #666;
}

/* Reviews List */
.smart-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.smart-review-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
}

.smart-review-item .review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.smart-review-item .reviewer-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.smart-review-item .review-content {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* Related Products */
.smart-related-products {
    padding: 20px;
    background: #f9f9f9;
}

.smart-related-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

.smart-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.smart-related-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smart-related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.smart-related-item .related-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
}

.smart-related-item .related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.smart-related-item .related-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 3px;
}

.smart-related-item .related-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin: 10px 10px 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smart-related-item .smart-stars {
    padding: 0 10px;
}

.smart-related-item .related-price {
    display: block;
    padding: 4px 10px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #dc2626;
}

.smart-related-item .related-price del {
    color: #999;
    font-weight: 400;
    margin-right: 4px;
}

/* Success Toast */
.smart-cart-success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #16a34a;
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(22, 163, 74, 0.3);
    z-index: 1000001;
    animation: smart-toast-in 0.3s ease;
}

.smart-cart-success-toast.error {
    background: #dc2626;
}

.smart-cart-success-toast svg {
    width: 20px;
    height: 20px;
}

@keyframes smart-toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .smart-compact-info {
        padding: 15px;
    }

    .smart-panel-v2 .smart-product-title {
        font-size: 16px;
    }

    .smart-panel-v2 .smart-current-price {
        font-size: 20px;
    }

    .smart-dual-buttons {
        gap: 8px;
    }

    .smart-btn-secondary,
    .smart-btn-primary {
        height: 44px;
        font-size: 13px;
    }

    .smart-related-products {
        padding: 15px;
    }

    .smart-related-grid {
        gap: 10px;
    }
}

/* Story Product Info Container */
.story-product-info .smart-popup-product-panel {
    height: 100%;
    padding-bottom: 50px;
}

.story-product-info {
    overflow: hidden;
}

/* ============================================== */
/* MOBILE BOTTOM SHEET LAYOUT                    */
/* Only affects mobile - Desktop stays unchanged  */
/* ============================================== */

/* Hide preview bar on desktop - only visible on mobile */
.smart-bottom-sheet-preview {
    display: none;
}

@media (max-width: 768px) {
    /* Show preview bar on mobile */
    .smart-bottom-sheet-preview {
        display: flex;
    }
    /* Full-screen video on mobile */
    .smart-story-viewer .story-viewer-container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        margin: 0;
        padding: 0;
    }

    .smart-story-viewer .story-highlights-swiper {
        width: 100%;
        height: 100%;
    }

    .smart-story-viewer .highlight-content {
        flex-direction: column;
        max-width: 100%;
        width: 100%;
        height: 100%;
        gap: 0;
        position: relative;
    }

    /* Video takes full screen on mobile */
    .smart-story-viewer .story-viewer-video {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    /* Mobile close button positioning */
    #smart-story-viewer > .story-close-btn {
        top: 24px;
        right: 15px;
        width: 32px;
        height: 32px;
        z-index: 10002;
        background: rgba(0, 0, 0, 0.6) !important;
    }

    #smart-story-viewer > .story-close-btn svg{
        fill: #fff !important;
    }

    /* ============================================== */
    /* BOTTOM SHEET - Collapsed State (Default)      */
    /* ============================================== */
    .smart-story-viewer .story-product-info {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        max-height: 85vh;
        background: transparent;
        border-radius: 20px 20px 0 0;
        z-index: 10000;
        padding: 0;
        margin: 0;
        flex: none;
        transform: translateY(calc(100% - 175px)); /* Show collapsed bar with Shop Now */
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
        overflow: visible;
        will-change: transform;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Expanded state */
    .smart-story-viewer .story-product-info.expanded {
        transform: translateY(0);
        padding-right: 0;
        padding-left: 0;
    }

    /* Collapse button - chevron down, only visible when expanded */
    .smart-sheet-collapse-btn {
        display: none;
        position: absolute;
        top: -45px;
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 32px;
        background: #fff;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        z-index: 10001;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .smart-sheet-collapse-btn svg {
        width: 24px;
        height: 24px;
        fill: #333;
        transform: rotate(180deg); /* Point down */
    }

    .smart-story-viewer .story-product-info.expanded .smart-sheet-collapse-btn {
        display: flex;
    }

    /* ============================================== */
    /* BOTTOM SHEET - Collapsed Preview Bar          */
    /* ============================================== */
    .smart-bottom-sheet-preview {
        display: flex;
        flex-direction: column;
        padding: 15px;
        gap: 12px;
        cursor: pointer;
        background: rgb(0 0 0 / 75%);
        position: relative;
        border-radius: 11px;
    }

    .smart-bottom-sheet-preview .preview-product-row {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .smart-bottom-sheet-preview .preview-thumb {
        width: 60px;
        height: 60px;
        border-radius: 8px;
        overflow: hidden;
        flex-shrink: 0;
        background: #f5f5f5;
    }

    .smart-bottom-sheet-preview .preview-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .smart-bottom-sheet-preview .preview-info {
        flex: 1;
        min-width: 0;
    }

    .smart-bottom-sheet-preview .preview-title {
        font-size: 14px;
        font-weight: 600;
        color: #ffffff;
        margin: 0 0 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .smart-bottom-sheet-preview .preview-rating {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-bottom: 4px;
    }

    .smart-bottom-sheet-preview .preview-rating .smart-stars svg {
        width: 12px;
        height: 12px;
    }

    .smart-bottom-sheet-preview .preview-rating .review-count {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.7);
    }

    .smart-bottom-sheet-preview .preview-price {
        font-size: 16px;
        font-weight: 700;
        color: #ffffff;
    }

    /* Shop Now Button */
    .smart-bottom-sheet-preview .preview-shop-now {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 16px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 8px;
        color: #fff;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .smart-bottom-sheet-preview .preview-shop-now:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    .smart-bottom-sheet-preview .preview-shop-now svg {
        width: 20px;
        height: 20px;
        fill: #fff;
    }

    /* ============================================== */
    /* BOTTOM SHEET - Full Content Area              */
    /* ============================================== */
    .smart-story-viewer .story-product-info .smart-panel-v2 {
        max-height: calc(85vh - 100px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px 10px 0 0;
        padding-bottom: 50px;
    }

    /* Adjust gallery for mobile bottom sheet */
    .smart-story-viewer .story-product-info .smart-gallery-swiper {
        aspect-ratio: 1 / 0.7;
    }

    /* Compact info padding adjustment */
    .smart-story-viewer .story-product-info .smart-compact-info {
        padding: 15px 20px 20px;
    }

    /* When sheet is collapsed, hide the full panel content */
    .smart-story-viewer .story-product-info:not(.expanded) .smart-panel-v2 {
        display: none;
    }

    /* Show preview bar only in collapsed state */
    .smart-story-viewer .story-product-info.expanded .smart-bottom-sheet-preview {
        border-bottom: 1px solid #f0f0f0;
        display: none;
    }

    /* Mute button repositioning on mobile to avoid bottom sheet */
    .smart-story-viewer .story-mute-btn {
        bottom: 195px;
    }

    .smart-story-viewer .story-product-info.expanded ~ .story-viewer-video .story-mute-btn,
    .smart-story-viewer.sheet-expanded .story-mute-btn {
        bottom: 20px;
    }

    /* Progress bars mobile adjustment */
    .smart-story-viewer .story-progress-bars {
        top: 0;
        left: 0;
        right: 0;
    }

    /* Header adjustment for mobile */
    .smart-story-viewer .story-header {
        top: 20px;
    }

    /* Swiper navigation hidden on mobile */
    .smart-story-viewer .swiper-button-next,
    .smart-story-viewer .swiper-button-prev {
        display: none !important;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 480px) {
    .smart-story-viewer .story-product-info {
        transform: translateY(calc(100% - 160px));
    }

    .smart-bottom-sheet-preview {
        padding: 12px;
        gap: 10px;
    }

    .smart-bottom-sheet-preview .preview-product-row {
        gap: 10px;
    }

    .smart-bottom-sheet-preview .preview-thumb {
        width: 50px;
        height: 50px;
    }

    .smart-bottom-sheet-preview .preview-title {
        font-size: 13px;
    }

    .smart-bottom-sheet-preview .preview-price {
        font-size: 15px;
    }

    .smart-bottom-sheet-preview .preview-shop-now {
        padding: 10px 14px;
        font-size: 14px;
    }

    .smart-story-viewer .story-mute-btn {
        bottom: 180px;
    }

    .smart-story-viewer .story-progress-bars {
        top: 0px;
    }

    .smart-story-viewer .story-header {
        top: 20px;
    }
}

/* Backdrop overlay when sheet is expanded - inside highlight-content */
.highlight-content .sheet-backdrop {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

@media (max-width: 768px) {
    .highlight-content .sheet-backdrop {
        display: block;
    }

    .highlight-content .sheet-backdrop.visible {
        opacity: 1;
        pointer-events: auto;
    }
}