/* Shared site chrome, Apple-style:
   1) global nav (.gnav): every Padvio page, each with a flyout of entry points
   2) local nav (.lnav): sticky bar for the page you're on, with its sections and main action
   3) footer. Light by default; html[data-mode="dark"] switches everything to black. */
:root {
  --c-bg: #FFFFFF; --c-fg: #0B0B0B; --c-muted: #5E5E5E; --c-line: #E6E6E6; --c-accent: #C8481C; --c-hover: #F2F2F2;
  --gnav-h: 48px; --lnav-h: 52px;
}
html[data-mode="dark"] {
  --c-bg: #000000; --c-fg: #F5F5F7; --c-muted: #A1A1A6; --c-line: rgba(255,255,255,.14); --c-accent: #F26231; --c-hover: #1C1C1C;
}
html.mode-anim, html.mode-anim *, html.mode-anim *::before, html.mode-anim *::after {
  transition: background-color .5s ease, color .5s ease, border-color .5s ease !important;
}
.gnav, .lnav, .site-foot { font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; }
.logo-dark { display: none !important; }
html[data-mode="dark"] .logo-dark { display: block !important; }
html[data-mode="dark"] .logo-light { display: none !important; }
.gnav a:focus-visible, .gnav button:focus-visible, .lnav a:focus-visible, .lnav button:focus-visible, .site-foot a:focus-visible { outline: 2px solid #F26231; outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Global nav ---------- */
.gnav { position: relative; z-index: 60; background: var(--c-bg); color: var(--c-fg); }
.gnav-bar { max-width: 1080px; margin: 0 auto; height: var(--gnav-h); padding-inline: clamp(16px, 3vw, 24px); display: flex; align-items: center; gap: 24px; }
.gnav-logo img { width: 96px; height: auto; display: block; }
.gnav-items { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; justify-content: center; gap: clamp(20px, 4vw, 48px); height: 100%; }
.gnav-item { display: flex; align-items: center; height: 100%; }
.gnav-link { font-size: 13px; font-weight: 500; color: var(--c-fg); opacity: .8; transition: opacity .2s; display: flex; align-items: center; height: 100%; }
.gnav-link:hover, .gnav-item:hover > .gnav-link { opacity: 1; }
.gnav-link[aria-current="page"] { opacity: 1; font-weight: 700; }
.gnav-tools { display: flex; align-items: center; gap: 18px; }

.flyout {
  position: absolute; left: 0; right: 0; top: var(--gnav-h); background: var(--c-bg); border-bottom: 1px solid var(--c-line);
  visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .25s ease, transform .35s cubic-bezier(.2,.7,.2,1), visibility 0s linear .25s;
}
.gnav:not(.quiet) .gnav-item:hover > .flyout, .gnav:not(.quiet) .gnav-item:focus-within > .flyout {
  visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: .08s, .08s, 0s;
}
.fly-inner { max-width: 1080px; margin: 0 auto; padding: 36px clamp(16px, 3vw, 24px) 52px; padding-left: calc(clamp(16px, 3vw, 24px) + 120px); display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.fly-col h3 { margin: 0 0 14px; font-size: 12px; font-weight: 500; color: var(--c-muted); }
.fly-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fly-col a { color: var(--c-fg); font-size: 13px; font-weight: 600; }
.fly-col a:hover { color: var(--c-accent); }
.fly-col.big ul { gap: 8px; }
.fly-col.big a { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.gnav-scrim { position: fixed; inset: 0; top: var(--gnav-h); background: rgba(0,0,0,.18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s; z-index: 55; pointer-events: none; }
.gnav:not(.quiet):has(.gnav-item:hover > .flyout, .gnav-item:focus-within > .flyout) ~ .gnav-scrim { opacity: 1; visibility: visible; transition-delay: .08s, 0s; }

.icon-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--c-fg); font: inherit; }
.icon-btn svg { width: 19px; height: 19px; }
.sh-count { min-width: 17px; height: 17px; border-radius: 9px; background: #F26231; color: #fff; font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 5px; }
.sh-count[data-n="0"] { display: none; }
.menu-btn { display: none; }

/* Dark mode switch */
.sh-mode { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--c-fg); font: 500 12px "Montserrat", sans-serif; opacity: .85; }
.sh-mode:hover { opacity: 1; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin: 0; }
.lang-switch a { text-decoration: none; background: none; border: 0; padding: 4px 5px; cursor: pointer; color: var(--c-muted); font: 600 12px "Montserrat", sans-serif; letter-spacing: .06em; border-radius: 4px; }
.lang-switch a + a::before { content: "/"; margin-right: 7px; color: var(--c-line); font-weight: 400; }
.lang-switch a:hover, .lang-switch a[aria-current="true"] { color: var(--c-fg); }
.sh-mode .track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--c-line); transition: background .3s; flex: none; }
.sh-mode .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--c-fg); transition: transform .35s cubic-bezier(.2,.7,.2,1), background .3s; }
.sh-mode[aria-pressed="true"] .track { background: #F26231; }
.sh-mode[aria-pressed="true"] .track::after { transform: translateX(14px); background: #fff; }

/* ---------- Local nav (sticky) ---------- */
.lnav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; color: var(--c-fg);
  background: color-mix(in srgb, var(--c-bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-line);
}
.lnav-inner { max-width: 1080px; margin: 0 auto; height: var(--lnav-h); padding-inline: clamp(16px, 3vw, 24px); display: flex; align-items: center; gap: 24px; }
.lnav-title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.lnav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.lnav-links a:not(.lnav-btn) { font-size: 12px; font-weight: 500; color: var(--c-muted); }
.lnav-links a:not(.lnav-btn):hover { color: var(--c-fg); }
.lnav-btn { display: inline-flex; align-items: center; min-height: 30px; padding: 0 15px; border-radius: 999px; background: #F26231; color: #fff; font-size: 12px; font-weight: 600; transition: background .2s; }
.lnav-btn:hover { background: #FF7A45; }

/* ---------- Footer ---------- */
.site-foot { background: var(--c-bg); color: var(--c-muted); border-top: 1px solid var(--c-line); padding-block: 56px 36px; padding-inline: clamp(16px, 3.4vw, 48px); font-size: 13px; }
.sf-inner { max-width: 1180px; margin: 0 auto; }
.sf-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.sf-brand img { width: 120px; height: auto; display: block; }
.sf-brand p { margin: 12px 0 0; font-style: italic; }
.sf-grid h4 { margin: 0 0 14px; color: var(--c-fg); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.sf-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.sf-grid a { color: var(--c-muted); }
.sf-grid a:hover { color: var(--c-fg); }
.sf-legal { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--c-line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 12px; }
.sf-legal nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sf-legal a { color: var(--c-muted); }
.sf-legal a:hover { color: var(--c-fg); }
.sf-note { margin: 16px 0 0; font-size: 11px; line-height: 1.6; opacity: .8; }

/* ---------- Small screens: global nav becomes a full-screen menu ---------- */
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .sh-mode .lbl { display: none; }
  .gnav-bar { justify-content: space-between; }
  .gnav-items {
    position: fixed; inset: var(--gnav-h) 0 0 0; z-index: 70; background: var(--c-bg); flex-direction: column; justify-content: flex-start; gap: 0;
    height: auto; overflow-y: auto; padding: 8px clamp(16px, 5vw, 32px) 40px;
    visibility: hidden; opacity: 0; transform: translateY(-10px); transition: opacity .25s, transform .3s, visibility 0s linear .3s;
  }
  .gnav.open .gnav-items { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .gnav.open { position: fixed; top: 0; left: 0; right: 0; }
  .menu-btn .x-icon { display: none; }
  .menu-btn[aria-expanded="true"] .x-icon { display: block; }
  .menu-btn[aria-expanded="true"] .bars-icon { display: none; }
  .gnav-item { display: block; height: auto; border-bottom: 1px solid var(--c-line); padding-block: 14px; }
  .gnav-link { font-size: 26px; font-weight: 700; opacity: 1; height: auto; letter-spacing: -0.02em; }
  .flyout, .gnav:not(.quiet) .gnav-item:hover > .flyout, .gnav:not(.quiet) .gnav-item:focus-within > .flyout { position: static; visibility: visible; opacity: 1; transform: none; pointer-events: auto; border: 0; background: none; transition: none; }
  .fly-inner { padding: 10px 0 0; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
  .fly-col.big { display: none; }
  .gnav-scrim { display: none; }
  .lnav-links a:not(.lnav-btn) { display: none; }
  .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-brand { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { html.mode-anim * { transition: none !important; } .flyout { transition: none; } }

/* Shopify additions */
.gnav-logo .logo-text { font-weight: 800; letter-spacing: .12em; font-size: 15px; }
.lnav.is-hidden { display: none; }
.payment-icons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.payment-icons svg { width: 38px; height: 24px; }
/* Shopify wraps each section in a div, so the sticky bar is the wrapper itself */
.section-lnav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; }
.section-lnav .lnav { position: static; }
