/* ─────────────────────────────────────────────
   Gladiator Social — Frontend
───────────────────────────────────────────── */

.gsoc-stories-bar,
.gsoc-feed {
    --gsoc-color: var(--gsoc-theme-btn, #E1306C);
    --gsoc-hover: var(--gsoc-theme-hover, #c2185b);
    --gsoc-color-grad: linear-gradient(135deg, #F58529, #DD2A7B 50%, #8134AF);
    direction: rtl;
    color: #0f172a;
    box-sizing: border-box;
    max-width: 100%;
    margin: 16px 0;
}
.gsoc-stories-bar *, .gsoc-feed * { box-sizing: border-box; }

/* ════════════════════════════════════════
   STORIES BAR
════════════════════════════════════════ */

.gsoc-stories-bar {
    --gsoc-circle-size: 80px;
    --gsoc-stories-align: flex-start;
    width: 100%;
    overflow: hidden;
    padding: 8px 0;
}
.gsoc-stories-track {
    display: flex; gap: 18px;
    justify-content: var(--gsoc-stories-align, flex-start);
    overflow-x: auto; overflow-y: hidden;
    padding: 6px 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    touch-action: pan-x;
    scroll-snap-type: x proximity;
}
.gsoc-stories-track::-webkit-scrollbar { display: none; }
.gsoc-story-circle { scroll-snap-align: start; }
/* When content overflows, force start alignment so first item is visible */
.gsoc-stories-bar.is-overflow .gsoc-stories-track { justify-content: flex-start; }

.gsoc-story-circle {
    flex-shrink: 0;
    background: transparent; border: none; cursor: pointer; padding: 0;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-family: inherit;
}
.gsoc-story-circle-inner {
    position: relative;
    width: var(--gsoc-circle-size); height: var(--gsoc-circle-size);
    border-radius: 50%; padding: 3px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    transition: transform .2s;
}
@media (max-width: 720px) {
    .gsoc-story-circle-inner {
        width: var(--gsoc-circle-size-mobile, var(--gsoc-circle-size));
        height: var(--gsoc-circle-size-mobile, var(--gsoc-circle-size));
    }
}
.gsoc-story-circle:hover .gsoc-story-circle-inner { transform: scale(1.06); }
.gsoc-story-circle-inner img,
.gsoc-story-circle-inner video {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
    background: #fff; padding: 2px;
    display: block;
}
.gsoc-story-circle-fallback {
    width: 100%; height: 100%; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
    color: var(--gsoc-color); font-weight: 800; font-size: 18px;
}

/* Ring styles */
.gsoc-story-circle.ring-gradient .gsoc-story-circle-inner {
    background: var(--gsoc-color-grad);
}
.gsoc-story-circle.ring-solid .gsoc-story-circle-inner {
    background: var(--gsoc-ring-color, #E1306C);
}
.gsoc-story-circle.ring-double .gsoc-story-circle-inner {
    background: var(--gsoc-ring-color, #E1306C);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--gsoc-ring-color, #E1306C);
}
.gsoc-story-circle.is-seen .gsoc-story-circle-inner {
    background: #cbd5e1 !important;
    box-shadow: none !important;
}
.gsoc-story-title {
    font-size: 12px; color: #475569; max-width: calc(var(--gsoc-circle-size) + 12px);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ════════════════════════════════════════
   STORIES VIEWER (fullscreen)
════════════════════════════════════════ */

.gsoc-viewer {
    position: fixed; inset: 0; z-index: 999998;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.gsoc-viewer[hidden] { display: none; }

/* Backdrop layer kept in DOM but disabled — viewer relies only on backdrop-filter */
.gsoc-viewer-backdrop { display: none !important; }
.gsoc-viewer > * { position: relative; z-index: 1; }

/* Arrows ON the video, inside the stage */
.gsoc-viewer-arrow {
    position: absolute !important; top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(0,0,0,.33) !important; color: #fff !important;
    width: 38px !important; height: 38px !important;
    padding: 10px !important;
    border-radius: 50% !important;
    border: none !important; cursor: pointer !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: background .15s, transform .15s, color .15s !important;
    z-index: 5 !important;
    outline: none !important;
}
.gsoc-viewer-arrow svg { width: 22px; height: 22px; }
.gsoc-viewer-arrow:hover {
    background: var(--gsoc-hover, rgba(0,0,0,.6)) !important;
    color: var(--gsoc-hover-text, #fff) !important;
    transform: translateY(-50%) scale(1.06) !important;
}
.gsoc-viewer-arrow:focus,
.gsoc-viewer-arrow:focus-visible,
.gsoc-viewer-arrow:active { background: rgba(0,0,0,.33) !important; transform: translateY(-50%) !important; box-shadow: none !important; }
.gsoc-viewer-prev { right: 12px !important; }
.gsoc-viewer-next { left: 12px !important; }

/* Stage */
.gsoc-viewer-stage {
    position: relative;
    width: min(520px, 100%);
    aspect-ratio: 9/16;
    max-height: calc(100vh - 48px);
    background: #000;
    border-radius: 18px;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
}

/* Progress bar at top */
.gsoc-viewer-progress {
    position: absolute; top: 10px; left: 10px; right: 10px;
    height: 3px; display: flex; gap: 4px; z-index: 5;
}
.gsoc-viewer-progress-segment {
    flex: 1; background: rgba(255,255,255,.28); border-radius: 3px; overflow: hidden;
}
.gsoc-viewer-progress-segment .fill {
    display: block; width: 0; height: 100%; background: #fff;
    transition: width linear;
}
.gsoc-viewer-progress-segment.done .fill { width: 100% !important; transition: none; }

/* Header (cover + title + close) */
.gsoc-viewer-header {
    position: absolute; top: 22px; right: 14px; left: 14px;
    display: flex; align-items: center; gap: 12px;
    z-index: 5; pointer-events: none;
}
.gsoc-viewer-header > .gsoc-viewer-close { pointer-events: auto; }
.gsoc-viewer-cover {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.2) center / cover no-repeat;
    border: 2px solid rgba(255,255,255,.7);
    flex-shrink: 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 14px;
}
.gsoc-viewer-cover img,
.gsoc-viewer-cover video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.gsoc-viewer-title {
    color: #fff; font-weight: 700; font-size: 15px;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
    flex: 1;
}
.gsoc-viewer-close {
    background: rgba(0,0,0,.5); color: #fff;
    width: 48px; height: 48px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.25); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: background .15s, transform .15s;
    margin-right: auto;
    flex-shrink: 0;
}
.gsoc-viewer-close svg { width: 30px; height: 30px; }
.gsoc-viewer-close:hover { background: rgba(0,0,0,.8); transform: scale(1.06); }

/* Media wrap */
.gsoc-viewer-media-wrap {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: #000;
}
.gsoc-viewer-img,
.gsoc-viewer-video {
    width: 100%; height: 100%;
    object-fit: contain; /* no cropping */
    background: #000;
}
/* Image-fit modes for the stories viewer (toggled via JS based on settings) */
.gsoc-viewer.fit-cover .gsoc-viewer-img,
.gsoc-viewer.fit-cover .gsoc-viewer-video { object-fit: cover; }

/* ─── NATURAL SIZE — Smart bucket fit ───
   The viewer picks the CLOSEST aspect ratio out of 3 standard buckets (1:1, 4:5, 9:16)
   to match the media's intrinsic dimensions. Then the media fills that bucket with `cover`
   (no letterboxing, may crop a tiny edge if the actual ratio is slightly off-bucket).
   No scroll, no oversized media. Buckets applied via JS class on the viewer. */
.gsoc-viewer.fit-natural .gsoc-viewer-img,
.gsoc-viewer.fit-natural .gsoc-viewer-video,
.gsoc-reel-viewer.fit-natural .gsoc-reel-viewer-image,
.gsoc-reel-viewer.fit-natural .gsoc-reel-viewer-video { object-fit: cover; }

/* Bucket aspect ratios — applied to the stage when the viewer carries `fit-natural` + `bucket-X` */
.gsoc-reel-viewer.fit-natural.bucket-1-1  .gsoc-reel-viewer-stage { aspect-ratio: 1/1  !important; }
.gsoc-reel-viewer.fit-natural.bucket-4-5  .gsoc-reel-viewer-stage { aspect-ratio: 4/5  !important; }
.gsoc-reel-viewer.fit-natural.bucket-9-16 .gsoc-reel-viewer-stage { aspect-ratio: 9/16 !important; }
.gsoc-viewer.fit-natural.bucket-1-1  .gsoc-viewer-stage { aspect-ratio: 1/1  !important; }
.gsoc-viewer.fit-natural.bucket-4-5  .gsoc-viewer-stage { aspect-ratio: 4/5  !important; }
.gsoc-viewer.fit-natural.bucket-9-16 .gsoc-viewer-stage { aspect-ratio: 9/16 !important; }

/* Cover mode for reel viewer */
.gsoc-reel-viewer.fit-cover .gsoc-reel-viewer-video,
.gsoc-reel-viewer.fit-cover .gsoc-reel-viewer-image { object-fit: cover; }

/* Mute button ON the video */
.gsoc-viewer-mute {
    position: absolute; bottom: 20px; left: 14px; z-index: 4;
    background: rgba(0,0,0,.6); color: #fff;
    width: 52px; height: 52px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.3);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    transition: background .15s, transform .15s;
    outline: none !important;
}
.gsoc-viewer-mute svg { width: 28px; height: 28px; }
.gsoc-viewer-mute:hover { background: rgba(0,0,0,.85); transform: scale(1.06); }
.gsoc-viewer-mute:focus,
.gsoc-viewer-mute:focus-visible,
.gsoc-viewer-mute:active { background: rgba(0,0,0,.85); box-shadow: none !important; transform: none; }

/* Kill default browser focus white-bg on all viewer buttons */
.gsoc-viewer button,
.gsoc-viewer button:focus,
.gsoc-viewer button:focus-visible,
.gsoc-viewer button:active {
    outline: none !important;
}
.gsoc-viewer-arrow:focus,
.gsoc-viewer-arrow:focus-visible,
.gsoc-viewer-arrow:active { background: rgba(255,255,255,.18); transform: none; box-shadow: none; }
.gsoc-viewer-close:focus,
.gsoc-viewer-close:focus-visible,
.gsoc-viewer-close:active { background: rgba(0,0,0,.5); transform: none; box-shadow: none; }

/* Tap zones for prev/next (sides only — center area allowed for hold-to-pause) */
.gsoc-viewer-tap {
    position: absolute; top: 60px; bottom: 0; z-index: 3;
}
.gsoc-viewer-tap-prev { right: 0; width: 28%; cursor: pointer; }
.gsoc-viewer-tap-next { left: 0; width: 28%; cursor: pointer; }

/* Product bottom panel — info card + separate full-width add-to-cart */
.gsoc-viewer-product {
    position: absolute; right: 12px; left: 12px; bottom: 12px;
    z-index: 4;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
    direction: rtl;
}
.gsoc-viewer-product[hidden] { display: none; }
.gsoc-viewer-product > * { pointer-events: auto; }

/* Card: image on the right (full height, 130px), text on the left */
.gsoc-viewer-product-card {
    background: rgba(20, 20, 22, .65);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 140px 1fr;
    direction: rtl;
    color: #fff !important; text-decoration: none !important;
    transition: transform .2s, background .15s;
    min-height: 130px;
}
.gsoc-viewer-product-card:hover {
    transform: translateY(-2px);
    background: rgba(20, 20, 22, .9);
    color: #fff !important;
}
.gsoc-viewer-product-thumb {
    width: 100%; height: 130px;
    overflow: hidden;
    background: rgba(255,255,255,.06);
}
.gsoc-viewer-product-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.gsoc-viewer-product-info {
    padding: 14px 16px;
    display: flex; flex-direction: column; gap: 6px;
    min-width: 0;
    justify-content: space-between;
}
.gsoc-viewer-product-info strong {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px; font-weight: 700; color: #fff; line-height: 1.35;
}
.gsoc-viewer-product-info small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px; color: rgba(255,255,255,.65); line-height: 1.4;
    margin-bottom: 2px;
}
.gsoc-viewer-product-bottom {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.gsoc-viewer-product-price {
    font-size: 22px; font-weight: 800; color: #fff; white-space: nowrap;
    direction: rtl;
}
.gsoc-viewer-product-price del,
.gsoc-viewer-product-price del .woocommerce-Price-amount {
    color: rgba(255,255,255,.5) !important;
    font-weight: 400;
    font-size: 14px;
    margin-inline-end: 6px;
}
.gsoc-viewer-product-price ins {
    text-decoration: none;
}
.gsoc-viewer-product-view {
    background: #fff; color: #0f172a !important;
    border: none; padding: 9px 22px; border-radius: 10px;
    font-weight: 700; font-size: 14px;
    text-align: center; text-decoration: none !important;
    transition: transform .15s, background .15s;
    flex-shrink: 0;
}
.gsoc-viewer-product-view:hover { transform: scale(1.04); color: #0f172a !important; }

/* Add-to-cart button removed — only the product card with "צפה" remains */

/* External CTA button (no product) */
.gsoc-viewer-cta {
    position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
    background: #fff; color: #0f172a;
    padding: 11px 26px; border-radius: 24px;
    font-weight: 700; font-size: 14px; text-decoration: none !important;
    z-index: 4; box-shadow: 0 6px 20px rgba(0,0,0,.5);
}

/* Pause indicator overlay — flashes briefly on pause action and disappears */
.gsoc-viewer-pause-ind {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(.85);
    width: 86px; height: 86px; border-radius: 50%;
    background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    color: #fff; opacity: 0; z-index: 6; pointer-events: none;
}
.gsoc-viewer.is-pause-flash .gsoc-viewer-pause-ind {
    animation: gsoc-pause-flash .5s ease-out forwards;
}
@keyframes gsoc-pause-flash {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
    25%  { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

/* Mobile: stage takes full screen, side arrows hidden */
@media (max-width: 720px) {
    .gsoc-viewer { padding: 0; gap: 0; }
    .gsoc-viewer-stage {
        width: 100vw; max-width: 100vw;
        aspect-ratio: auto;
        height: 100vh; max-height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }
    .gsoc-viewer-arrow { display: none; }
    .gsoc-viewer-mute { bottom: 100px; left: 12px; }
}

/* ════════════════════════════════════════
   FEED TILE BADGES — small icons inside feed tiles
════════════════════════════════════════ */

/* Product-tagged badge (bag icon) */
.gsoc-reel-tag-badge {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,.65);
    border: 1.5px solid rgba(255,255,255,.3);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 2;
    pointer-events: none;
}

/* ════════════════════════════════════════
   REEL FULLSCREEN VIEWER
════════════════════════════════════════ */

.gsoc-reel-viewer {
    position: fixed; inset: 0; z-index: 999998;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.gsoc-reel-viewer[hidden] { display: none; }
.gsoc-reel-viewer-overlay {
    position: absolute !important; inset: 0 !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}
.gsoc-reel-viewer-stage {
    position: relative; z-index: 1;
    width: min(540px, 100%);
    aspect-ratio: 9/16;
    max-height: calc(100vh - 48px);
    background: #000;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.gsoc-reel-viewer-video {
    width: 100%; height: 100%;
    object-fit: contain;
    background: #000;
}
/* Credit watermark — small, subtle, on every viewer */
.gsoc-viewer-credit {
    position: absolute;
    bottom: 6px; right: 50%;
    transform: translateX(50%);
    z-index: 7;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px;
    background: rgba(0,0,0,.4);
    color: rgba(255,255,255,.7);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .2px;
    text-decoration: none !important;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    transition: background .15s, color .15s, transform .15s;
    line-height: 1;
    white-space: nowrap;
    pointer-events: auto;
}
.gsoc-viewer-credit:hover {
    background: rgba(0,0,0,.7);
    color: #fff !important;
    transform: translateX(50%) scale(1.04);
}
.gsoc-viewer-credit svg {
    width: 11px; height: 11px;
    flex-shrink: 0;
    opacity: .85;
}
.gsoc-viewer-credit span { display: inline-block; }

.gsoc-reel-viewer-close {
    position: absolute; top: 14px; left: 14px;
    background: rgba(0,0,0,.5); color: #fff;
    width: 48px; height: 48px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.25); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 7;
    transition: background .15s, transform .15s;
    outline: none !important;
}
.gsoc-reel-viewer-close svg { width: 30px; height: 30px; }
.gsoc-reel-viewer-close:hover { background: rgba(0,0,0,.8); transform: scale(1.06); }
.gsoc-reel-viewer-close:focus,
.gsoc-reel-viewer-close:focus-visible,
.gsoc-reel-viewer-close:active { background: rgba(0,0,0,.5); transform: none; box-shadow: none; }

/* Mute button on reel fullscreen — at the TOP (next to close) */
.gsoc-reel-viewer-mute {
    position: absolute; top: 14px; left: 72px; z-index: 4;
    background: rgba(0,0,0,.6); color: #fff;
    width: 48px; height: 48px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.3);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    transition: background .15s, transform .15s;
    outline: none !important;
}

/* Pause flash overlay — briefly visible after a pause click */
.gsoc-reel-viewer-play-ind {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(.85);
    width: 86px; height: 86px; border-radius: 50%;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    z-index: 3; pointer-events: none;
    opacity: 0;
}
.gsoc-reel-viewer.is-pause-flash .gsoc-reel-viewer-play-ind {
    animation: gsoc-pause-flash .5s ease-out forwards;
}
.gsoc-reel-viewer-mute svg { width: 28px; height: 28px; }
.gsoc-reel-viewer-mute:hover { background: rgba(0,0,0,.85); transform: scale(1.06); }
.gsoc-reel-viewer-mute:focus,
.gsoc-reel-viewer-mute:focus-visible,
.gsoc-reel-viewer-mute:active { background: rgba(0,0,0,.6); transform: none; box-shadow: none; }
.gsoc-reel-viewer button:focus,
.gsoc-reel-viewer button:focus-visible,
.gsoc-reel-viewer button:active { outline: none !important; }
.gsoc-reel-viewer-products {
    /* Raised 10px from previous bottom:14 so the card no longer sits on top of the credit */
    position: absolute; right: 14px; left: 14px; bottom: 24px; z-index: 2;
    display: flex; flex-direction: column; gap: 8px;
}
/* Multi-product carousel — frame holds overflow, track slides */
.gsoc-viewer-products-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}
.gsoc-viewer-products-track {
    display: flex;
    width: 100%;
    transition: transform .35s cubic-bezier(.4,.2,.2,1);
}
.gsoc-viewer-products-track > .gsoc-viewer-product-card {
    flex: 0 0 100%;
    min-width: 100%;
    /* Cards already have their own border-radius — the frame clips overflow */
    border-radius: 0;
}
/* Card needs its own background continuation since frame is now the rounded outer */
.gsoc-viewer-products-frame .gsoc-viewer-product-card { border-radius: 0; }

/* Desktop arrow buttons floating over the card edges */
.gsoc-viewer-products-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 5;
    padding: 0;
    transition: background .15s, transform .15s;
}
.gsoc-viewer-products-arrow:hover {
    background: rgba(0,0,0,.85);
    transform: translateY(-50%) scale(1.1);
}
.gsoc-viewer-products-arrow:focus,
.gsoc-viewer-products-arrow:focus-visible,
.gsoc-viewer-products-arrow:active {
    background: rgba(0,0,0,.55) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
    outline: none !important;
}
.gsoc-viewer-products-arrow.gsoc-vp-prev { right: 6px; }
.gsoc-viewer-products-arrow.gsoc-vp-next { left:  6px; }
@media (max-width: 720px) {
    /* On mobile, arrows are smaller and less prominent (swipe is primary) */
    .gsoc-viewer-products-arrow { width: 24px; height: 24px; }
    .gsoc-viewer-products-arrow svg { width: 14px; height: 14px; }
}

.gsoc-viewer-products-dots {
    display: flex; justify-content: center; gap: 6px;
    margin-top: 4px;
}
.gsoc-viewer-products-dots .gsoc-vpd {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,.4); cursor: pointer;
    transition: background .15s, transform .15s;
}
.gsoc-viewer-products-dots .gsoc-vpd.active {
    background: #fff; transform: scale(1.3);
}

/* Image gallery dots — at the BOTTOM of the stage (above any product card if present).
   When the reel has only one image, this element is hidden via the `hidden` attribute. */
.gsoc-reel-viewer-image-dots {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 7px;
    z-index: 4;
    background: rgba(0,0,0,.45);
    padding: 7px 12px;
    border-radius: 999px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
/* CRITICAL: my .gsoc-reel-viewer-image-dots `display: flex` was overriding the browser's
   default [hidden]{display:none}, leaving the empty rounded frame visible. */
.gsoc-reel-viewer-image-dots[hidden] { display: none !important; }
.gsoc-reel-viewer-image-dots .gsoc-vd {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,.45); cursor: pointer;
    transition: background .15s, transform .15s;
}
.gsoc-reel-viewer-image-dots .gsoc-vd.active {
    background: #fff; transform: scale(1.35);
}

/* Image-gallery prev/next arrow buttons inside the stage (only shown when >1 image).
   Sit higher than the reel-to-reel arrows so they don't overlap. */
.gsoc-reel-viewer-img-prev,
.gsoc-reel-viewer-img-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.45);
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.22);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 5;
    padding: 0;
    transition: background .15s, transform .15s;
    outline: none !important;
}
.gsoc-reel-viewer-img-prev:hover,
.gsoc-reel-viewer-img-next:hover {
    background: rgba(0,0,0,.78);
    transform: translateY(-50%) scale(1.08);
}
/* Stable focus/active — never flip to white-on-white */
.gsoc-reel-viewer-img-prev:focus,
.gsoc-reel-viewer-img-prev:focus-visible,
.gsoc-reel-viewer-img-prev:active,
.gsoc-reel-viewer-img-next:focus,
.gsoc-reel-viewer-img-next:focus-visible,
.gsoc-reel-viewer-img-next:active {
    background: rgba(0,0,0,.45) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
    outline: none !important;
}
.gsoc-reel-viewer-img-prev[hidden],
.gsoc-reel-viewer-img-next[hidden] { display: none !important; }
/* Image-pagination arrows sit close to the stage edges — the reel-to-reel arrows
   are at viewer (screen) level now, so the 70px buffer is no longer needed. */
