/* Riviera 2027 global shell — Option B (handoff § 4, lab shell.tsx). Tokens: kit --rv-* + foundation.css. */

/* The Elementor header / footer locations stay in the library but are not shown while the shell is active. */
body.rv-shell [data-elementor-type="header"],
body.rv-shell [data-elementor-type="footer"],
body.rv-shell .site-header,
body.rv-shell .site-footer { display: none !important; }

.rvs-header, .rvs-drawer, .rvs-search-wrap, .rvs-footer { font-family: var(--font-body); color: var(--rv-text); }
.rvs-header *, .rvs-drawer *, .rvs-search-wrap *, .rvs-footer * { box-sizing: border-box; }
.rvs-header a, .rvs-drawer a, .rvs-search-wrap a, .rvs-footer a { text-decoration: none; }
.rvs-header button, .rvs-drawer button, .rvs-search-wrap button { font: inherit; cursor: pointer; margin: 0; }
.rvs-header svg, .rvs-drawer svg, .rvs-search-wrap svg, .rvs-footer svg { flex-shrink: 0; display: block; }

/* Skip link: visible on focus only */
.rvs-skip { position: absolute; inset-inline-start: 8px; top: -80px; z-index: 100; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 8px; background: var(--rv-heading); color: var(--rv-bg) !important; font: 700 14px var(--font-heading); }
.rvs-skip:focus { top: 8px; }
.rvs-content-anchor { display: block; height: 0; outline: 0; }

/* ---------- Header ---------- */
.rvs-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--rv-line);
  background: color-mix(in srgb, var(--rv-bg) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
body.admin-bar .rvs-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .rvs-header { top: 46px; } }
.rvs-bar { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 12px; }
@media (min-width: 768px) { .rvs-bar { height: 72px; padding: 0 32px; } }

.rvs-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--rv-heading) !important; transition: background-color 150ms var(--ease, ease); }
.rvs-icon:hover { background: var(--rv-surface-2); }
.rvs-menu-btn { flex-shrink: 0; }
@media (min-width: 1280px) { .rvs-menu-btn { display: none; } }

.rvs-logo { display: inline-flex; align-items: center; min-height: 44px; font: 800 15px/1 var(--font-heading); letter-spacing: .2em; color: var(--rv-heading) !important; white-space: nowrap; }
.rvs-logo { direction: ltr; unicode-bidi: isolate; }
.rvs-logo-sub { margin-inline-start: 6px; font-weight: 600; letter-spacing: .2em; color: var(--rv-muted); }
@media (max-width: 360px) { .rvs-logo-sub { display: none; } }

.rvs-nav { display: none; }
@media (min-width: 1280px) { .rvs-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 24px; } }
.rvs-nav-link { display: inline-flex; align-items: center; height: 44px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
  font: 600 14px var(--font-body); color: var(--rv-muted) !important; transition: color 150ms var(--ease, ease), background-color 150ms var(--ease, ease); }
.rvs-nav-link:hover { color: var(--rv-heading) !important; }
.rvs-nav-link.is-active { color: var(--rv-heading) !important; background: var(--rv-surface-2); }

.rvs-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.rvs-search-pill { display: none; }
@media (min-width: 1536px) {
  .rvs-search-pill { display: inline-flex; align-items: center; gap: 10px; width: 230px; height: 44px; padding: 0 16px; border: 1px solid var(--rv-line); border-radius: 999px;
    background: var(--rv-surface-2); color: var(--rv-muted); font-size: 14px; text-align: start; transition: border-color 150ms var(--ease, ease); }
  .rvs-search-pill:hover { border-color: var(--rv-line-strong); }
  .rvs-search-pill span { min-width: 0; }
  .rvs-search-icon { display: none; }
}
.rvs-lang { display: none; }
.rvs-account { display: none; }
@media (min-width: 768px) {
  .rvs-lang { display: inline-flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 999px; font: 700 13px var(--font-heading); color: var(--rv-heading) !important; }
  .rvs-lang:hover { background: var(--rv-surface-2); }
  .rvs-account { display: inline-flex; }
}
.rvs-badge { position: absolute; top: -2px; inset-inline-end: -2px; display: flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px;
  border-radius: 999px; background: var(--rv-action); color: var(--rv-action-ink); font: 700 11px/1 var(--font-heading); }
