/* Homepage reels: tray + TikTok-style viewer. Spec ai/specs/2026-09-26-homepage-reels-design.md */
.reels-tray { position: relative; padding: 12px 0 4px; }
.reels-head { display: flex; align-items: center; gap: 8px; margin: 0 4px 10px; }
.reels-title { font-size: 1.6rem; font-weight: 800; margin: 0; }
.reels-all { margin-left: auto; margin-right: 8px; color: inherit; font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.reels-row { --reel-gap: 12px; --reel-count: 8.5; display: flex; gap: var(--reel-gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 4px 10px; scroll-behavior: smooth; }
/* the row melts into the page background on the side(s) where more cards are waiting (reels.js sets fade-l / fade-r) */
.reels-row.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent 100%); }
.reels-row.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 72px); mask-image: linear-gradient(90deg, transparent 0, #000 72px); }
.reels-row.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%); }
@media (max-width: 991.98px) { .reels-row { --reel-count: 5.5; } }
@media (max-width: 575.98px) { .reels-row { --reel-count: 3.5; --reel-gap: 10px; } }
.reels-row::-webkit-scrollbar { display: none; }
.reel-card { position: relative; flex: 0 0 auto; width: calc((100% - (var(--reel-count) - .5) * var(--reel-gap)) / var(--reel-count)); aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #222; scroll-snap-align: start; color: #fff; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: transform .18s ease, box-shadow .18s ease; isolation: isolate; }
.reel-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.22); color: #fff; }
.reel-card:focus-visible { outline: 3px solid #DC251E; outline-offset: 2px; }
.reel-card__poster, .reel-card__teaser { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-card__teaser { opacity: 0; transition: opacity .25s; }
.reel-card.is-previewing .reel-card__teaser { opacity: 1; }
.reel-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0, rgba(0,0,0,.25) 38%, rgba(0,0,0,0) 60%); z-index: 1; }
.reel-card .reel-avatar { position: absolute; top: 10px; left: 10px; z-index: 2; }
.reel-card__name { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; font-weight: 700; font-size: 15px; line-height: 1.2; text-shadow: 0 1px 3px rgba(0,0,0,.6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reels-arrow { align-items: center; justify-content: center; flex: none; }
.reels-arrow:disabled { opacity: .35; }
.reels-tray.is-fit .reels-arrow { display: none !important; }
.reel-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; background: var(--av, #555); box-shadow: 0 0 0 3px #fff, 0 0 0 6px #DC251E; }
.reel-avatar--sm { width: 36px; height: 36px; font-size: 13px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #DC251E; }
.reel-avatar { position: relative; }
.reel-avatar.has-img { background: #fff; }
.reel-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.reel-avatar[data-channel] { cursor: pointer; }
.reel-avatar[data-channel]:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }
/* official network logo on the avatar ring, at about half past four */
.reel-net { position: absolute; right: -5px; bottom: -5px; width: 23px; height: 23px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; background: #000 center / 100% no-repeat; pointer-events: none; }
.reel-avatar--sm .reel-net { width: 19px; height: 19px; }
/* a vendor's own post without a logo: the network's mark fills the avatar instead of sitting on its ring */
.reel-avatar--net { background: #fff; }
.reel-avatar.reel-avatar--net .reel-net { position: static; width: 100%; height: 100%; box-shadow: none; }
.reel-net--tiktok { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23000'/%3E%3Cg transform='translate(4.9 4.6) scale(.6)'%3E%3Cpath fill='%2325F4EE' transform='translate(-.9 -.9)' d='M16.5 3c.3 2.4 1.8 4 4.2 4.2v3.1c-1.6 0-3-.5-4.2-1.3v6.3c0 3.4-2.7 6-6.1 6S4.3 18.7 4.3 15.3s2.7-6 6.1-6c.3 0 .6 0 .9.1v3.2c-.3-.1-.6-.2-.9-.2-1.6 0-2.9 1.3-2.9 2.9s1.3 2.9 2.9 2.9 2.9-1.3 2.9-2.9V3h3.2z'/%3E%3Cpath fill='%23FE2C55' transform='translate(.9 .9)' d='M16.5 3c.3 2.4 1.8 4 4.2 4.2v3.1c-1.6 0-3-.5-4.2-1.3v6.3c0 3.4-2.7 6-6.1 6S4.3 18.7 4.3 15.3s2.7-6 6.1-6c.3 0 .6 0 .9.1v3.2c-.3-.1-.6-.2-.9-.2-1.6 0-2.9 1.3-2.9 2.9s1.3 2.9 2.9 2.9 2.9-1.3 2.9-2.9V3h3.2z'/%3E%3Cpath fill='%23fff' d='M16.5 3c.3 2.4 1.8 4 4.2 4.2v3.1c-1.6 0-3-.5-4.2-1.3v6.3c0 3.4-2.7 6-6.1 6S4.3 18.7 4.3 15.3s2.7-6 6.1-6c.3 0 .6 0 .9.1v3.2c-.3-.1-.6-.2-.9-.2-1.6 0-2.9 1.3-2.9 2.9s1.3 2.9 2.9 2.9 2.9-1.3 2.9-2.9V3h3.2z'/%3E%3C/g%3E%3C/svg%3E"); }
.reel-net--instagram { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.3' cy='1.07' r='1.2'%3E%3Cstop offset='0' stop-color='%23FFDD55'/%3E%3Cstop offset='.1' stop-color='%23FFDD55'/%3E%3Cstop offset='.5' stop-color='%23FF543E'/%3E%3Cstop offset='1' stop-color='%23C837AB'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='12' r='12' fill='url(%23g)'/%3E%3Crect x='6.5' y='6.5' width='11' height='11' rx='3.3' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3Ccircle cx='12' cy='12' r='2.7' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3Ccircle cx='15.3' cy='8.7' r='.9' fill='%23fff'/%3E%3C/svg%3E"); }
.reel-net--facebook { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%230866FF'/%3E%3Cpath fill='%23fff' d='M13.2 24v-8.3h2.8l.4-3.3h-3.2v-2.1c0-.9.3-1.6 1.6-1.6h1.7V5.8c-.3 0-1.3-.1-2.5-.1-2.5 0-4.2 1.5-4.2 4.3v2.4H7v3.3h2.8V24z'/%3E%3C/svg%3E"); }
.reel-net--youtube { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23FF0000'/%3E%3Cpath fill='%23fff' d='M9.8 8.4v7.2l6-3.6z'/%3E%3C/svg%3E"); }
@media (max-width: 767.98px) {
  .reels-tray { padding-top: 8px; }
  .reels-title { font-size: 1.35rem; }
  .reels-row { gap: 10px; }
  .reel-card { width: 118px; border-radius: 12px; }
  .reel-card__name { font-size: 13px; left: 8px; right: 8px; bottom: 8px; }
  .reel-card .reel-avatar { width: 34px; height: 34px; font-size: 12px; top: 8px; left: 8px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #DC251E; }
  .reel-card .reel-net { width: 19px; height: 19px; right: -5px; bottom: -5px; }
  .reels-arrow { display: none; }
}

/* viewer */
body.rv-open { overflow: hidden; }
body.rv-open .fixed-bottom, body.rv-open #scroller-banner, body.rv-open .nl-fab, body.rv-open .cp-fab { display: none !important; }
.rv { position: fixed; inset: 0; z-index: 2000; background: #000; color: #fff; }
/* iOS Safari draws the page under the status bar and the bottom toolbar too, outside a fixed inset 0 box: the viewer's
   black runs on past both edges and the page behind turns black, so nothing of it (the homepage hero button) shows */
.rv::before, .rv::after { content: ""; position: absolute; left: 0; right: 0; height: 200px; background: inherit; pointer-events: none; }
.rv::before { bottom: 100%; }
.rv::after { top: 100%; }
html:has(body.rv-open), body.rv-open { background: #000 !important; }
@media (min-width: 768px) { .rv { background: rgba(4,4,6,.96); } }
.rv-scroll { position: absolute; inset: 0; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.rv-scroll::-webkit-scrollbar { display: none; }
.rv-slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.rv-wrap { position: absolute; inset: 0; }
.rv-stage { position: absolute; inset: 0; overflow: hidden; background: #000; }
.rv-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.rv-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.5) 0, rgba(0,0,0,0) 20%, rgba(0,0,0,0) 50%, rgba(0,0,0,.8) 100%); pointer-events: none; }
.rv-progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,255,255,.25); z-index: 3; }
.rv-progress i { display: block; height: 100%; width: 0; background: #fff; }
.rv-head { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 10px; right: 12px; z-index: 2; display: flex; align-items: center; gap: 10px; }
.rv-back { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.3); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.rv-back svg { width: 20px; height: 20px; }
.rv-head .rv-btn--sound { margin-left: auto; width: 40px; height: 40px; flex: none; border-radius: 50%; background: rgba(255,255,255,.15); -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.rv-head .rv-btn--sound svg { width: 22px; height: 22px; filter: none; }
.rv-creator { display: flex; align-items: center; gap: 9px; min-width: 0; color: #fff; text-decoration: none; }
a.rv-creator:hover, a.rv-creator:focus { color: #fff; text-decoration: none; }
a.rv-creator:hover .rv-who b { text-decoration: underline; text-underline-offset: 2px; }
.rv-who { display: flex; flex-direction: column; min-width: 0; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.rv-who b { font-size: 15px; font-weight: 700; }
.rv-who span { font-size: 12px; color: rgba(255,255,255,.8); }
.rv-who .rv-ad { color: rgba(255,255,255,.65); }
.rv-rail { position: absolute; right: 8px; bottom: 150px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.rv-btn { width: 48px; height: 48px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; padding: 0; position: relative; }
.rv-btn svg { width: 34px; height: 34px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.55)); }
.rv-btn[disabled] { opacity: .4; }
.rv-vend { position: relative; height: 60px; }
.rv-btn--vendor { display: block; height: auto; }
.rv-vav { width: 46px; height: 46px; border-radius: 50%; background: var(--av, #555) center / cover no-repeat; color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
/* brand page logo on white, like the page header (logos are drawn for a light ground) */
.rv-vav.has-logo { box-sizing: border-box; padding: 5px; background-color: #fff; background-size: contain; background-origin: content-box; }
.rv-plus { position: absolute; left: 50%; top: 36px; transform: translateX(-50%); width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, #18AE00 0%, #4CD964 100%); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; transition: transform .25s cubic-bezier(.3,1.5,.5,1), opacity .3s, background .25s; }
.rv-plus[hidden] { display: none; }
.rv-plus svg { width: 14px; height: 14px; grid-area: 1 / 1; transition: transform .25s, opacity .2s; }
.rv-plus .i-check { opacity: 0; transform: scale(.4) rotate(-30deg); }
.rv-plus:hover { transform: translateX(-50%) scale(1.12); }
/* followed: the plus spins into a tick on white, then shrinks away (TikTok) */
.rv-plus.is-done { background: #fff; color: #18ae00; transform: translateX(-50%) scale(1.08); }
.rv-plus.is-done .i-plus { opacity: 0; transform: scale(.4) rotate(90deg); }
.rv-plus.is-done .i-check { opacity: 1; transform: none; }
.rv-plus.is-gone { opacity: 0; transform: translateX(-50%) scale(.2); }
.rv-btn--fav.is-favourited svg { color: #DC251E; }
.rv-lbl { font-size: 12px; font-weight: 600; margin-top: -11px; text-shadow: 0 1px 3px rgba(0,0,0,.6); max-width: 64px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-bottom { position: absolute; left: 12px; right: 66px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 2; display: flex; flex-direction: column; gap: 8px; }
/* phone: the offer carousel runs under the rail to the screen edge; the rail (without sound) rises above it */
.rv-slide.has-deals .rv-deals { margin-right: -66px; padding-right: 0; }
.rv-slide.has-deals .rv-rail { bottom: calc(214px + env(safe-area-inset-bottom, 0px)); }
.rv-caption { font-size: 14px; line-height: 1.4; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
/* caption in another language than the page: small chip in front of it (reels.js captionLang) */
.rv-lang { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 6px; vertical-align: 1px; font-size: 10px; font-weight: 700; letter-spacing: .04em; line-height: 1.5; color: #fff; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35); text-shadow: none; }
.rv-deals-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.88); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.rv-deals-head { display: flex; align-items: center; gap: 10px; }
.rv-deals-head .rv-deals-label { flex: 1 1 auto; min-width: 0; }
/* desktop arrows like the homepage showcase: frosted dark circles */
.rv-deals-nav { display: none; gap: 8px; flex: none; }
.rv-deals-nav button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; cursor: pointer;
  background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 1px rgba(255,255,255,.12); transition: background-color .2s; }
.rv-deals-nav button:hover { background: rgba(0,0,0,.55); }
.rv-deals-nav svg { width: 16px; height: 16px; }
@media (min-width: 768px) { .rv-deals-nav { display: inline-flex; } }
.rv-deals { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 4px -4px 0; padding: 0 4px 4px; }
.rv-deals::-webkit-scrollbar { display: none; }
/* related offers under the reel (Marti 5.10): frosted glass tiles with white text, the same tint as the category pills of
   the header over a photo; two whole tiles and about a fifth of the third always show, so more are clearly waiting;
   no capitals, no red; the green round arrow like the option rows' cart */
.rv-dbox { flex: 0 0 calc((100% - 20px) / 2.2); scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 7px 7px 10px; border-radius: 18px; color: #fff; text-decoration: none;
  background: rgba(255,255,255,.15); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), inset 0 1px 0 rgba(255,255,255,.3), 0 8px 24px rgba(0,0,0,.22); transition: transform .2s, background-color .2s; }
.rv-dbox:hover { color: #fff; background: rgba(255,255,255,.24); transform: translateY(-2px); }
.rv-dbox .th { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; background: rgba(255,255,255,.12) center / cover no-repeat; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.rv-dbox .tag { position: absolute; left: 6px; top: 6px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.38); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1.5; }
.rv-dbox .go { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #18AE00 0%, #4CD964 100%); box-shadow: 0 3px 10px rgba(0,0,0,.3); text-shadow: none; }
.rv-dbox .go svg { width: 16px; height: 16px; }
.rv-dbox .pr { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rv-dbox .pv { min-width: 0; display: flex; flex-direction: column; }
.rv-dbox .tx { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 0 3px; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.rv-dbox .t { font-size: 13px; font-weight: 700; line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rv-dbox .p { font-size: 14.5px; font-weight: 800; line-height: 1.2; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* the old price line is always there (empty when none), so every tile is as tall */
.rv-dbox .pv s { min-height: 1.3em; color: rgba(255,255,255,.65); font-weight: 500; font-size: 11.5px; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rv-deals.is-pulse .rv-dbox { animation: rv-pulse .6s ease 2; }
@keyframes rv-pulse { 50% { transform: scale(1.03); } }
.rv-paused { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 2; }
.rv-paused span { width: 68px; height: 68px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; }
.rv-paused span::after { content: ""; border-left: 24px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.rv-slide.is-paused .rv-paused { opacity: 1; }
.rv-error { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; background: rgba(0,0,0,.6); padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.rv-close { position: fixed; top: 18px; right: 22px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: none; place-items: center; }
.rv-close svg { width: 20px; height: 20px; }
.rv-nav { position: fixed; left: 22px; top: 50%; transform: translateY(-50%); z-index: 3; display: none; flex-direction: column; gap: 10px; }
.rv-nav button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }
.rv-nav button[disabled] { opacity: .3; }
.rv-nav svg { width: 20px; height: 20px; }
.rv-retry-slide { position: relative; height: 100%; scroll-snap-align: start; display: grid; place-items: center; }
.rv-retry { padding: 12px 18px; border-radius: 999px; border: 0; background: #fff; color: #17161a; font-weight: 700; font-size: 15px; }
.rv-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 4; background: rgba(0,0,0,.8); color: #fff; padding: 8px 14px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.rv-toast.is-on { opacity: 1; }
@media (min-width: 768px) {
  .rv-slide { display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .rv-wrap { position: relative; inset: auto; width: min(51vh, calc(100vw - 260px)); aspect-ratio: 9 / 16; }
  .rv-stage { border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
  .rv-head { top: 16px; }
  .rv-back { display: none; }
  .rv-rail { right: auto; left: calc(100% + 18px); bottom: 10px; }
  .rv-rail .rv-lbl { color: rgba(255,255,255,.8); text-shadow: none; }
  .rv-bottom { right: 12px; bottom: 16px; }
  .rv-slide.has-deals .rv-deals { margin-right: -4px; padding-right: 4px; }
  .rv-slide.has-deals .rv-rail { bottom: 10px; }
  .rv-close { display: grid; }
  .rv-nav { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .reel-card, .reel-card__teaser { transition: none; } .rv-deals.is-pulse .rv-dbox { animation: none; } }
