/* /css/reels-hero.css — PureMart home-page Reels Hero section.
   Scoped under .reels-hero-section to avoid colliding with site-wide
   .reel-frame, .reel-card, etc. Mirrors Two Brothers' "It Takes A
   Village" pattern: horizontal 9:16 scroller, click+autoplay, product
   card overlapping the bottom of each tile. */

.reels-hero-section {
    position: relative;
    overflow: hidden;
    padding: 48px 0 64px;
    background:
        radial-gradient(circle at 6% 20%, rgba(122,155,14,0.07) 0%, transparent 28%),
        radial-gradient(circle at 96% 88%, rgba(122,155,14,0.07) 0%, transparent 28%),
        linear-gradient(180deg, #FBF6F2 0%, #F1ECDF 100%);
    font-family: 'Open Sans', 'Inter', system-ui, sans-serif;
    color: #443728;
}
.reels-hero-section .rh-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

.reels-hero-section .rh-eyebrow {
    text-align: center;
    margin: 0 0 6px 0;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7a9b0e;
    font-weight: 700;
}
.reels-hero-section .rh-title {
    text-align: center;
    margin: 0 0 6px 0;
    font-family: 'Cormorant Garamond', 'Crimson Pro', 'Playfair Display', Georgia, serif;
    font-size: 42px;
    font-weight: 600;
    color: #4a5e0d;
    line-height: 1.05;
    letter-spacing: -0.01em;
}
.reels-hero-section .rh-sub {
    text-align: center;
    margin: 0 0 36px 0;
    font-size: 13px;
    color: #835E54;
}

/* Scroller wrap + arrows */
.reels-hero-section .rh-scroller-wrap {
    position: relative;
}
.reels-hero-section .rh-scroller {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 24px 60px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.reels-hero-section .rh-scroller::-webkit-scrollbar { display: none; }

.reels-hero-section .rh-scroll-arrow {
    position: absolute;
    top: 38%;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #FFFCFA;
    border: 1px solid #E6D6CD;
    box-shadow: 0 4px 14px rgba(68,55,40,0.12);
    cursor: pointer;
    font-size: 22px;
    color: #835E54;
    z-index: 10;
    transition: transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.reels-hero-section .rh-scroll-arrow:hover { transform: scale(1.08); }
.reels-hero-section .rh-scroll-arrow.rh-left  { left: -6px; }
.reels-hero-section .rh-scroll-arrow.rh-right { right: -6px; }

/* Reel card */
.reels-hero-section .rh-reel-card {
    flex-shrink: 0;
    width: 220px;
    position: relative;
    cursor: pointer;
    scroll-snap-align: start;
}
.reels-hero-section .rh-reel-frame {
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #1a1a1a;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(68,55,40,0.14);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    isolation: isolate;
    position: relative;
}
.reels-hero-section .rh-reel-card:hover .rh-reel-frame {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(68,55,40,0.18);
}
.reels-hero-section .rh-reel-frame video,
.reels-hero-section .rh-reel-frame .rh-poster {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.reels-hero-section .rh-reel-frame video    { z-index: 1; }
.reels-hero-section .rh-reel-frame .rh-poster { z-index: 0; }

.reels-hero-section .rh-gradient {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(180deg,
        rgba(0,0,0,0.32) 0%,
        rgba(0,0,0,0.0)  22%,
        rgba(0,0,0,0.0)  60%,
        rgba(0,0,0,0.55) 100%);
    transition: background 0.3s ease;
}

.reels-hero-section .rh-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.85);
    color: #4a5e0d;
    font-size: 18px;
    pointer-events: none;
    transition: transform 0.18s ease, background 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reels-hero-section .rh-reel-card:hover .rh-play-btn {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(255,255,255,0.75);
}
.reels-hero-section .rh-reel-card.rh-playing .rh-play-btn { display: none; }
.reels-hero-section .rh-reel-card.rh-playing .rh-gradient {
    background: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.4) 100%);
}

/* Loading state — soft spinner overlay while video buffers.
   Shown when JS sets .rh-loading on the card (loadstart/waiting events). */
.reels-hero-section .rh-reel-card.rh-loading .rh-play-btn { display: none; }
.reels-hero-section .rh-reel-card.rh-loading .rh-reel-frame::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 32px; height: 32px;
    margin: -16px 0 0 -16px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.92);
    animation: rh-spin 0.8s linear infinite;
    z-index: 6;
}
@keyframes rh-spin {
    to { transform: rotate(360deg); }
}

/* Autoplay-blocked state — replace the small play button with a more
   inviting "tap to play" pill so the user knows what to do. */
.reels-hero-section .rh-reel-card.rh-autoplay-blocked .rh-play-btn {
    display: flex;
    width: auto;
    height: auto;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.92);
    color: #4a5e0d;
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}
.reels-hero-section .rh-reel-card.rh-autoplay-blocked .rh-play-btn::before {
    content: "▶ Tap to play";
}

/* Video unavailable — keep the poster, fade the play button, no spinner. */
.reels-hero-section .rh-reel-card.rh-error .rh-play-btn  { display: none; }
.reels-hero-section .rh-reel-card.rh-error .rh-gradient {
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);
}