.rvs-badge.is-pop { animation: rvs-pop 250ms var(--ease, ease); }
@keyframes rvs-pop { from { transform: scale(.6); } to { transform: scale(1); } }

/* ---------- Theme control (Light / Dark / System) ---------- */
.rvs-theme { position: relative; display: none; }
@media (min-width: 768px) { .rvs-theme { display: block; } }
.rvs-theme-btn .rvs-ico-dark { display: none; }
body.rv-dark .rvs-theme-btn .rvs-ico-dark { display: block; }
body.rv-dark .rvs-theme-btn .rvs-ico-light { display: none; }
@media (prefers-color-scheme: dark) {
  body:not(.rv-light) .rvs-theme-btn .rvs-ico-dark { display: block; }
  body:not(.rv-light) .rvs-theme-btn .rvs-ico-light { display: none; }
}
.rvs-theme-list { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 45; display: flex; flex-direction: column; min-width: 180px; padding: 6px;
  border: 1px solid var(--rv-line); border-radius: 12px; background: var(--rv-surface); box-shadow: var(--rv-shadow); }
.rvs-theme-list[hidden] { display: none; }
.rvs-theme-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px; font: 600 14px var(--font-body); color: var(--rv-heading) !important; }
.rvs-theme-opt:hover, .rvs-theme-opt:focus-visible { background: var(--rv-surface-2); }
.rvs-theme-opt[aria-checked="true"] { background: var(--rv-surface-2); color: var(--rv-accent) !important; }
.rvs-drawer-theme { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 0; border-top: 1px solid var(--rv-line); }
.rvs-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--rv-line); border-radius: 12px; }
.rvs-seg-opt { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 8px; font: 700 13px var(--font-heading); color: var(--rv-heading) !important; }
.rvs-seg-opt[aria-checked="true"] { background: var(--rv-surface-2); color: var(--rv-accent) !important; box-shadow: inset 0 0 0 1px var(--rv-line-strong); }
.rvs-drawer-foot { border-top: 0; }

/* ---------- Drawer ---------- */
.rvs-scrim { position: fixed; inset: 0; z-index: 55; background: var(--rv-scrim); opacity: 0; transition: opacity 200ms var(--ease, ease); }
.rvs-scrim.is-open { opacity: 1; }
.rvs-drawer { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 56; display: flex; flex-direction: column; width: min(88vw, 380px);
  background: var(--rv-bg); box-shadow: var(--rv-shadow); transform: translateX(-100%); transition: transform 280ms var(--ease, ease); }
[dir="rtl"] .rvs-drawer { transform: translateX(100%); }
.rvs-drawer.is-open, [dir="rtl"] .rvs-drawer.is-open { transform: none; }
.rvs-drawer-head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 16px; border-bottom: 1px solid var(--rv-line); }
.rvs-logo-plain { min-height: 0; }
.rvs-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--rv-line); border-radius: 999px;
  background: transparent; color: var(--rv-heading); }
.rvs-drawer-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }
.rvs-drawer-link { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 12px; border-radius: 12px;
  font: 700 18px var(--font-heading); color: var(--rv-heading) !important; }
.rvs-drawer-link.is-active { background: var(--rv-surface-2); }
.rvs-chev { color: var(--rv-muted); }
[dir="rtl"] .rvs-chev { transform: scaleX(-1); }
.rvs-eyebrow { margin: 0; font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--rv-muted); }
.rvs-drawer-label { margin-top: 20px; padding: 0 12px 8px; }
[dir="rtl"] :is(.rvs-eyebrow, .rvs-logo, .rvs-logo-sub) { letter-spacing: 0; }
[dir="rtl"] .rvs-logo { letter-spacing: .2em; }
.rvs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rvs-drawer-nav .rvs-chips { padding: 0 12px; }
.rvs-chip { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border: 1px solid var(--rv-line); border-radius: 999px; background: transparent;
  font: 600 14px var(--font-heading); color: var(--rv-heading) !important; transition: border-color 150ms var(--ease, ease); }