.gsoc-reel-viewer-img-prev { right: 12px; }
.gsoc-reel-viewer-img-next { left:  12px; }
@media (max-width: 720px) {
    .gsoc-reel-viewer-img-prev,
    .gsoc-reel-viewer-img-next { width: 34px; height: 34px; }
    .gsoc-reel-viewer-img-prev { right: 8px; }
    .gsoc-reel-viewer-img-next { left:  8px; }
}

/* Reel-to-reel arrows — at the SCREEN EDGES (siblings of the stage, not inside it).
   This leaves the inner area free for image-gallery arrows when a reel has multiple images. */
.gsoc-reel-viewer-prev,
.gsoc-reel-viewer-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(0,0,0,.5) !important;
    color: #fff !important;
    width: 48px !important; height: 48px !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(255,255,255,.25) !important;
    cursor: pointer !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 7 !important;
    transition: background .15s, transform .15s !important;
    outline: none !important;
    padding: 0 !important;
}
.gsoc-reel-viewer-prev:hover,
.gsoc-reel-viewer-next:hover {
    background: rgba(0,0,0,.8) !important;
    transform: translateY(-50%) scale(1.08) !important;
    color: #fff !important;
}
/* CRITICAL: focus/active must NOT flip the styling to white — keep the same dark look */
.gsoc-reel-viewer-prev:focus,
.gsoc-reel-viewer-prev:focus-visible,
.gsoc-reel-viewer-prev:active,
.gsoc-reel-viewer-next:focus,
.gsoc-reel-viewer-next:focus-visible,
.gsoc-reel-viewer-next:active {
    background: rgba(0,0,0,.5) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
    outline: none !important;
}
.gsoc-reel-viewer-prev svg,
.gsoc-reel-viewer-next svg { width: 22px; height: 22px; }
/* Sit at viewer edges (screen edges since viewer is fixed inset:0) */
.gsoc-reel-viewer-prev { right: 14px !important; }
.gsoc-reel-viewer-next { left:  14px !important; }