.reels-hero-section .rh-ig-link {
    position: absolute;
    bottom: 12px; left: 12px;
    z-index: 4;
    color: rgba(255,255,255,0.92);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.reels-hero-section .rh-reel-card.rh-playing .rh-ig-link { opacity: 0.85; }
.reels-hero-section .rh-ig-link:hover { opacity: 1; text-decoration: underline; }

/* Overlap product card */
.reels-hero-section .rh-product-card {
    position: absolute;
    left: 12px; right: 12px; bottom: -38px;
    background: #FFFCFA;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(68,55,40,0.14);
    padding: 8px 10px;
    z-index: 6;
}

.reels-hero-section .rh-prod-dots {
    position: absolute;
    top: -10px; right: 10px;
    display: flex; gap: 4px;
    background: rgba(255, 252, 250, 0.95);
    padding: 4px 6px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(68,55,40,0.12);
}
.reels-hero-section .rh-prod-dot {
    width: 7px; height: 7px;
    border: none; padding: 0; margin: 0;
    border-radius: 50%;
    background: #E6D6CD;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}
.reels-hero-section .rh-prod-dot:hover { transform: scale(1.2); }
.reels-hero-section .rh-prod-dot.active {
    background: #835E54;
    transform: scale(1.15);
}

.reels-hero-section .rh-prod-content {
    transition: opacity 0.22s ease;
}

.reels-hero-section .rh-prod-row {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 6px;
}
.reels-hero-section .rh-prod-thumb {
    width: 48px; height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
    background-color: #F7EDE9;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #E6D6CD;
}
.reels-hero-section .rh-prod-name {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: #443728;
    line-height: 1.3;
    /* Allow up to 2 lines instead of single-line ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.6em;
}
.reels-hero-section .rh-ext-link {
    width: 24px; height: 24px;
    flex-shrink: 0;
    border-radius: 5px;
    border: 1px solid #E6D6CD;
    background: white;
    color: #835E54;
    font-size: 11px;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reels-hero-section .rh-ext-link:hover {
    border-color: #C9907C;
    color: #6B4A41;
}

.reels-hero-section .rh-prod-prices {
    display: flex; gap: 6px; align-items: baseline;
    font-size: 13px;
    margin: 0 0 6px 4px;
    flex-wrap: wrap;
}
.reels-hero-section .rh-strike {
    color: #A88A7E;
    text-decoration: line-through;
    font-size: 11px;
}
.reels-hero-section .rh-strike.rh-sale {
    color: #A88A7E;
}
.reels-hero-section .rh-price {
    font-weight: 700;
    color: #443728;
}
.reels-hero-section .rh-discount {
    font-size: 10px;
    font-weight: 700;
    color: #C9907C;
    letter-spacing: 0.04em;
}
.reels-hero-section .rh-jk-pill {
    margin-left: auto;
    font-size: 9px;
    padding: 1px 6px;
    background: #F7EDE9;
    color: #835E54;
    border: 1px solid #C9907C;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.reels-hero-section .rh-prod-actions {
    display: flex; gap: 6px;
}
.reels-hero-section .rh-atc-btn {
    flex: 1;
    background: #835E54;
    color: #FFFCFA;
    border: 1px solid #835E54;
    padding: 8px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.15s ease;
    line-height: 1;
}
.reels-hero-section .rh-atc-btn:hover {
    background: #6B4A41;
    border-color: #6B4A41;
    color: #FFFCFA;
    transform: translateY(-1px);
}
/* Wishlist heart — peach circle matching home-card pattern. */
.reels-hero-section .rh-wishlist {
    width: 36px; height: 36px; flex-shrink: 0;
    background: #F7EDE9;
    border: 1px solid #C9907C;
    color: #835E54;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.reels-hero-section .rh-wishlist:hover {
    background: #C9907C;
    color: #FFFCFA;
    transform: scale(1.05);
}
.reels-hero-section .rh-wishlist.marked {
    background: #835E54;
    color: #FFFCFA;
    border-color: #835E54;
}

/* Mute toggle — top-right of active reel only. */
.reels-hero-section .rh-mute-btn {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 7;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.18s ease, transform 0.15s ease;
}
.reels-hero-section .rh-mute-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.05);
}
.reels-hero-section .rh-reel-card.rh-playing .rh-mute-btn { display: inline-flex; }

/* Subtle pulse on the JK pill so the trust signal lands */
@keyframes rh-jk-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 144, 124, 0); }
    50%      { box-shadow: 0 0 0 3px rgba(201, 144, 124, 0.18); }
}
.reels-hero-section .rh-jk-pill {
    animation: rh-jk-pulse 2.6s ease-in-out infinite;
}

/* Mobile (≤768px): smaller cards, hide scroll arrows, snap-x scroll */
@media (max-width: 768px) {
    .reels-hero-section { padding: 32px 0 56px; }
    .reels-hero-section .rh-title { font-size: 26px; }
    .reels-hero-section .rh-sub   { font-size: 12px; margin-bottom: 22px; }
    .reels-hero-section .rh-scroller {
        gap: 14px;
        padding: 8px 16px 52px;
    }
    .reels-hero-section .rh-reel-card { width: 180px; }
    .reels-hero-section .rh-scroll-arrow { display: none; }
    .reels-hero-section .rh-product-card {
        left: 8px; right: 8px; bottom: -32px;
        padding: 6px 8px;
    }
    .reels-hero-section .rh-prod-name { font-size: 11px; }
    .reels-hero-section .rh-prod-prices { font-size: 12px; }
    .reels-hero-section .rh-atc-btn {
        font-size: 9.5px;
        padding: 7px;
    }
    .reels-hero-section .rh-cart-quick { width: 32px; font-size: 12px; }
}

@media (max-width: 380px) {
    .reels-hero-section .rh-reel-card { width: 168px; }
    .reels-hero-section .rh-title { font-size: 22px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reels-hero-section *,
    .reels-hero-section *::before,
    .reels-hero-section *::after {
        animation: none !important;
        transition: none !important;
    }
}