.rvs-chip:hover { border-color: var(--rv-line-strong); }
.rvs-drawer-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 16px; border-top: 1px solid var(--rv-line); }
.rvs-foot-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border: 1px solid var(--rv-line); border-radius: 8px;
  font: 700 14px var(--font-heading); color: var(--rv-heading) !important; }
.rvs-foot-wide { grid-column: span 2; }

/* ---------- Search dialog ---------- */
.rvs-search-wrap { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; background: var(--rv-scrim); opacity: 0; transition: opacity 150ms var(--ease, ease); }
.rvs-search-wrap[hidden] { display: none; }
.rvs-search-wrap.is-open { opacity: 1; }
.rvs-search { display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; background: var(--rv-bg);
  transform: translateY(-12px); transition: transform 200ms var(--ease, ease); }
.rvs-search-wrap.is-open .rvs-search { transform: none; }
@media (min-width: 768px) {
  .rvs-search-wrap { align-items: flex-start; padding-top: 10vh; }
  .rvs-search { height: auto; max-height: 76vh; max-width: 720px; border-radius: 20px; box-shadow: var(--rv-shadow); }
}
.rvs-search-form { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--rv-line); color: var(--rv-muted); }
.rvs-search-input { flex: 1; min-width: 0; height: 48px; margin: 0; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important;
  font: 400 17px var(--font-body); color: var(--rv-ink); outline: none; -webkit-appearance: none; appearance: none; }
.rvs-search-input::placeholder { color: var(--rv-muted); opacity: 1; }
.rvs-search-input::-webkit-search-cancel-button { display: none; }
.rvs-search-close { flex-shrink: 0; height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font: 600 14px var(--font-body); color: var(--rv-muted); }
.rvs-search-close:hover { color: var(--rv-heading); }
.rvs-search-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.rvs-popular { display: flex; flex-direction: column; gap: 20px; padding: 16px; }
.rvs-popular[hidden] { display: none; }
.rvs-group { padding: 8px 0; }
.rvs-group > .rvs-eyebrow { padding: 0 12px 4px; }
.rvs-option { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: 12px; color: inherit !important; }
.rvs-option[aria-selected="true"] { background: var(--rv-surface-2); }
.rvs-thumb { display: block; width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; background: var(--rv-media); padding: 2px; isolation: isolate; overflow: hidden; }
.rvs-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.rvs-thumb-empty { width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; background: var(--rv-surface-2); }
.rvs-option-text { min-width: 0; flex: 1; }
.rvs-option-label, .rvs-option-sub { unicode-bidi: plaintext; }
[dir="rtl"] .rvs-option-label, [dir="rtl"] .rvs-option-sub { text-align: right; }
.rvs-option-label { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 15px var(--font-heading); color: var(--rv-heading); }
.rvs-option-sub { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: var(--rv-muted); }
.rvs-empty { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.rvs-empty-title { margin: 0; font: 700 18px var(--font-heading); color: var(--rv-heading); }
.rvs-empty-text { margin: 0; font-size: 14px; color: var(--rv-muted); }
.rvs-empty a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--rv-accent) !important; }
.rvs-see-all { display: flex; align-items: center; justify-content: center; height: 48px; margin: 8px; border: 1px solid var(--rv-line); border-radius: 12px;
  font: 700 14px var(--font-heading); color: var(--rv-heading) !important; }