/* Stage media — both video AND image render here */
.gsoc-reel-viewer-image {
    width: 100%; height: 100%;
    object-fit: contain;
    background: #000;
    display: none;
}
.gsoc-reel-viewer.is-image .gsoc-reel-viewer-video { display: none; }
.gsoc-reel-viewer.is-image .gsoc-reel-viewer-image { display: block; }
.gsoc-reel-viewer.is-image .gsoc-reel-viewer-mute,
.gsoc-reel-viewer.is-image .gsoc-reel-viewer-play-ind { display: none !important; }

@media (max-width: 720px) {
    .gsoc-reel-viewer { padding: 0; }
    .gsoc-reel-viewer-stage {
        width: 100vw; aspect-ratio: auto;
        height: 100vh; max-height: 100vh;
        border-radius: 0;
    }
    .gsoc-reel-viewer-prev,
    .gsoc-reel-viewer-next {
        width: 42px !important; height: 42px !important;
    }
}

/* ════════════════════════════════════════
   UNIFIED FEED — every item is a reel (video OR image)
════════════════════════════════════════ */
.gsoc-feed {
    --gsoc-feed-rows: 1;
    --gsoc-feed-cols: 4;
    --gsoc-feed-cols-mobile: 2;
    --gsoc-feed-arc: 7;
    --gsoc-feed-arc-mobile: 3;
    --gsoc-feed-spot: 5;
    --gsoc-feed-spot-mobile: 3;
    --gsoc-feed-gap: 12px;
    --gsoc-feed-aspect: 1 / 1;
    direction: rtl;
    margin: 16px 0;
    position: relative;
    --gsoc-color: var(--gsoc-theme-btn, #E1306C);
}

.gsoc-feed-viewport {
    width: 100%;
    overflow: hidden;
}

/* ─── GRID LAYOUT — STATIC (when count <= rows × cols) ─── */
/* Visible-per-row × visible-rows. Items wrap naturally if any extra. */
.gsoc-feed-layout-grid:not(.is-slider) .gsoc-feed-grid {
    display: grid;
    grid-template-columns: repeat(var(--gsoc-feed-cols), 1fr);
    gap: var(--gsoc-feed-gap);
}
@media (max-width: 720px) {
    .gsoc-feed-layout-grid:not(.is-slider) .gsoc-feed-grid {
        grid-template-columns: repeat(var(--gsoc-feed-cols-mobile), 1fr);
        gap: calc(var(--gsoc-feed-gap) / 2);
    }
}

/* ─── GRID SLIDER — column-major flow, horizontal scroll ─── */
/* Track: rows fixed, items overflow into extra columns horizontally.
   Each visible "page" shows cols × rows items. Track width grows past viewport. */
.gsoc-feed-layout-grid.is-slider .gsoc-feed-grid {
    display: grid;
    /* `auto` (not 1fr) — without an explicit grid height, 1fr collapses to 0 on Safari mobile,
       causing the wrapper to report 0px height while tiles spill out and look broken. */
    grid-template-rows: repeat(var(--gsoc-feed-rows), auto);
    grid-auto-flow: column;
    /* Each column = (viewport - (cols-1)*gap) / cols → exactly cols visible per page */
    grid-auto-columns: calc((100% - (var(--gsoc-feed-cols) - 1) * var(--gsoc-feed-gap)) / var(--gsoc-feed-cols));
    gap: var(--gsoc-feed-gap);
    transition: transform .5s cubic-bezier(.4,.2,.2,1);
    will-change: transform;
}
@media (max-width: 720px) {
    .gsoc-feed-layout-grid.is-slider .gsoc-feed-grid {
        grid-auto-columns: calc((100% - (var(--gsoc-feed-cols-mobile) - 1) * var(--gsoc-feed-gap)) / var(--gsoc-feed-cols-mobile));
        gap: calc(var(--gsoc-feed-gap) / 2);
    }
}

/* Slider arrows — user-defined dimensions (40×40 + padding:10) */
.gsoc-feed-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 10px;
    border-radius: 50%;
    background: #fff;
    color: #0f172a;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
    transition: background .15s, color .15s, transform .15s;
}
.gsoc-feed-arrow:hover {
    background: var(--gsoc-color);
    color: #fff;
    border-color: var(--gsoc-color);
    transform: translateY(-50%) scale(1.05);
}
/* Stable focus/active — keep the white/dark default (don't let theme flip to fully-white) */
.gsoc-feed-arrow:focus,
.gsoc-feed-arrow:focus-visible,
.gsoc-feed-arrow:active {
    background: #fff !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
    transform: translateY(-50%) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15) !important;
    outline: none !important;
}
.gsoc-feed-arrow svg { width: 100%; height: 100%; }
.gsoc-feed-arrow-prev { right: -8px; }
.gsoc-feed-arrow-next { left: -8px; }
.gsoc-feed-arrow[hidden] { display: none !important; }
@media (max-width: 720px) {
    .gsoc-feed-arrow-prev { right: 4px; }
    .gsoc-feed-arrow-next { left: 4px; }
}

