/* =============================================================================
   miniBUD — Theme design system & layout
   -----------------------------------------------------------------------------
   Mobile-first. Everything is sized for a phone by default; a single max-width
   container keeps it comfortable on tablet/desktop. The tokens below are lifted
   straight from the Figma design (navy + red brand, warm-white paper).

   Structure of this file:
     1. Design tokens (CSS custom properties)
     2. Base / reset
     3. Layout primitives (container, header, footer, sticky bar)
     4. Components (buttons, badges, chips, cards, forms)
     5. Page-specific (front page hero, 404, search)
   WooCommerce-specific rules live in woocommerce.css.
   ========================================================================== */

/* 1. ─────────────────────────────────────────────────────── DESIGN TOKENS */
:root {
  /* Brand palette — pulled from the design files */
  --navy:        #273866;   /* primary dark / text */
  --navy-deep:   #1a2748;   /* gradients, pressed states */
  --navy-soft:   #3a4a78;   /* highlights */
  --red:         #d90134;   /* accent / primary CTA */
  --red-soft:    #e63055;   /* hover */
  --white:       #ffffff;
  --warm-white:  #fffafa;   /* page background */
  --ink:         #273866;   /* default text on light bg */
  --muted:       #6a6a6a;   /* secondary text */
  --line:        #ece8e0;   /* hairline borders */
  --paper:       #fffafa;
  --green:       #1f8a5b;   /* success */
  --green-bg:    #e7f6ed;
  --green-border:#b9e2c9;

  /* Typography */
  --font-sans: "Montserrat", "Gotham", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing scale (rem-based, mobile-comfortable) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radii — the design uses generously rounded cards & pills */
  --radius-sm: 7px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-card: 0 2px 8px rgba(15, 18, 30, 0.06);
  --shadow-pop:  0 12px 30px rgba(39, 56, 102, 0.18);
  --shadow-bar:  0 12px 30px rgba(39, 56, 102, 0.35);

  /* The fixed bottom bar height — used as bottom padding so content never hides
     behind it. Updated by JS only if the bar's height changes. */
  --sticky-bar-space: 0px;

  --container: 760px;       /* max content width; mobile screens stay full-bleed */
  --header-h: 56px;
}

/* 2. ──────────────────────────────────────────────────────────── BASE */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Sticky-footer layout: a full-height flex column keeps the footer (and the
     sticky bar that precedes it) at the bottom even on short pages, so the bar's
     `position: sticky` always pins to the viewport bottom. The bar lives in the
     flow now, so it reserves its own space — no padding-bottom hack needed. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }

h1, h2, h3, h4, h5 {
  margin: 0 0 var(--space-3);
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-weight: 700;
}

p { margin: 0 0 var(--space-4); }

/* Accessibility: visible focus ring for keyboard users */
:focus-visible {
  outline: 3px solid rgba(217, 1, 52, 0.4);
  outline-offset: 2px;
}

/* Screen-reader-only utility (WordPress core relies on this class) */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-2);
  z-index: 1000;
  background: var(--navy);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
}
.skip-link:focus { left: var(--space-2); color: #fff; }

/* "Eyebrow" label — the small uppercase mono text used all over the design */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 var(--space-3);
}

/* 3. ──────────────────────────────────────────────────────── LAYOUT */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.site-main {
  padding-block: var(--space-5);
  flex: 1 0 auto;   /* grow to fill the viewport so the footer/bar sit at the bottom */
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;          /* stays pinned while scrolling, like an app top bar */
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--header-h);
  padding-block: var(--space-2);
}
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img { height: 22px; width: auto; }
.site-header .header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Minimal cart header (site-header--cart): ‹ back · "Cart" · item count */
.site-header__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.site-header--cart .site-header__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Icon button (search, cart, menu) */
.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1.4px solid var(--navy);
  border-radius: var(--radius-sm);
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { color: var(--navy); background: #f6f7fa; }
.mb-icon { width: 18px; height: 18px; }

/* Cart count badge on the header icon */
.cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: var(--red);
  color: #fff;
  border: 2px solid #fff;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
}
.cart-badge.is-empty { display: none; }
/* Sticky cart bar starts hidden when the cart is empty; revealed by JS
   (syncCartBarVisibility) once an item is added. */
.sticky-bar--cart.is-empty { display: none; }