/* ---------- Footer ---------- */
.rvs-footer { border-top: 1px solid var(--rv-line); background: var(--rv-bg); }
.rvs-footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1280px; margin: 0 auto; padding: 56px 20px; }
@media (min-width: 768px) { .rvs-footer-grid { padding: 56px 32px; } }
@media (min-width: 1024px) { .rvs-footer-grid { grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 40px; } }
.rvs-footer-brand { display: flex; flex-direction: column; gap: 16px; padding-bottom: 32px; }
@media (min-width: 1024px) { .rvs-footer-brand { padding-bottom: 0; } }
.rvs-footer-brand p { max-width: 320px; margin: 0; font-size: 14px; line-height: 1.6; color: var(--rv-muted); }
.rvs-social { display: flex; gap: 8px; }
.rvs-social-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--rv-line); border-radius: 999px; }
.rvs-acc { border-bottom: 1px solid var(--rv-line); }
.rvs-acc summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; list-style: none; cursor: pointer;
  font: 700 15px var(--font-heading); color: var(--rv-heading); }
.rvs-acc summary::-webkit-details-marker { display: none; }
.rvs-acc-chev { color: var(--rv-muted); transition: transform 200ms var(--ease, ease); }
.rvs-acc[open] .rvs-acc-chev { transform: rotate(180deg); }
.rvs-acc-body { display: flex; flex-direction: column; padding-bottom: 12px; }
.rvs-acc-body a, .rvs-col a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--rv-text) !important; }
.rvs-col a:hover { color: var(--rv-heading) !important; }
.rvs-col { display: none; }
@media (min-width: 1024px) {
  .rvs-acc { display: none; }
  .rvs-col { display: flex; flex-direction: column; gap: 4px; }
  .rvs-col .rvs-eyebrow { padding-bottom: 8px; }
}
.rvs-footer-bottom { border-top: 1px solid var(--rv-line); }
.rvs-footer-bottom > div { display: flex; flex-direction: column; gap: 8px; max-width: 1280px; margin: 0 auto; padding: 24px 20px; font-size: 13px; color: var(--rv-muted); }
@media (min-width: 768px) { .rvs-footer-bottom > div { flex-direction: row; justify-content: space-between; padding: 24px 32px; } }

/* Product Page B: the sticky gallery stays clear of the sticky header (header 72 px + 1 px border + the original 24 px gap). */
body.rv-shell .rvb-media { top: 97px; }

/* Body scroll lock while a dialog is open */
html.rvs-locked, html.rvs-locked body { overflow: hidden; }

/* Dark: the shell uses the site-wide semantic tokens (foundation.css); no shell-specific dark palette. */

@media (prefers-reduced-motion: reduce) {
  .rvs-drawer, .rvs-scrim, .rvs-search-wrap, .rvs-search, .rvs-badge.is-pop { transition: none !important; animation: none !important; }
}

/* 0.62.2: the desktop nav (11 links) must fit. The header bar widens to 1440, links are tighter (14px type kept),
   the search pill shows only when it fits (.has-room), and when the nav still does not fit (.is-tight, set by the
   inline guard in header.html) it moves to the drawer exactly as below 1280. No link is removed. */
@media (min-width: 1280px) {
  .rvs-bar { max-width: 1440px; }
  .rvs-nav { gap: 0; margin-inline-start: 12px; flex-shrink: 0; }
  .rvs-nav-link { padding: 0 6px; }
  .rvs-logo, .rvs-tools { flex-shrink: 0; }
  .rvs-header.is-tight .rvs-nav { display: none; }
  .rvs-header.is-tight .rvs-menu-btn { display: inline-flex; }
}
@media (min-width: 1536px) {
  .rvs-header:not(.has-room) .rvs-search-pill { display: none; }
  .rvs-header:not(.has-room) .rvs-search-icon { display: inline-flex; }
}

/* 0.72.1 (C10 F5/F6): off-canvas helpers must not widen the page. In RTL an element at left:-20000px becomes scrollable width,
   so phones laid /ar/checkout/ out at ~1570px and opened on the hidden menu drawer. Visually-hidden pattern instead of a far offset. */
.wc-block-components-address-form__address_2-hidden-input{position:absolute!important;left:0!important;right:auto!important;top:0!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;border:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;opacity:0!important;pointer-events:none!important}
.rv-legal table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
