/* ============================================================
   Wewo REDESIGN (Prom-style) — STOREFRONT layer.
   PRODUCTION: load-bearing (hero, grid, product page, drawer) — the old "STAGING ONLY" label was stale (v2.6.335 audit).
   Loaded AFTER assets/style.css and assets/redesign.css, so these
   rules win on equal specificity.
   Palette (same tokens as redesign.css): page #F5F7FA, cards #FFFFFF,
   borders #E2E8F0, ink #0F172A, muted #475569, coral #D92B4E primary,
   deep indigo #3730A3 minor only, ok #15803D / warn #B45309 /
   bad #DC2626. NO purple, NO pink anywhere in this
   layer. CSS + HTML structure/classes + navigation only: every form
   field, endpoint, action and method is untouched.
   ============================================================ */
/* REDESIGN prototype: grid-card badges row (stock + Escrow + Pickup). */
.card-badges{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0}
.card-badges .rd-badge{font-size:11px;white-space:normal;line-height:1.4;text-align:left} /* FR label is long — must wrap, never clip */

/* ---------- page chrome ---------- */
.page-main h1{font-size:24px;line-height:1.25;margin:18px 0 12px}
.section{padding:28px 0}
@media(min-width:768px){.section{padding:32px 0}}
.section-title{font-size:20px;font-weight:800;color:var(--ink);margin:0 0 14px}
.breadcrumb{margin:14px auto;padding:0 16px;font-size:13px}
.notice-info{background:#EEF2FF;border-color:#E0E7FF;color:#1E1B4B}
.notice-success{background:var(--ok-bg);border-color:#BBF7D0;color:#14532D}
.notice-ok{background:var(--ok-bg);border-color:#BBF7D0;color:#14532D}
.chip:hover{border-color:var(--coral);color:var(--coral)}
.pagination a:hover{border-color:var(--coral);color:var(--coral)}
.pagination .current{background:var(--coral);border-color:var(--coral);color:#fff}
.input:focus,.select:focus{border-color:var(--indigo);box-shadow:0 0 0 3px rgba(55,48,163,.15)}
.page-title-ic{color:var(--coral)}

/* ---------- header: desktop ---------- */
.rd-catalog-btn{display:inline-flex;align-items:center;gap:8px;flex:none;min-height:44px;padding:10px 16px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-weight:700;font-size:15px;text-decoration:none;white-space:nowrap}
.rd-catalog-btn:hover{background:var(--tint-1);border-color:var(--line)}
.rd-catalog-btn svg{flex:none;color:var(--coral)}
.header-home-btn{display:none}
@media(min-width:641px){
  .header-inner{flex-wrap:nowrap}
  .logo{order:1}
  .rd-catalog-btn{order:2}
  .search-form{order:3;flex:1 1 auto;max-width:640px;margin:0 auto}
  .header-actions{order:4;gap:6px}
}
@media(max-width:640px){
  /* Mobile header: logo + search + EN/FR only. The bell, the seller
     cabinet icon and every other header action are hidden here — the
     bottom tab bar already carries Cart + Profile, and notifications
     live in the account hub. */
  .rd-catalog-btn{display:none}
  .site-header .header-actions > :not(.lang-switch){display:none}
  .site-header.has-search .header-actions > .bell-wrap{display:none}
  .site-header.has-search .header-actions > .lang-switch{display:inline-flex}
  .header-actions{justify-content:flex-end}
  .lang-switch-link{min-width:44px;min-height:44px;padding:4px 8px;font-size:13px} /* v2.6.335 audit: was 34x36px, below the 44px touch target */
  .logo-lockup-3d-img{height:30px;width:107px}
}

/* ---------- bottom tab bar: Home, Catalog, Favorites, Cart, Profile ---------- */
.bottom-nav{min-height:56px;padding:4px 2px calc(4px + env(safe-area-inset-bottom))}
.bottom-nav a{flex:1 1 0;min-width:0;font-size:11px;padding:2px 0}
.bottom-nav a span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.bottom-nav a:first-child{order:1}
#bottomNavCatalog{order:2}
.bottom-nav a[href*="favorites.php"]{order:3}
.bottom-nav a[href*="cart.php"]{order:4}
.bottom-nav a:last-child{order:5}
.bottom-nav a.active{font-weight:800}
html[lang="fr"] .bottom-nav a{font-size:11px} /* v2.6.335 audit: match the 11px EN size */

/* ---------- hero: text back ON the art (overlay), as originally — white
   text with shadow over the generated backgrounds; the art fills the whole
   slide behind the text. v2.6.302 reverses the v2.6.294 side-by-side layout
   (text beside/below the art) and the v2.6.301 under-banner text. ---------- */
.hero-carousel{padding:16px 0 0}
.hero-carousel-viewport{border-radius:16px;box-shadow:var(--shadow-md)}
.hero-slide{display:flex;position:relative;min-width:100%;aspect-ratio:auto;background:#fff;padding:0;align-items:center;overflow:hidden}
.hero-slide-text{position:relative;z-index:1;padding:20px;max-width:520px;display:flex;flex-direction:column;justify-content:center;gap:8px}
.hero-slide-text h2{color:#fff;text-shadow:0 2px 12px rgba(134,84,224,.45);font-size:clamp(22px,4vw,32px);margin:0}
.hero-slide-text p{color:rgba(255,255,255,.95);text-shadow:0 2px 12px rgba(134,84,224,.45);margin:0;font-size:15px}
.hero-slide-text .btn{align-self:flex-start;margin-top:8px}
.hero-slide-art{position:absolute;inset:0;display:block}
.hero-slide-art img{display:block;width:100%;height:100%;object-fit:cover}
/* v2.6.302: a soft left scrim under the text — the store slide's pale
   lavender would wash the white sub out; the gradient darkens only the
   left ~65% where the text sits and leaves the art on the right untouched. */
.hero-slide-art::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(43,16,89,.55),rgba(43,16,89,.35) 45%,rgba(43,16,89,.08) 65%)} /* v2.6.335 audit: .32→0 was too weak — white sub washed out on the pale-lavender store slide */
@media(min-width:768px){
  .hero-slide{min-height:300px}
  .hero-slide-text{padding:28px 36px 28px 72px} /* 72px clears the 44px prev arrow at left:12px; 520px max-width keeps the text clear of the next arrow */
}
.hero-carousel-dots button.active::after{background:var(--coral)}
.rd-admin-banner{background:var(--indigo) !important}

/* ---------- home: categories, stores, rails, CTA ---------- */
.home-cats{border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-sm)}
@media(min-width:1024px){.home-cats{position:sticky;top:76px}}
.home-cats a{color:var(--ink)}
.home-cats a:hover{background:var(--tint-1)}
.home-cats-ic{color:var(--indigo)}
.cat-tile{border-radius:16px;padding:16px 10px;box-shadow:var(--shadow-sm)}
.cat-tile:hover{color:var(--ink);border-color:var(--coral);box-shadow:var(--shadow-md);transform:translateY(-2px)}
.cat-icon{width:64px;height:64px;border-radius:16px;background:var(--tint-1)}
.cat-icon-img{width:56px;height:56px;border-radius:14px}
.cat-name{font-size:14px}
.store-card{border-radius:12px;box-shadow:var(--shadow-sm);align-items:center}
.store-card:hover{box-shadow:var(--shadow-md);transform:translateY(-2px)}
.store-card .store-logo{width:64px;height:64px;border-radius:12px}
.cart-reminder{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-sm)}
.flash-card{border-color:var(--line)}
.flash-card:hover{border-color:var(--coral)}
.flash-store{color:var(--ink)}
.cta-band{background:#EEF2FF;border:1px solid #E0E7FF;border-radius:16px;padding:24px 28px}
.cta-band h2{margin:0 0 12px;font-size:22px}
.cta-band ul{margin:0 0 16px;padding-left:20px;display:grid;gap:6px;color:var(--ink-2)}
.rail{padding:4px 2px 12px}
.rail .product-card{flex:0 0 200px}

/* ---------- shared product card (markup lives in inc/pages_common.php,
   so this layer restyles .product-card to the .rd-pc look) ---------- */
.product-card{border-radius:12px;box-shadow:var(--shadow-sm)}
.product-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.pimg{aspect-ratio:1/1}
.card-main{gap:6px;padding-bottom:12px}
.card-main>*:not(.pimg){padding-left:12px;padding-right:12px}
.product-card .product-title{font-size:14px;line-height:1.35;min-height:2.7em;color:var(--ink)}
.product-card .price{color:var(--coral);font-size:17px;font-weight:800}
.product-card .price-old{font-size:13px}
.product-card .store-name{font-size:12px;color:var(--ink-2)}
.product-card .ships-from{font-size:12px;color:var(--ink-2)}
.product-card .stars{font-size:14px}
/* The round "+" quick-add becomes a full-width "Add to cart" bar pinned
   to the card bottom. Its label comes from the button's own aria-label
   (t('add_to_cart') — localised, no new key), so FR shows
   "Ajouter au panier". The old 52px text reserve is gone with it. */
.quick-add-form{position:static;margin:0 12px 12px}
.quick-add-btn{width:100%;height:44px;border-radius:10px;font-size:0;background:var(--coral);box-shadow:none}
.quick-add-btn::after{content:attr(aria-label);font-size:15px;font-weight:700}
.quick-add-btn:hover{background:var(--coral-dark);transform:none}
.quick-add-btn.quick-added{background:var(--ok)}
.quick-add-btn.quick-added::after{content:"✓"}

/* ---------- catalog / filters ---------- */
.catalog-layout{gap:24px}
.filters{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-sm);padding:16px}
.filters h2{font-size:16px;margin:0 0 14px}
.facet-group{margin-bottom:18px}
.facet-group h3{font-size:13px;text-transform:uppercase;letter-spacing:.04em}
.facet-list a{min-height:44px;padding:8px;border-radius:8px} /* v2.6.335 audit: redesign overrode the 44px floor from style.css */
.facet-list a.facet-active{background:#EEF2FF;color:var(--indigo);font-weight:700}
.facet-radio{padding:6px 0}
.filter-actions .btn{flex:1 1 120px}
.filters-toggle{width:100%;justify-content:center}
.catalog-head h1{font-size:22px;margin:0 0 4px}
.catalog-head .muted{margin:0 0 8px}
.sort-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}
.sort-form label{display:flex;align-items:center;gap:8px}
.sort-form .select{width:auto;min-width:180px}
.filter-list{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.filter-list a{display:flex;min-height:44px;align-items:center;padding:8px 10px;border-radius:8px;color:var(--ink);text-decoration:none}
.filter-list a:hover{background:var(--tint-1)}
.filter-list li.active a{background:#EEF2FF;color:var(--indigo);font-weight:700}
/* categories.php */
.loc-filter{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;margin:16px 0}
.loc-filter label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px;flex:1 1 200px;min-width:0}
.loc-filter .select{width:100%}
.cat-index-group{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:var(--shadow-sm)}
.cat-index-parent a{font-size:18px}
.cat-index-sub{border-radius:12px}
.cat-index-sub:hover{border-color:var(--coral)}

/* ---------- product page ---------- */
.product-layout{display:grid;gap:24px}
@media(min-width:900px){
  .product-layout{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:32px;align-items:start}
  .gallery{position:sticky;top:84px}
}
.g-main{aspect-ratio:1/1;border-radius:16px}
.g-thumb.active{border-color:var(--coral)}
.product-info{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:var(--shadow-sm)}
.product-info h1{font-size:22px;line-height:1.3;margin:0 0 8px}
.product-info .price{color:var(--coral)}
.price-lg{font-size:26px;font-weight:800}
.product-info .stock{margin:12px 0}
.in-stock{color:var(--ok);font-weight:700}
.out-stock{color:var(--bad);font-weight:700}
.rd-buy-badges{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.buy-row .btn{flex:1 1 160px}
/* v2.6.294 (Amazon pattern): full-width stacked buy actions on the product page. */
.rd-buy-actions{flex:1 1 100%;display:grid;gap:10px;margin-top:6px}
.rd-buy-btn{width:100%;padding:14px 16px;font-size:16px;font-weight:700;border-radius:12px}
.rd-fav-btn{width:100%;justify-content:center;gap:8px}
.rd-fav-btn.active{border-color:var(--coral);color:var(--coral)}
.rd-fav-btn.active svg{fill:currentColor}
/* v2.6.294: deal terms in the light design system (replaces the purple trust strip). */
.rd-deal-terms{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin:16px 0;display:grid;gap:10px;box-shadow:var(--shadow-sm)}
.rd-deal-terms__row{display:grid;grid-template-columns:150px 1fr;gap:12px;font-size:14px;line-height:1.5}
.rd-deal-terms__label{color:var(--ink-2);font-weight:600}
@media(max-width:640px){
  /* v2.6.304: mobile hero CENTERED — the text block sits in the MIDDLE of
     the slide (margin auto both sides, centered h2/p, CTA centered under
     the text) at the user's request («поцентру картинки сделай»). The
     62%-wide right block of v2.6.303 is gone. The button is NOT touched:
     the user confirmed (2026-11-23 09:43) the CTA fits on every slide on
     his phone, so there is no button fix — only align-self:center, i.e.
     the same button, positioned in the middle of the block. The scrim is
     centered too: a radial
     gradient, darkest in the middle where the text sits, fading toward
     the edges so the cart / shop / products stay visible. The art stays
     anchored right (object-position:right center). Arrows are hidden on
     mobile (style.css), so the centered block can use 88% of the width.
     Desktop (>=768px) untouched: text left + art right already coexist there. */
  .hero-slide-text{padding:16px;gap:6px;width:88%;max-width:88%;margin-left:auto;margin-right:auto;text-align:center;align-items:center}
  .hero-slide-text h2{font-size:21px;text-align:center}
  .hero-slide-text p{font-size:14px;text-align:center}
  .hero-slide-text .btn{align-self:center}
  .hero-slide-art img{object-position:right center}
  .hero-slide-art::after{background:radial-gradient(ellipse 100% 130% at 50% 50%,rgba(43,16,89,.62) 0%,rgba(43,16,89,.45) 55%,rgba(43,16,89,.22) 100%)} /* v2.6.335 audit: strengthened like the desktop scrim */
  .rd-deal-terms__row{grid-template-columns:1fr;gap:2px}
}
.rd-fav-row{display:flex;align-items:center;gap:10px;margin:12px 0}
.rd-fav-row span{font-weight:600;font-size:14px}
.rd-delivery-info{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;margin:16px 0;box-shadow:var(--shadow-sm)}
.rd-delivery-info h2{font-size:16px;margin:0 0 10px}
.rd-delivery-info .notice{margin:0 0 10px}
.rd-delivery-info .notice:last-child{margin-bottom:0}
.rd-delivery-info p{margin:0 0 10px}
.rd-delivery-info p:last-child{margin-bottom:0}
.delivery-line{margin:8px 0}
.seller-card{border-radius:12px;box-shadow:var(--shadow-sm);margin-top:16px}
.specs-table th{background:var(--tint-2)}
.review-list{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.review{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px;box-shadow:var(--shadow-sm)}
.review p{margin:6px 0}
.review-form{border-radius:12px;box-shadow:var(--shadow-sm)}

/* ---------- storefront ---------- */
.store-header{border-radius:16px;box-shadow:var(--shadow-sm);padding:20px}
.store-header-info{min-width:0}
.store-logo-lg{width:88px;height:88px}
.rd-store-meta{display:flex;flex-wrap:wrap;gap:4px 16px;align-items:center;margin-top:8px;font-size:14px;opacity:.85}
.store-banner img{border-radius:16px;box-shadow:var(--shadow-sm)}
.store-carousel-viewport{border-radius:16px;box-shadow:var(--shadow-md)}
.store-carousel-dots button.active::after{background:var(--coral)}
.store-pages-nav a.active{background:var(--indigo);border-color:var(--indigo);color:#fff}
.store-tools{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.store-tools .input{flex:1 1 200px;min-width:0}
.store-tools .select{flex:0 1 180px}
.promo-banner{border-radius:12px}
.pro-drop{border-radius:12px;box-shadow:var(--shadow-sm)}
.pro-reel video{border-radius:12px}
.store-hero-video{border-radius:12px}

/* ---------- cart ---------- */
.cart-store{border-radius:12px;box-shadow:var(--shadow-sm);background:#fff}
.cart-store-head{background:var(--tint-2)}
.cart-grand{border-radius:12px;box-shadow:var(--shadow-sm)}
.cart-recs h2{font-size:20px}
.qty-pill{border-color:var(--line)}

/* ---------- checkout ---------- */
/* Two columns on desktop only — the old style.css collapses to 1fr ≤900px;
   an unscoped rule here would override that collapse and overflow mobile. */
@media(min-width:901px){.checkout-grid{grid-template-columns:minmax(0,1fr) 380px;gap:24px}}
/* Grid blowout fix (FR 390px): long French strings push the 1fr track past
   the viewport via the items' automatic minimum size — clamp it. */
@media(max-width:900px){.checkout-grid{grid-template-columns:minmax(0,1fr)}.checkout-main,.checkout-side{min-width:0}}
.checkout-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:var(--shadow-sm)}
.checkout-card h2{font-size:18px;margin:0 0 14px}
@media(min-width:901px){.checkout-side{position:sticky;top:84px}}
.checkout-side .order-box{background:#fff}
.order-lines li{padding:8px 0}
.carrier-option{border-radius:12px}
.carrier-option:hover{border-color:var(--coral)}
.carrier-option.selected{border-color:var(--coral);background:#FFF5F6;box-shadow:0 0 0 3px rgba(217,43,78,.12)}
.carrier-option input{accent-color:var(--coral)}
#wewo-saved-cards .pm-radio{display:block;padding:12px 14px;border:1px solid var(--line);border-radius:12px;margin:8px 0;cursor:pointer}
#wewo-saved-cards .pm-radio:has(input:checked){border-color:var(--coral);background:#FFF5F6}
.wewo-pay-error{background:#FDEEF1;border-color:var(--coral);color:var(--coral-deep)}
.payment-box{border-radius:12px;box-shadow:var(--shadow-sm)}
.rd-secure-note{background:#EEF2FF;border:1px solid #E0E7FF;border-radius:10px;padding:12px 14px;color:var(--ink);font-size:14px}
.rd-pickup-note{margin:12px 0}
.checkout-narrow{max-width:720px}

/* ---------- footer / drawer ---------- */
.footer-bottom{border-top:1px solid var(--line)}
.cat-drawer-overlay{background:rgba(15,23,42,.45)}
.cat-drawer-cat.active{color:var(--coral)}
.cat-drawer-sub:hover{border-color:var(--coral)}

/* ---------- v2.6.295: review media (photos + video) ---------- */
.rv-media-picker{margin:12px 0}
.rv-media-btn{width:100%;justify-content:center}
.rv-media-hint{margin:6px 0 0}
.rv-media-previews{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.rv-media-previews:empty{display:none}
.rv-preview{position:relative;width:96px;height:96px;border-radius:10px;overflow:hidden;border:1px solid var(--line);background:#F1F5F9;flex:0 0 auto}
.rv-preview img,.rv-preview video{width:100%;height:100%;object-fit:cover;display:block}
.rv-preview__remove{position:absolute;top:4px;right:4px;width:24px;height:24px;border-radius:50%;border:0;background:rgba(15,23,42,.75);color:#fff;font-size:15px;line-height:1;cursor:pointer}
.rv-media-thumbs{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.rv-media-thumb{position:relative;width:96px;height:96px;border-radius:10px;overflow:hidden;border:1px solid var(--line);background:#F1F5F9;padding:0;cursor:pointer;flex:0 0 auto}
.rv-media-thumb img,.rv-media-thumb video{width:100%;height:100%;object-fit:cover;display:block}
.rv-play{position:absolute;inset:0;margin:auto;width:32px;height:32px;border-radius:50%;background:rgba(15,23,42,.65);color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;pointer-events:none}
.rv-lightbox{position:fixed;inset:0;z-index:80;background:rgba(15,23,42,.85);display:flex;align-items:center;justify-content:center;padding:16px}
.rv-lightbox[hidden]{display:none}
.rv-lightbox__body{max-width:92vw;max-height:82vh;display:flex;align-items:center;justify-content:center}
.rv-lightbox__body img,.rv-lightbox__body video{max-width:92vw;max-height:82vh;border-radius:12px;background:#000}
.rv-lightbox__close{position:fixed;top:14px;right:14px;width:44px;height:44px;border-radius:50%;border:0;background:#fff;color:#0F172A;font-size:24px;line-height:1;cursor:pointer}
@media(max-width:640px){
  /* v2.6.302: hero text is an overlay on the art on all widths
     (v2.6.301 had it under the banner; v2.6.295 hid it on mobile). */
  .rv-media-thumb,.rv-preview{width:84px;height:84px}
}
.rv-media-error{color:#B91C1C;font-weight:600;margin:6px 0 0;font-size:14px}

/* v2.6.295: calm neutral Live-rate badge in checkout (replaces the coral
   full-width plinth). Visual only — no rate/pricing logic touched. */
.badge-live{background:#F1F5F9;color:#475569;border:1px solid #E2E8F0;align-self:flex-start}
