/* ============================================================
   Free Reels Carousel – Frontend Styles  v4.1
   ============================================================ */

/* ── Wrapper ──────────────────────────────────────────────── */
.frc-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 24px 20px 32px;
}

.reels-product-carousel {
    width: 100%;
}

.reels-product-carousel.swiper {
    overflow: visible !important;
}

/* ── Slide ────────────────────────────────────────────────── */
/* FIX: align-self stretch ensures the slide fills its track height */
.frc-slide {
    height: auto;
    align-self: stretch;
}

/* ── Card ─────────────────────────────────────────────────── */
/* FIX: aspect-ratio was commented out — card had 0 height so video was invisible */
/* FIX: min-height added as fallback for older browsers that don't support aspect-ratio */
.frc-reel-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    min-height: 300px;
    width: 100%;
    background: #111;
    transition: transform .3s ease;
}

.frc-reel-card:hover {
    transform: translateY(-3px);
}

/* ── Video (z-index: 0) ───────────────────────────────────── */
.frc-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.frc-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* ── Play/Pause Toggle Button (z-index: 3) ─────────────────── */
.frc-play-toggle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease, opacity .2s ease;
    color: #fff;
}

.frc-play-toggle::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 14px solid #fff;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 3px;
}

/* Pause icon when playing */
.frc-reel-card.frc-is-playing .frc-play-toggle::before {
    content: '';
    width: 14px;
    height: 16px;
    border: none;
    box-sizing: content-box;
    background:
        linear-gradient(#fff, #fff) left 0 top 0 / 4px 100% no-repeat,
        linear-gradient(#fff, #fff) right 0 top 0 / 4px 100% no-repeat;
}

.frc-play-toggle:hover {
    background: rgba(0, 0, 0, .75);
    transform: translate(-50%, -50%) scale(1.04);
}

/* Slightly fade the button once video starts, but keep visible for usability */
.frc-reel-card.frc-is-playing .frc-play-toggle {
    opacity: .65;
}

/* Hide play icon completely after a short delay while playing */
.frc-reel-card.frc-is-playing.frc-hide-toggle .frc-play-toggle {
    opacity: 0;
    pointer-events: none;
}

/* ── Gradient scrim (z-index: 1) ──────────────────────────── *
   Covers bottom 55% of card. black → transparent bottom→top.  *
   pointer-events:none so the overlay <a> is still clickable.  *
   ─────────────────────────────────────────────────────────── */
.frc-reel-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .90) 0%,
        rgba(0, 0, 0, .60) 40%,
        rgba(0, 0, 0, .15) 75%,
        transparent        100%
    );
}

/* ── Product overlay (z-index: 2, pinned to bottom) ──────── */
.frc-product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;

    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 0 12px 14px 12px;

    text-decoration: none !important;
    color: #fff;
}

.frc-product-overlay:hover,
.frc-product-overlay:focus {
    color: #fff;
    text-decoration: none !important;
    outline: none;
}

/* ── Product info block ───────────────────────────────────── */
.frc-product-info {
    width: 100%;
}

/* ── Product thumbnail ────────────────────────────────────── */
.frc-thumb {
    width: 40px;
    height: 60px;
    border-radius: 7px !important;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, .25);
    background: #333;
}

/* ── Title ────────────────────────────────────────────────── */
.frc-product-title {
    font-size: 18px !important;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: .01em;
    margin-bottom: 8px;
}

/* ── Actions row (shop btn + price) ──────────────────────── */
.frc-product-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Price ────────────────────────────────────────────────── */
.frc-product-price {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.frc-product-price ins {
    text-decoration: none;
    font-weight: 600;
    color: #fff !important;
}

.frc-product-price del {
    opacity: .55;
    font-size: 12px;
    margin-right: 3px;
    color: #fff !important;
}

/* Override theme price colours inside the carousel only */
.frc-product-overlay .woocommerce-Price-amount {
    color: #fff !important;
}

/* ── Shop → pill button ───────────────────────────────────── */
.frc-shop-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 20px;
    border-radius: 99px;
    border: 1.5px solid rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.frc-product-overlay:hover .frc-shop-btn {
    background: #fff;
    border-color: #fff;
    color: #111;
}

/* ── Navigation Arrows ────────────────────────────────────── */
.frc-nav {
    color: #222222 !important;
    background: #faf8f2 !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 50%;
    width: 30px !important;
    height: 30px !important;
    top: 38% !important;
    transform: translateY(-50%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    transition: background .2s;
    z-index: 10;
}

.frc-nav::after {
    font-size: 12px !important;
    font-weight: 800;
}

.frc-nav:hover {
    background: #222222 !important;
    color: #faf8f2 !important;
}

/* Left arrow */
.swiper-button-prev.frc-nav {
    left: -15px; /* half of width (34px / 2) */
}

/* Right arrow */
.swiper-button-next.frc-nav {
    right: -15px; /* half of width */
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
    .frc-reel-card  { border-radius: 10px; }
    .frc-shop-btn   { display: none; }
    .frc-nav        { display: none !important; }
}

@media (min-width: 481px) and (max-width: 767px) {
    .frc-nav { display: none !important; }
}
