/* MRIIGG Insta — vertical reel carousel (SUGAR INSTA style) */
.mriigg-insta-section {
    padding: 48px 0 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 35%, #8833b8 65%, #764ba2 100%);
    background-size: 200% 200%;
}

.mriigg-insta-title {
    text-align: center;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 28px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mriigg-insta-carousel-wrap {
    position: relative;
    padding: 0 44px;
}

.mriigg-insta-swiper {
    overflow: hidden;
    padding: 8px 4px 16px;
}

.mriigg-insta-swiper .swiper-slide {
    width: 168px;
    height: auto;
}

@media (min-width: 768px) {
    .mriigg-insta-swiper .swiper-slide {
        width: 188px;
    }
}

@media (min-width: 1200px) {
    .mriigg-insta-swiper .swiper-slide {
        width: 200px;
        margin-left: 20px;
    }
}

.mriigg-insta-card {
    display: block;
    width: 100%;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    text-decoration: none !important;
    aspect-ratio: 9 / 16;
    max-height: 360px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mriigg-insta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.mriigg-insta-media {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.mriigg-insta-video,
.mriigg-insta-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    background: #111;
}

.mriigg-insta-video.is-playing {
    background: transparent;
}

.mriigg-insta-media--youtube {
    position: relative;
    background: #000;
}

.mriigg-insta-youtube,
.pdp-reel-youtube,
.mriigg-yt-embed-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    pointer-events: none;
    background: #000;
}

.mriigg-yt-stream {
    position: relative;
    z-index: 2;
}

.mriigg-insta-media--youtube .mriigg-yt-embed-fallback {
    z-index: 1;
}

.mriigg-insta-media--youtube.is-using-embed .mriigg-yt-stream {
    display: none;
}

.mriigg-insta-media--youtube.is-using-embed .mriigg-yt-embed-fallback {
    z-index: 3;
}

.mriigg-insta-shade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 45%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.mriigg-insta-product-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 10px 14px;
    pointer-events: none;
}

.mriigg-insta-product-bar--solo {
    justify-content: center;
    text-align: center;
}

.mriigg-insta-product-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.mriigg-insta-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mriigg-insta-product-meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mriigg-insta-product-name {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.mriigg-insta-product-price {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.mriigg-insta-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.95);
    color: #764ba2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.mriigg-insta-nav:hover {
    background: #8833b8;
    color: #fff;
    border-color: #8833b8;
    transform: translateY(-50%) scale(1.05);
}

.mriigg-insta-prev {
    left: 0;
}

.mriigg-insta-next {
    right: 0;
}

.mriigg-insta-nav i {
    font-size: 14px;
    line-height: 1;
}

@media (max-width: 575px) {
    .mriigg-insta-carousel-wrap {
        padding: 0 36px;
    }

    .mriigg-insta-nav {
        width: 32px;
        height: 32px;
    }
}

/* Reel product popup */
body.mriigg-reel-modal-open {
    overflow: hidden;
}

.mriigg-reel-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mriigg-reel-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mriigg-reel-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.mriigg-reel-modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
}

.mriigg-reel-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mriigg-reel-modal-loader {
    padding: 80px 40px;
    text-align: center;
    font-size: 28px;
    color: #8833b8;
}

.mriigg-reel-modal-body {
    display: flex;
    flex: 1;
    min-height: 0;
    max-height: 90vh;
}

.mriigg-reel-modal-video-col {
    flex: 0 0 42%;
    max-width: 42%;
    background: #000;
    position: relative;
    min-height: 320px;
}

.mriigg-reel-modal-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 320px;
    max-height: 90vh;
}

.mriigg-reel-modal-youtube {
    border: none;
    background: #000;
}

.mriigg-reel-modal-video-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.mriigg-reel-modal-video-controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mriigg-reel-modal-info-col {
    flex: 1;
    min-width: 0;
    padding: 24px 20px 20px;
    overflow-y: auto;
    max-height: 90vh;
}

.mriigg-reel-modal-product-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-right: 32px;
}

.mriigg-reel-modal-product-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #eee;
}

.mriigg-reel-modal-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mriigg-reel-modal-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px;
    line-height: 1.35;
}

.mriigg-reel-modal-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.mriigg-reel-modal-product-price .old {
    text-decoration: line-through;
    color: #888;
    font-weight: 500;
    font-size: 14px;
    margin-right: 6px;
}

.mriigg-reel-modal-option-group {
    margin-bottom: 16px;
}

.mriigg-reel-option-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.mriigg-reel-option-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mriigg-reel-option-pill {
    border: 1px solid #222;
    background: #fff;
    color: #111;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mriigg-reel-option-pill.is-selected {
    background: #111;
    color: #fff;
    border-color: #111;
}

.mriigg-reel-option-pill.is-unavailable {
    opacity: 0.45;
    text-decoration: line-through;
}

.mriigg-reel-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 16px;
}

.mriigg-reel-modal-cart-btn {
    flex: 1;
    border: none;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mriigg-reel-modal-cart-btn:hover:not(:disabled) {
    background: #8833b8;
}

.mriigg-reel-modal-cart-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.mriigg-reel-modal-detail-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 20px;
    text-decoration: none;
}

.mriigg-reel-modal-msg {
    font-size: 13px;
    margin: 0 0 12px;
    color: #2e7d32;
}

.mriigg-reel-modal-msg.is-error {
    color: #c62828;
}

.mriigg-reel-modal-desc {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.mriigg-reel-modal-desc summary {
    padding: 12px 14px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    background: #f8f8f8;
    list-style: none;
}

.mriigg-reel-modal-desc summary::-webkit-details-marker {
    display: none;
}

.mriigg-reel-modal-desc #mriiggReelModalDesc {
    padding: 12px 14px 16px;
    font-size: 13px;
    line-height: 1.55;
    color: #555;
}

/* Product detail page reels row */
.pdp-reels-block {
    margin: 20px 0 0;
    padding: 0;
    background: none;
}

.pdp-reels-carousel-wrap {
    position: relative;
    padding: 0 36px;
}

.pdp-reels-swiper {
    overflow: hidden;
}

.pdp-reels-swiper .swiper-slide {
    width: 108px;
}

@media (min-width: 768px) {
    .pdp-reels-swiper .swiper-slide {
        width: 120px;
    }
}

.pdp-reel-card {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.pdp-reel-video,
.pdp-reel-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    background: #111;
}

.pdp-reel-video.is-playing {
    background: transparent;
}

.pdp-reel-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
    font-size: 22px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pdp-reel-card:hover .pdp-reel-play {
    opacity: 1;
}

.pdp-reels-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pdp-reels-prev {
    left: 0;
}

.pdp-reels-next {
    right: 0;
}

@media (max-width: 767px) {
    .mriigg-reel-modal-body {
        flex-direction: column;
    }

    .mriigg-reel-modal-video-col {
        flex: none;
        max-width: 100%;
        width: 100%;
        min-height: 280px;
    }

    .mriigg-reel-modal-video {
        min-height: 280px;
        max-height: 50vh;
    }

    .mriigg-reel-modal-info-col {
        max-height: none;
    }
}