/* Language switcher — current language pill + dropdown (scales to 7 languages) */
.lang-switcher { position: relative; display: inline-flex; }
.lang-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--muted);
}
.lang-pill.is-active { background: var(--navy); color: #fff; }

/* The <summary> is the dropdown trigger: hide the native disclosure marker
   and lay out the code + caret inline. */
summary.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  list-style: none;          /* Firefox */
  user-select: none;
}
summary.lang-pill::-webkit-details-marker { display: none; }   /* Safari/Chrome */
summary.lang-pill:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Caret that flips when the dropdown is open. */
.lang-caret {
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.15s ease;
}
.lang-switcher[open] .lang-caret { transform: rotate(180deg); }

/* The popover list of languages, anchored to the trigger. */
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  padding: var(--space-1);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lang-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.lang-option:hover { background: #f6f7fa; }
.lang-option.is-active { background: #f6f7fa; }

/* Flag image used in the trigger and the menu rows. */
.lang-flag {
  display: block;
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 18, 30, 0.12);
}
/* Trigger sits on the navy pill — a light hairline reads better there. */
summary.lang-pill .lang-flag { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55); }
/* The current language in the menu gets a navy ring to mark it. */
.lang-option.is-active .lang-flag { box-shadow: 0 0 0 2px var(--navy); }

/* Text fallback shown only when a flag image isn't available. */
.lang-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: var(--space-8);
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
  padding-block: var(--space-6);
  flex-shrink: 0;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--red-soft); }
.site-footer__brand img { height: 26px; margin-bottom: var(--space-3); }
.footer-widget { margin-bottom: var(--space-5); }
/* Footer link list (the 'Footer Menu' location). Link colour + hover come from
   the .site-footer a rules above; this just resets the list and spaces items. */
.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 14px;
}
.footer-widget__title {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.site-footer__legal {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Sticky bottom bar (cart / add-to-cart / checkout) ──────────────────── */
.sticky-bar {
  /* position: sticky pins the bar to the viewport bottom while scrolling, then
     lets it ride up and park above the footer at the page end — all natively,
     no scroll handler. This works ONLY because the bar is rendered in the flow
     just before <footer> (see footer.php): the footer is the bar's natural
     landing point, so the hand-off from "pinned" to "parked" is continuous
     (the bar's bottom edge meets the footer's top edge) with no bounce. The
     footer's own margin-top gives the parked breathing room. */
  position: sticky;
  bottom: 0;
  z-index: 60;
  padding: var(--space-2) var(--space-3)
           calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  pointer-events: none;       /* only the inner card should be interactive */
}
/* Drop the floating shadow once the footer is in view and the bar is resting
   above it rather than hovering over content. Toggled by StickyBar.js. */
.sticky-bar.is-docked .sticky-bar__inner {
  box-shadow: none;
}
.sticky-bar__inner {
  pointer-events: auto;
  max-width: var(--container);
  margin-inline: auto;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-bar);
}
.sticky-bar__ico {
  position: relative;
  width: 32px; height: 32px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: #fff;
}
.sticky-bar__ico .num {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 16px; height: 16px;
  padding: 0 3px;
  background: var(--red);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-pill);
  font-size: 9px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}
.sticky-bar__summary { flex: 1; line-height: 1.2; min-width: 0; }
.sticky-bar__count {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.72;
}
.sticky-bar__total { font-size: 15px; font-weight: 700; }
.sticky-bar__price { font-size: 15px; font-weight: 700; display: block; }
.sticky-bar__label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

/* 4. ──────────────────────────────────────────────────────── COMPONENTS */

/* Buttons — the design has exactly two: navy (secondary) and red (primary). */
.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
  line-height: 1;
  text-align: center;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--red); color: #fff; box-shadow: 0 6px 14px rgba(217,1,52,0.25); }
.btn--primary:hover { background: var(--red-soft); color: #fff; }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-deep); color: #fff; }

.btn--ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn--ghost:hover { background: #f6f7fa; color: var(--navy); }

.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 14px 24px; font-size: 14px; }

/* Badges (sale / category flag on cards & images) */
.mb-badge {
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.mb-badge--navy { background: var(--navy); }
.mb-badge--green { background: var(--green); }

/* Category chips row (horizontal scroll on mobile) */
.chip-row {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: var(--space-1) 0 var(--space-3);
  scrollbar-width: none;            /* hide scrollbar (Firefox) */
  -webkit-overflow-scrolling: touch;
}
.chip-row::-webkit-scrollbar { display: none; } /* hide scrollbar (WebKit) */
.chip {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--navy);
  white-space: nowrap;
  cursor: pointer;
}
.chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Search field */
.mb-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--muted);
}
.mb-search input[type="search"],
.mb-search input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.mb-search .mb-icon { color: var(--muted); flex-shrink: 0; }