/* No fade mask — viewport cleanly clips, edges hint at "more content" via the cut-off tile */

/* ─── ARC LAYOUT (curved row, eye-catching) ─── */
.gsoc-feed-layout-arc {
    /* No overflow:hidden — would clip rotated corners + shadows. Use clip-x only on modern browsers if needed */
    padding: 60px 24px 90px;
}
.gsoc-feed-layout-arc .gsoc-feed-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Bigger gap for arc so rotated tiles don't touch */
    gap: calc(var(--gsoc-feed-gap) * 2.5);
}
.gsoc-feed-layout-arc .gsoc-feed-tile {
    flex: 0 0 auto;
    /* Slightly narrower to leave breathing room for rotation */
    width: calc((100% - (var(--gsoc-feed-arc) - 1) * var(--gsoc-feed-gap) * 2.5) / var(--gsoc-feed-arc) - 8px);
    transform-origin: center center;
    --arc-pos: 0;
    /* Items hang like photos on a string: middle highest, edges drop down AND tilt INWARD toward center */
    transform:
        translateY(calc(var(--arc-pos) * var(--arc-pos) * 12px))
        rotate(calc(var(--arc-pos) * -5deg));
    transition: transform .35s cubic-bezier(.4,.2,.2,1);
    /* Hard shadow that's clearly visible; we deliberately avoid clipping */
    box-shadow: 0 16px 36px rgba(0,0,0,.22), 0 4px 10px rgba(0,0,0,.12);
}
.gsoc-feed-layout-arc .gsoc-feed-tile:hover {
    transform:
        translateY(calc(var(--arc-pos) * var(--arc-pos) * 12px - 12px))
        rotate(calc(var(--arc-pos) * -5deg))
        scale(1.05);
    z-index: 5;
    box-shadow: 0 24px 50px rgba(0,0,0,.28), 0 6px 14px rgba(0,0,0,.16);
}
@media (max-width: 720px) {
    .gsoc-feed-layout-arc { padding: 24px 0 32px; }
    .gsoc-feed-layout-arc .gsoc-feed-tile {
        width: calc((100% - (var(--gsoc-feed-arc-mobile) - 1) * var(--gsoc-feed-gap)) / var(--gsoc-feed-arc-mobile));
    }
    /* hide overflow items on mobile */
    .gsoc-feed-layout-arc .gsoc-feed-tile[data-arc-overflow="1"] { display: none; }
}