/* Generic card */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Section title with a "see all" link, used on the front page & shop */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-3);
}
.section-title h2,
.section-title h3 { margin: 0; font-size: 16px; }
.section-title .see-all {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

/* Forms (used by comments, Forminator inherits theme fonts/colors) */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="search"], input[type="number"],
textarea, select {
  font: inherit;
  color: var(--ink);
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(39, 56, 102, 0.12);
  outline: none;
}

/* Toast — the "added to cart" confirmation slide-in */
.mb-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sticky-bar-space) + 16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(20px);
  z-index: 70;
  width: min(420px, calc(100% - 24px));
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12.5px;
  color: #1f6d3e;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.mb-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.mb-toast__check {
  width: 20px; height: 20px;
  flex-shrink: 0;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.mb-toast__check .mb-icon { width: 12px; height: 12px; }
.mb-toast__body { flex: 1; line-height: 1.3; }
.mb-toast__body strong { color: #144d2a; }
.mb-toast__action {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  color: var(--red);
  white-space: nowrap;
}

/* Delivery reassurance note (cart + checkout) */
.delivery-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(39, 56, 102, 0.04);
  border: 1px solid rgba(39, 56, 102, 0.08);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--navy);
  margin-top: var(--space-3);
}
.delivery-note__ico {
  width: 28px; height: 28px;
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
}
.delivery-note__ico .mb-icon { width: 15px; height: 15px; }
.delivery-note__text strong { display: block; }
.delivery-note__text span { color: var(--muted); }

/* 5. ──────────────────────────────────────────────────── PAGE-SPECIFIC */

/* Front-page hero — full-bleed photo with navy scrim + centered content,
   echoing the Oxygen "Welcome" screen. */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-5) calc(var(--space-8) + 40px);
  color: #fff;
  overflow: hidden;
  background: var(--navy-deep);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}
.hero::before {                 /* legibility scrim */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(12,17,30,0.55) 0%,
    rgba(12,17,30,0.18) 32%,
    rgba(12,17,30,0.42) 66%,
    rgba(8,12,22,0.82) 100%);
}
.hero .eyebrow { color: #fff; opacity: 0.85; }
.hero h1 {
  color: #fff;
  font-size: clamp(32px, 9vw, 52px);
  font-weight: 600;
  text-shadow: 0 4px 24px rgba(0,0,0,0.55);
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  font-weight: 700;
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
}
.hero__tagline {
  font-size: 16px;
  color: rgba(255,255,255,0.88);
  max-width: 40ch;
  margin-bottom: var(--space-5);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }

/* Glassy price chip used on the hero */
.price-chip {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  color: #fff;
}
.price-chip .from { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.price-chip .amount { font-size: 22px; font-weight: 700; }

/* Page title block for regular pages/posts */
.page-head { margin-bottom: var(--space-5); }
.page-head h1 { font-size: clamp(26px, 7vw, 38px); font-weight: 600; }

/* Article / page body typography */
.entry-content { font-size: 15.5px; line-height: 1.65; }
.entry-content h2 { margin-top: var(--space-6); font-size: 22px; }
.entry-content img { border-radius: var(--radius); margin-block: var(--space-4); }
.entry-content a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }

/* 404 / empty states */
.state-block { text-align: center; padding: var(--space-8) var(--space-4); }
.state-block__icon {
  width: 64px; height: 64px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: #f6f7fa;
  display: grid;
  place-items: center;
  color: #c4c4ca;
}
.state-block__icon .mb-icon { width: 28px; height: 28px; }
.state-block h1 { font-size: 22px; }
.state-block p { color: var(--muted); max-width: 36ch; margin-inline: auto; }

/* Pagination */
.mb-pagination { display: flex; justify-content: center; gap: var(--space-2); margin-top: var(--space-6); }
.mb-pagination .page-numbers {
  min-width: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
}
.mb-pagination .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Larger screens: the design is mobile-first, so we just center & relax. */
@media (min-width: 720px) {
  body { font-size: 16px; }
  .site-main { padding-block: var(--space-6); }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