/* ─── SPOTLIGHT LAYOUT (center-focused stack) ─── */
.gsoc-feed-layout-spotlight {
    overflow: hidden;
    padding: 40px 0;
}
.gsoc-feed-layout-spotlight .gsoc-feed-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--gsoc-feed-gap);
}
.gsoc-feed-layout-spotlight .gsoc-feed-tile {
    flex: 0 0 auto;
    /* JS sets --spot-w per tile; center is widest, sides shrink */
    width: var(--spot-w, 14%);
    transition: width .35s cubic-bezier(.4,.2,.2,1), transform .25s;
}
.gsoc-feed-layout-spotlight .gsoc-feed-tile:hover { transform: translateY(-4px); }
@media (max-width: 720px) {
    .gsoc-feed-layout-spotlight { padding: 16px 0; }
    .gsoc-feed-layout-spotlight .gsoc-feed-tile[data-spot-overflow="1"] { display: none; }
}

/* ─── TILE BASE (all layouts) ─── */
.gsoc-feed-tile {
    position: relative;
    aspect-ratio: var(--gsoc-feed-aspect, 1 / 1);
    overflow: hidden;
    border-radius: 14px !important;
    background: #0f172a;
    text-decoration: none !important;
    cursor: pointer;
    transition: opacity .15s, transform .25s, box-shadow .25s;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.gsoc-feed-tile img,
.gsoc-feed-tile video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 0 !important;  /* defeat themes that round all imgs */
    margin: 0 !important;
    padding: 0 !important;
}
/* Poster image is the always-visible fallback; video overlays it once loaded */
.gsoc-feed-tile .gsoc-feed-poster {
    z-index: 1;
}
.gsoc-feed-tile .gsoc-reel-video {
    z-index: 2;
    background: transparent;
}
/* Force reel-frame inside feed tile to fill the box (override the 9:16 padding-bottom) */
.gsoc-feed-tile .gsoc-reel-frame {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    background: #0f172a;
}
.gsoc-feed-tile .gsoc-reel-frame:hover { transform: none !important; box-shadow: none !important; }

/* ─── HOVER OVERLAY (dark + play icon) ─── */
.gsoc-feed-tile-overlay {
    position: absolute; inset: 0;
    z-index: 3;
    background: rgba(0,0,0,0);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    transition: background .2s;
    pointer-events: none;
}
.gsoc-feed-tile:hover .gsoc-feed-tile-overlay { background: rgba(0,0,0,.35); }
.gsoc-feed-play-icon {
    opacity: 0;
    transform: scale(.85);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.6));
    transition: opacity .2s, transform .2s;
}
.gsoc-feed-tile:hover .gsoc-feed-play-icon { opacity: 1; transform: scale(1); }

/* ─── TYPE ICON (small badge top-right corner) ─── */
.gsoc-feed-tile-type-icon {
    position: absolute; top: 8px; left: 8px;
    width: 26px; height: 26px;
    background: rgba(0,0,0,.45);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 4;
    pointer-events: none;
}
.gsoc-feed-tile-type-icon svg { width: 14px; height: 14px; }

/* Product tag badge inside feed tile sits opposite type icon */
.gsoc-feed-tile .gsoc-reel-tag-badge {
    top: 8px; right: 8px;
    width: 26px; height: 26px;
}

