/* Nordhauser — main stylesheet.
   Ported from design/styles.css; JetBrains Mono replaced by DM Sans; density toggle removed.
*/

:root {
  --green-900: #0f2a22;
  --green-800: #163a2f;
  --green-700: #1f4c3e;
  --green-600: #2a614f;
  --green-50:  #eef3ef;

  --terra-600: #b8542b;
  --terra-500: #cf6a3d;
  --terra-400: #e68a5e;
  --terra-100: #f6e2d4;
  --terra-50:  #fbf1e8;

  --bone-100: #faf7f2;
  --bone-200: #f2ede4;
  --bone-300: #e7e0d2;
  --bone-400: #d4ccbb;

  --ink-900: #1c1e1b;
  --ink-700: #3a3d38;
  --ink-500: #6b6e68;
  --ink-400: #8e918a;
  --ink-300: #b7b9b2;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(15, 42, 34, 0.04), 0 1px 1px rgba(15, 42, 34, 0.02);
  --shadow-md: 0 6px 24px -8px rgba(15, 42, 34, 0.12), 0 2px 6px -2px rgba(15, 42, 34, 0.06);
  --shadow-lg: 0 24px 60px -20px rgba(15, 42, 34, 0.22);

  --pad-card: 20px;
  --gap-grid: 20px;
  --row-h: 56px;

  --font-sans: "Nunito Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Last-resort safety net: any descendant that overflows horizontally at any
   breakpoint cannot cause a page-level horizontal scrollbar. `clip` is like
   hidden but doesn't establish a scrolling container, so position:sticky and
   position:fixed inside the document still work as expected (overflow:hidden
   would silently break sticky on every descendant). */
html, body { overflow-x: clip; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-900);
  background: var(--bone-100);
  -webkit-font-smoothing: antialiased;
}

.display {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.screen-reader-text { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; background: white; padding: 8px 14px; border-radius: 8px; z-index: 1000; }

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Utility bar ---------- */
.utility {
  background: var(--green-900);
  color: var(--bone-200);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}
.utility .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}
.utility .left { display: flex; gap: 22px; align-items: center; }
.utility .left span { display: inline-flex; gap: 6px; align-items: center; opacity: 0.85; }
.utility .right { display: flex; gap: 18px; align-items: center; }
.utility .right a { opacity: 0.85; }
.utility .right a:hover { opacity: 1; }
.utility .pill {
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 500;
}
.utility .nh-lang ul { display: inline-flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.utility .nh-lang a { text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Header ---------- */
.header {
  background: white;
  border-bottom: 1px solid var(--bone-300);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header .row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
  height: 76px;
}
.logo {
  display: inline-flex;
  align-items: center;
  height: 44px;
  flex-shrink: 0;
}
.logo img { height: 44px; width: auto; max-width: 200px; object-fit: contain; }
.logo .custom-logo-link { display: inline-flex; height: 44px; }
.logo .custom-logo { height: 44px; width: auto; }
.logo-text {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--green-800);
}
.foot-brand .logo { height: 48px; filter: brightness(0) invert(1); }
.foot-brand .logo img { height: 48px; }
.foot-brand .logo-text { color: white; filter: none; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bone-200);
  border-radius: 999px;
  padding: 0 8px 0 18px;
  height: 46px;
}
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 14.5px;
  color: var(--ink-900);
}
.search input::placeholder { color: var(--ink-500); }
.search .btn {
  margin-left: 6px;
  height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--green-800);
  color: white;
  font-size: 13.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- FiboSearch skin (inside .nh-search) ----------
   FiboSearch's own CSS is specific: `.dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit`
   (0,2,1) and `input[type="search"].dgwt-wcas-search-input` (0,2,1). We match or beat
   that by prefixing every override with `.nh-search .dgwt-wcas-sf-wrapp` (0,3,x). */

.nh-search { flex: 1; min-width: 0; position: relative; }
.nh-search > .nh-search__icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-500);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  z-index: 2;
}

.nh-search .dgwt-wcas-search-wrapp,
.nh-search .dgwt-wcas-search-wrapp.js-dgwt-wcas-layout-classic {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  width: 100%;
  max-width: none;
}

.nh-search .dgwt-wcas-search-wrapp .dgwt-wcas-search-form {
  display: flex;
  align-items: center;
  background: var(--bone-200);
  border-radius: 999px;
  padding: 0 6px 0 48px; /* left pad leaves room for the absolute .nh-search__icon at 20px + 18px + 10px gap */
  height: 46px;
  box-shadow: none;
  border: 0;
  margin: 0;
  width: 100%;
}

/* Kill the clearfix pseudo-elements that break our flex row. */
.nh-search .dgwt-wcas-sf-wrapp::before,
.nh-search .dgwt-wcas-sf-wrapp::after { content: none !important; display: none !important; }

.nh-search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp {
  display: flex !important;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 10px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
  width: auto;
  max-width: none;
  position: static;
  zoom: 1;
}

/* Input — beat FiboSearch's own `input[type="search"].dgwt-wcas-search-input`. */
.nh-search .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input,
.nh-search input[type="search"].dgwt-wcas-search-input {
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  border: 0 !important;
  background: transparent !important;
  outline: 0 !important;
  font: inherit !important;
  font-family: var(--font-sans) !important;
  font-size: 14.5px !important;
  height: 46px !important;
  line-height: 46px !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--ink-900) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  -webkit-appearance: none;
}
.nh-search .dgwt-wcas-search-input::placeholder { color: var(--ink-500) !important; opacity: 1 !important; }

/* Kill Safari / WebKit's built-in search field decorations — they paint a
   magnifier + clear button + "rewind" arrow that leaks through our custom skin. */
.nh-search input[type="search"]::-webkit-search-decoration,
.nh-search input[type="search"]::-webkit-search-cancel-button,
.nh-search input[type="search"]::-webkit-search-results-button,
.nh-search input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
}

.nh-search .dgwt-wcas-ico-magnifier {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
  margin: 0 !important;
  color: var(--ink-500);
  fill: var(--ink-500) !important;
}
.nh-search .dgwt-wcas-ico-magnifier path { fill: var(--ink-500) !important; }

/* Submit — beat `.dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit` (which is absolute + #333). */
.nh-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit,
.nh-search .dgwt-wcas-search-form .dgwt-wcas-search-submit {
  position: static !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  height: 34px !important;
  min-width: 0 !important;
  width: auto !important;
  padding: 0 18px !important;
  margin: 0 0 0 6px !important;
  border-radius: 999px !important;
  background: var(--green-800) !important;
  background-color: var(--green-800) !important;
  color: white !important;
  font-family: var(--font-sans) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
  border: 0 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 0 !important;
  line-height: 34px !important;
  box-shadow: none !important;
  flex-shrink: 0;
  transition: background-color .2s ease;
}
.nh-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover,
.nh-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:focus,
.nh-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:active,
.nh-search .dgwt-wcas-search-form .dgwt-wcas-search-submit:hover,
.nh-search .dgwt-wcas-search-form .dgwt-wcas-search-submit:focus,
.nh-search .dgwt-wcas-search-form .dgwt-wcas-search-submit:active {
  background: var(--green-900) !important;
  background-color: var(--green-900) !important;
  /* FiboSearch sets opacity:.7 on hover/focus/active — override so the button
     stays fully opaque and reads as our green-900, not a washed-out tint. */
  opacity: 1 !important;
}
.nh-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier { display: none !important; }

/* Kill FiboSearch's CSS-triangle "tail" on the submit button's left edge.
   Defined as .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::before in style.min.css. */
.nh-search .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::before,
.nh-search .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  background: none !important;
}

.nh-search .dgwt-wcas-preloader {
  position: absolute !important;
  right: 84px; /* clear of the submit button */
  top: 50%;
  transform: translateY(-50%);
}
.nh-search .dgwt-wcas-voice-search,
.nh-search .dgwt-wcas-om-bar { display: none !important; }
.nh-search .dgwt-wcas-close { right: 92px; }

/* Dropdown suggestions pane — FiboSearch renders this in a fixed/absolute element.
   Our branding tweaks: rounded corners, bone background, green focus. */
.dgwt-wcas-suggestions-wrapp,
.dgwt-wcas-details-wrapp {
  border-radius: var(--radius-md);
  border: 1px solid var(--bone-300);
  box-shadow: var(--shadow-md);
  margin-top: 8px;
}
.dgwt-wcas-suggestion:hover,
.dgwt-wcas-suggestion-focused {
  background: var(--bone-100) !important;
}
.dgwt-wcas-st-title { color: var(--ink-900); }
.dgwt-wcas-st-price, .dgwt-wcas-st-price ins { color: var(--green-800); font-weight: 700; }
.dgwt-wcas-st-sku { color: var(--ink-500); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; }

.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--ink-700);
  position: relative;
}
.icon-btn:hover { background: var(--bone-200); }
.icon-btn .lbl { font-size: 11px; color: var(--ink-500); }
.icon-btn .badge {
  position: absolute;
  top: 2px;
  right: 6px;
  background: var(--terra-500);
  color: white;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-family: var(--font-mono);
  font-weight: 700;
}
.icon-btn .badge[hidden] { display: none; }

/* ---------- Nav ---------- */
.nav {
  background: white;
  border-bottom: 1px solid var(--bone-300);
  /* Containing block for the absolutely-positioned mega panels. */
  position: relative;
}
.nav .row {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 48px;
  overflow: visible;
  flex-wrap: nowrap;
}
.nav .item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 100%;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.nav .item:hover { color: var(--green-800); border-bottom-color: var(--green-700); }
.nav .item.all {
  background: var(--green-800);
  color: white;
  padding: 0 18px;
  height: 38px;
  border-radius: 8px;
  margin-right: 14px;
  margin-bottom: 0;
  align-self: center;
}
.nav .item.all:hover { background: var(--green-900); color: white; border: 0; }
.nav ul.menu, .nav .menu { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; align-items: center; }
.nav .menu a { display: inline-flex; align-items: center; padding: 0 16px; height: 48px; font-size: 14px; font-weight: 500; color: var(--ink-900); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nav .menu a:hover { color: var(--green-800); border-bottom-color: var(--green-700); }

/* ---------- Mega menu ----------
   Nav item wrapper — items that have a mega panel get hover/focus behaviour.
   Plain category items (no children) render as bare <a class="item"> and need
   no wrapping. */
.nav .nav-item-has-mega { position: static; display: inline-flex; }
.nav .nav-item-has-mega > .item .chev {
  width: 12px; height: 12px;
  margin-left: 4px;
  opacity: 0.6;
  transition: transform .2s ease, opacity .2s ease;
}
.nav .nav-item-has-mega.is-open > .item .chev { transform: rotate(180deg); opacity: 1; }
/* Plain nav items take the green open-state colour; the "Kõik tooted" pill
   keeps its white-on-green look to stay legible on its own background. */
.nav .nav-item-has-mega.is-open > .item:not(.all) { color: var(--green-800); border-bottom-color: var(--green-700); }
.nav .nav-item--all.nav-item-has-mega.is-open > .item.all { color: white; background: var(--green-900); }

/* Panel — full-width row, sits under the nav. */
.mega-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: white;
  border-top: 1px solid var(--bone-300);
  border-bottom: 1px solid var(--bone-300);
  box-shadow: var(--shadow-lg);
  z-index: 40;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.nav-item-has-mega.is-open .mega-panel,
.mega-panel:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mega-panel[hidden] { display: none; }

.mega-panel__inner {
  padding: 32px 0 40px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}
.mega-panel__head {
  padding-right: 24px;
  border-right: 1px solid var(--bone-300);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 80px;
}
.mega-panel__eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-500);
}
.mega-panel__title {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
  color: var(--ink-900);
}

.mega-panel__grid {
  grid-column: 2;
  grid-row: 1 / span 2;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 24px;
}
.mega-panel__grid a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
  border-bottom: 0 !important; /* override .nav .item's bottom rule */
  height: auto !important;
  white-space: normal !important;
}
.mega-panel__grid a:hover { background: var(--bone-100); color: var(--green-800); }
.mega-panel__thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--bone-200);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mega-panel__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mega-panel__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mega-panel__name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mega-panel__count {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-500);
  letter-spacing: 0.02em;
}

.mega-panel__cta {
  grid-column: 1;
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--green-800);
  color: white;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  width: fit-content;
  height: auto !important;
  white-space: nowrap !important;
  border-bottom: 0 !important;
  margin-bottom: 0 !important;
  transition: background .15s ease;
}
.mega-panel__cta:hover { background: var(--green-900); color: white; }

/* --- "Kõik tooted" big panel — different layout from the per-category panels --- */
.mega-panel--all .mega-panel--all__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--bone-200);
  margin-bottom: 24px;
}
.mega-panel--all .mega-panel__title { font-size: 32px; }
.mega-panel--all .mega-panel__cta { align-self: center; }

.mega-panel--all__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 40px;
  padding-bottom: 40px;
}

.mega-col { display: flex; flex-direction: column; gap: 8px; }
.mega-col__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--bone-300);
  color: var(--ink-900) !important;
  text-decoration: none;
  border-radius: 0 !important;
  height: auto !important;
  white-space: normal !important;
}
.mega-col__head:hover { color: var(--green-800) !important; border-bottom-color: var(--green-700); }
.mega-col__title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.mega-col__count {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-500);
  letter-spacing: 0.02em;
}

.mega-col__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.mega-col__list li { display: block; }
.mega-col__list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  color: var(--ink-700) !important;
  font-size: 13.5px;
  text-decoration: none;
  border-bottom: 0 !important;
  height: auto !important;
  white-space: normal !important;
}
.mega-col__list a:hover { color: var(--green-800) !important; }
.mega-col__child { line-height: 1.25; }
.mega-col__cc {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-400);
  flex-shrink: 0;
}

/* Panel hidden below 980px — mobile menu is a separate concern (Phase 2.5). */
@media (max-width: 980px) {
  .mega-panel { display: none !important; }
  .nav .nav-item-has-mega > .item .chev { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 32px 0 8px; }
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  height: 520px;
}
.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bone-200);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink-900);
}
.hero-card.main {
  grid-row: span 2;
  background: var(--green-800);
  color: white;
  padding: 44px;
}
.hero-card.main > *         { position: relative; z-index: 2; }
.hero-card.main > .bg-img   { position: absolute; z-index: 0; }

/* Tone variants (applied on .hero-card.main.tone-*). */
.hero-card.main.tone-green { background: var(--green-800); color: white; }
.hero-card.main.tone-green::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(15,42,34,0.92) 0%, rgba(15,42,34,0.6) 45%, rgba(15,42,34,0.1) 100%),
    repeating-linear-gradient(135deg, #2a614f 0 20px, #244f41 20px 40px);
}

.hero-card.main.tone-dark { background: var(--ink-900); color: white; }
.hero-card.main.tone-dark::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(28,30,27,0.92) 0%, rgba(28,30,27,0.55) 55%, rgba(28,30,27,0.05) 100%),
    repeating-linear-gradient(135deg, #3a3d38 0 20px, #2a2d28 20px 40px);
}

.hero-card.main.tone-terra { background: var(--terra-500); color: white; }
.hero-card.main.tone-terra::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(184,84,43,0.92) 0%, rgba(207,106,61,0.4) 60%, rgba(230,138,94,0.05) 100%),
    repeating-linear-gradient(135deg, #cf6a3d 0 20px, #b8542b 20px 40px);
}

.hero-card.main.tone-bone { background: var(--bone-200); color: var(--ink-900); }
.hero-card.main.tone-bone .hero-eyebrow { color: var(--terra-600); }
.hero-card.main.tone-bone .btn-ghost { color: var(--ink-700); border-color: var(--bone-400); }

/* Image override — used whenever a background image is picked in Customizer.
   Layering:  bg-img (z:0)  <  ::after overlay (z:1)  <  text children (z:2).
   Dark-text tone-bone variant keeps its light wash (dark text needs the
   lightening overlay for legibility). All other main variants get the same
   image treatment as .subcat — darkened photo, no color tint. */
.hero-card.main.has-image.tone-bone::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(250,247,242,0.95) 0%, rgba(250,247,242,0.78) 40%, rgba(250,247,242,0.3) 80%, rgba(250,247,242,0.05) 100%);
}
.hero-card.main .bg-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-card.main:not(.tone-bone) .bg-img {
  filter: brightness(0.7) saturate(1.1);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--terra-400);
}
.hero-eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }

.hero h1 {
  font-family: var(--font-sans);
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 16px 0 0;
}
.hero .sub {
  font-size: 16px;
  opacity: 0.85;
  max-width: 440px;
  margin-top: 14px;
}
.hero .cta-row { display: flex; gap: 12px; align-items: center; margin-top: 28px; }

.btn-primary {
  background: var(--terra-500);
  color: white;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-primary:hover { background: var(--terra-600); }
.btn-ghost {
  padding: 14px 22px;
  border-radius: 999px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.3);
}

.countdown { display: flex; gap: 12px; align-items: baseline; }
.countdown .c {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 62px;
  text-align: center;
}
.countdown .c .n {
  display: block;
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.countdown .c .l {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.hero-card.sec { background: var(--bone-200); padding: 24px; }
.hero-card.sec.dark { background: var(--ink-900); color: var(--bone-100); }
.hero-card.sec.warm { background: var(--terra-100); }

.hero-card .tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: white;
  color: var(--green-800);
  width: fit-content;
}
.hero-card .tag.terra { background: var(--terra-500); color: white; }
.hero-card h3 {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 12px 0 0;
}
.hero-card .discount {
  font-family: var(--font-sans);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
  overflow-wrap: break-word;
}
.hero-card .discount span { font-size: 22px; vertical-align: top; margin-left: 2px; }
.hero-card .arrow {
  align-self: flex-end;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green-800);
}
.hero-card.sec.dark .arrow { background: var(--terra-500); color: white; }
.hero-card .bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
/* .sec.dark gets the subcat treatment (full-opacity photo, darkened by
   filter) so the image reads instead of being washed into the dark bg. */
.hero-card.sec.dark .bg-img {
  opacity: 1;
  filter: brightness(0.7) saturate(1.1);
}

/* placeholder imagery */
.ph {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0 8px, rgba(0,0,0,0.08) 8px 16px),
    var(--bone-300);
  z-index: 0;
}
.ph.dark {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 8px, rgba(255,255,255,0.06) 8px 16px),
    var(--ink-700);
}
.ph.terra {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0 8px, rgba(0,0,0,0.08) 8px 16px),
    var(--terra-100);
}
.ph-label {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255,255,255,0.75);
  padding: 3px 7px;
  border-radius: 3px;
  color: var(--ink-700);
  z-index: 1;
  pointer-events: none;
}

/* ---------- Section shell ---------- */
section.block { padding: 72px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 24px;
}
.section-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-500);
  margin-bottom: 10px;
  font-weight: 500;
}
.section-head h2 {
  font-family: var(--font-sans);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1;
}
.section-head .desc {
  font-size: 15px;
  color: var(--ink-500);
  max-width: 420px;
}
.section-head .nav-arrows { display: flex; gap: 8px; }
.arr {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--bone-400);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: var(--ink-700);
}
.arr:hover { border-color: var(--green-800); color: var(--green-800); }

/* ---------- Categories ---------- */
.cats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--gap-grid);
}
.cat-tile {
  position: relative;
  aspect-ratio: 1 / 1.15;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: var(--pad-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease;
  isolation: isolate;
}
.cat-tile:hover { transform: translateY(-2px); }
.cat-tile > * { position: relative; z-index: 2; }

/* --- Flat tone backgrounds (also the fallback when a tile has no image) --- */
.cat-tile.tone-green { background: var(--green-800); color: white; }
.cat-tile.tone-dark  { background: var(--ink-900);   color: white; }
.cat-tile.tone-warm  { background: var(--terra-500); color: white; }
.cat-tile.tone-bone  { background: var(--bone-200);  color: white; }

/* --- Image layer — full-bleed, darkened to match the subcat treatment so
       white text reads cleanly without a per-tone color wash. --- */
.cat-tile .bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.7) saturate(1.1);
  transition: transform .35s ease, filter 0.25s ease;
}
.cat-tile:hover .bg-img {
  transform: scale(1.04);
  filter: brightness(0.85) saturate(1.15);
}

/* --- Meta row (label + count pill) --- */
.cat-tile .meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.cat-tile .populaarseim {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--terra-400);
  align-self: center;
}
.cat-tile .count {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-700);
  flex-shrink: 0;
}

/* --- Title row (+ featured arrow) --- */
.cat-tile .title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.cat-tile h4 {
  font-family: var(--font-sans);
  font-size: 18px;
  letter-spacing: -0.015em;
  font-weight: 800;
  margin: 0;
  line-height: 1.15;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* --- Featured tile — 2×2, larger title, terra arrow --- */
.cat-tile.featured {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: unset;
}
.cat-tile.featured h4 { font-size: 34px; max-width: 280px; }
.cat-tile.featured .count { background: rgba(255,255,255,0.15); color: white; }
.cat-tile.featured .arrow {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--terra-500);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Products ---------- */
.carousel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap-grid);
}
.product {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--bone-300);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}
.product:hover { border-color: var(--green-700); box-shadow: var(--shadow-md); }
.product .thumb {
  position: relative;
  aspect-ratio: 1 / 0.85;
  background: var(--bone-200);
  overflow: hidden;
}
.product .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product .flags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.product .flag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--green-800);
  color: white;
}
.product .flag.terra { background: var(--terra-500); }
.product .flag.out { background: var(--bone-400); color: var(--ink-900); }
.product .wish {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--ink-700);
}
.product .wish:hover { color: var(--terra-600); }
.product .body {
  padding: var(--pad-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product .sku {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-400);
  letter-spacing: 0.04em;
}
.product h5, .product .nh-product-card__title, .product .woocommerce-loop-product__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-900);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product .specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.product .spec {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bone-200);
  color: var(--ink-700);
}
.product .stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-500);
}
.product .stock::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 999px;
  background: #3a9d6a;
}
.product .stock.low::before { background: var(--terra-500); }
.product .stock.backorder::before { background: var(--terra-500); }
.product .stock.out::before { background: var(--ink-400); }
.product .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--bone-300);
}
.product .price {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.product .price .unit {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-500);
  margin-left: 2px;
  letter-spacing: 0;
}
.product .was {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-400);
  text-decoration: line-through;
  margin-right: 8px;
}
.product .add {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--green-800);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.product .add:hover { background: var(--terra-500); }

/* ---------- Trust bar ---------- */
.trust { background: var(--green-900); color: var(--bone-200); padding: 28px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.trust-item { display: flex; gap: 16px; align-items: center; }
.trust-item .ic {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--terra-400);
}
.trust-item h5 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: white;
}
.trust-item p {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  opacity: 0.7;
}

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--gap-grid); }
.post { display: flex; flex-direction: column; gap: 16px; }
.post .thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bone-200);
}
.post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post.big .thumb { aspect-ratio: 4 / 5; }
.post .meta-row {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
}
.post .cat-t { color: var(--terra-600); }
.post h4 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}
.post.big h4 { font-size: 30px; }
.post p { margin: 0; color: var(--ink-500); font-size: 14px; line-height: 1.5; }

/* ---------- Newsletter ---------- */
.newsletter-wrap { padding: 96px 0; background: var(--bone-200); }
.newsletter {
  background: white;
  border-radius: var(--radius-lg);
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 220px; height: 220px;
  background: url("/wp-content/uploads/2026/04/Nordhauser-N-1.png") center / contain no-repeat;
  z-index: 0;
  pointer-events: none;
}
.newsletter > * { position: relative; z-index: 1; }
.newsletter .eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--terra-600);
  margin-bottom: 14px;
}
.newsletter h2 {
  font-family: var(--font-sans);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  line-height: 1.1;
}
.newsletter p { color: var(--ink-500); margin: 0 0 24px; font-size: 15px; }
.news-perks { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; list-style: none; padding: 0; }
.news-perks li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-700); }
.news-perks .check {
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.news-form {
  background: var(--bone-100);
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bone-300);
}
.news-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  margin-bottom: 8px;
}
.news-form .field {
  display: flex;
  background: white;
  border: 1px solid var(--bone-300);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  align-items: center;
}
.news-form input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 14.5px;
  background: transparent;
}
.news-form .sub-btn {
  padding: 10px 22px;
  background: var(--green-800);
  color: white;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  transition: background .2s ease;
}
.news-form .sub-btn:hover { background: var(--green-900); }
.news-form .tiny { font-size: 11.5px; color: var(--ink-500); margin-top: 14px; }
.news-form .tiny a { text-decoration: underline; }

/* ---------- Footer ---------- */
footer { background: var(--green-900); color: var(--bone-200); padding: 72px 0 32px; }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  gap: 40px;
  margin-bottom: 56px;
}
footer h6 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--terra-400);
  margin: 0 0 20px;
  font-weight: 500;
}
footer ul { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
footer ul a {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  color: var(--bone-200);
  opacity: 0.75;
  padding: 6px 0;
  line-height: 1.4;
  transition: color 0.15s, opacity 0.15s;
}
footer ul a:hover { opacity: 1; color: var(--terra-400); }
.foot-brand .logo { margin-bottom: 16px; }
.foot-brand .foot-rating { display: block; margin-top: 18px; height: 56px; width: auto; max-width: 220px; }

.foot-contact { font-size: 13px; line-height: 1.55; opacity: 0.85; display: flex; flex-direction: column; gap: 18px; }
.foot-contact h6 { margin-bottom: 0; }
.foot-contact__block { display: flex; flex-direction: column; gap: 2px; }
.foot-contact__block strong { color: white; font-weight: 500; font-size: 14.5px; margin-bottom: 4px; }
.foot-contact__block span { color: var(--bone-200); overflow-wrap: anywhere; }
.foot-contact__block + .foot-contact__block {
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.foot-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  opacity: 0.7;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.foot-bottom .pays { display: flex; align-items: center; flex-shrink: 0; }
.foot-bottom .pays img {
  display: block;
  height: 28px;
  width: auto;
  max-width: 280px;
}

/* ---------- Cart drawer (Phase 3) ---------- */
.nh-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 100vw;
  background: white;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
}
.nh-cart-drawer.is-open { transform: translateX(0); }
.nh-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,42,34,0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.nh-cart-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* Mini-cart content inside the drawer.
   Lives in main.css (loaded everywhere) — not in shop.css — because the
   drawer renders on every route via wp_footer in inc/woocommerce.php and
   should look identical regardless of which page the visitor is on. */
.nh-cart-drawer .widget_shopping_cart_content { font-size: 14px; }
.nh-cart-drawer .woocommerce-mini-cart {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nh-cart-drawer .woocommerce-mini-cart__item,
.nh-cart-drawer .mini_cart_item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bone-300);
  align-items: start;
}
.nh-cart-drawer .mini_cart_item img {
  width: 60px; height: 60px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bone-200);
  float: none !important;
  margin: 0 !important;
}
.nh-cart-drawer .mini_cart_item a.remove {
  color: var(--ink-400);
  font-size: 18px;
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.nh-cart-drawer .mini_cart_item a.remove:hover { color: var(--terra-600); }
.nh-cart-drawer .woocommerce-mini-cart__total {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--bone-300);
  font-weight: 700;
  font-size: 16px;
}
.nh-cart-drawer .woocommerce-mini-cart__buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.nh-cart-drawer .woocommerce-mini-cart__buttons .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.nh-cart-drawer .woocommerce-mini-cart__buttons .button.checkout { background: var(--terra-500); color: white; }
.nh-cart-drawer .woocommerce-mini-cart__buttons .button:not(.checkout) { background: var(--bone-200); color: var(--ink-900); }

/* ---------- icon stroke helper ---------- */
.i { stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Adminer/content-area safety resets when on generic pages ---------- */
.entry-content > * + * { margin-top: 1em; }
.entry-content p { line-height: 1.7; }
.entry-content h2 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2em; }
.entry-content h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.015em; margin-top: 1.5em; }
.entry-content a { color: var(--green-800); border-bottom: 1px solid var(--green-700); }
.entry-content img { border-radius: var(--radius-md); }

/* ---------- Responsive: container + product cards (Stage 1) ---------- */
/* Container padding scales down with viewport — 32px desktop is wasteful at
   tablet width and impossible at mobile (a 360-px viewport loses ~18% to
   horizontal padding). Affects every page that uses .container. */
@media (max-width: 1023px) {
  .container { padding: 0 24px; }
}
@media (max-width: 639px) {
  .container { padding: 0 16px; }

  /* Product card chrome at narrow widths — used by both homepage carousel
     and category grid. 2-up cards at 360 px need every pixel of body width. */
  .product .body { padding: 12px; gap: 6px; }
  .product h5,
  .product .nh-product-card__title,
  .product .woocommerce-loop-product__title {
    font-size: 13px;
    line-height: 1.3;
  }
  .product .price { font-size: 18px; }
  .product .price .unit { font-size: 10px; }
  .product .add { width: 36px; height: 36px; border-radius: 8px; }
  .product .price-row { padding-top: 8px; }
  .product .specs { gap: 4px; }
  .product .spec { font-size: 10px; padding: 1px 6px; }
  .product .sku { font-size: 10px; }
  .product .stock { font-size: 11px; }
  .product .flag { font-size: 9.5px; padding: 3px 6px; }
  /* When a card carries both flags (SOODUS + LAOTOODE), the second one runs
     out of horizontal room next to the wishlist button on narrow cards. Span
     the flag row across the card and center it; with a single flag the
     selector doesn't match and the row stays anchored top-left. */
  .product .flags:has(.flag + .flag) {
    left: 12px;
    right: 12px;
    justify-content: center;
  }
  .product .wish { width: 30px; height: 30px; }
}

/* ---------- Responsive (Stage 3 — header / mega-nav / search) ----------
 * Keeps the existing `(max-width: 980px)` mega-panel-kill rule above. The
 * Stage 3 rules layer on top:
 *   tablet  (≤ 1023 px): hamburger appears, desktop nav row hidden, mega
 *                        panels still hidden via existing 980 rule, header
 *                        chrome shrinks. Sign-in label drops, icon stays.
 *   mobile  (≤ 639 px):  utility bar hidden; header non-sticky; sign-in icon
 *                        moves to nav drawer footer; FiboSearch collapses to
 *                        a trigger icon that opens a top-overlay panel.
 *
 * Z-indexes for layered drawers (above header z-index 50):
 *   filter drawer (category page)  — 200
 *   nav drawer                     — 220
 *   search overlay                 — 250
 */

/* Default (desktop) — drawer chrome is invisible scaffolding. */
.nh-search-host { display: contents; }
.nh-search-panel { display: contents; }
.nh-hamburger,
.nh-search-trigger,
.nav-drawer-wrap,
.nh-search-backdrop,
.nh-search-close { display: none; }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  /* Header row reflows: hamburger | logo | search (1fr) | actions. */
  .header .row {
    grid-template-columns: auto auto 1fr auto;
    gap: 16px;
    height: 64px;
  }
  .logo { height: 36px; }
  .logo img,
  .logo .custom-logo,
  .logo .custom-logo-link { height: 36px; }

  .nh-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--bone-300);
    color: var(--ink-900);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
  }
  .nh-hamburger:hover { background: var(--bone-200); }

  /* Drop the icon-btn text labels — leave just the icons. */
  .icon-btn .lbl { display: none; }
  .icon-btn { padding: 8px; gap: 0; }

  /* Hide the desktop nav row — nav drawer takes over. The existing
     980 px rule already kills mega panels; this kills the row itself. */
  .nav { display: none; }

  /* Mobile-nav drawer becomes a fixed overlay panel. */
  .nav-drawer-wrap {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 220;
    pointer-events: none;
  }
  .nav-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 42, 34, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .nav-drawer-wrap.is-open { pointer-events: auto; }
  .nav-drawer-wrap.is-open .nav-drawer-backdrop { opacity: 1; }

  .nav-drawer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(340px, 88vw);
    background: white;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
  }
  .nav-drawer-wrap.is-open .nav-drawer { transform: translateX(0); }

  .nav-drawer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--bone-300);
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
  }
  .nav-drawer-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink-900);
    flex: 1;
  }
  .nav-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--bone-300);
    color: var(--ink-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
  }
  .nav-drawer-close:hover { border-color: var(--ink-700); }

  .nav-drawer-body {
    flex: 1;
    /* Bottom padding gives the last category accordion breathing room
       before the sticky foot when user scrolls to the bottom of the menu. */
    padding: 8px 0 24px;
    overflow-y: auto;
  }

  .nav-drawer-shop {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 16px 12px;
    padding: 14px 16px;
    background: var(--green-800);
    color: white;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
  }
  .nav-drawer-shop .nh-arrow { margin-left: auto; }
  .nav-drawer-shop:hover { background: var(--green-900); color: white; }

  .nav-drawer-cat {
    border-bottom: 1px solid var(--bone-200);
  }
  .nav-drawer-cat > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-900);
    user-select: none;
    min-height: 44px;
  }
  .nav-drawer-cat > summary::-webkit-details-marker { display: none; }
  .nav-drawer-cat > summary > .nm { flex: 1; }
  .nav-drawer-cat > summary > .ct {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-400);
  }
  .nav-drawer-cat > summary > .caret {
    color: var(--ink-500);
    transition: transform 0.2s ease;
    flex-shrink: 0;
  }
  .nav-drawer-cat[open] > summary > .caret { transform: rotate(180deg); }
  .nav-drawer-cat[open] > summary { color: var(--green-800); }

  .nav-drawer-children {
    list-style: none;
    margin: 0;
    padding: 4px 0 12px;
    background: var(--bone-100);
  }
  .nav-drawer-children li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 32px;
    font-size: 13.5px;
    color: var(--ink-700);
    text-decoration: none;
    min-height: 40px;
  }
  .nav-drawer-children li a:hover { color: var(--green-800); background: white; }
  .nav-drawer-children li a > .nm { flex: 1; }
  .nav-drawer-children li a > .ct {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-400);
  }
  .nav-drawer-children-all a {
    color: var(--terra-600);
    font-weight: 600;
    font-size: 13px;
  }
  .nav-drawer-children-all a:hover { color: var(--terra-500); }

  .nav-drawer-foot {
    border-top: 1px solid var(--bone-300);
    background: white;
    padding: 16px;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .nav-drawer-account {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    color: var(--ink-900);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid var(--bone-200);
    margin-bottom: 4px;
  }
  .nav-drawer-link {
    padding: 10px 0;
    color: var(--ink-700);
    font-size: 13.5px;
    text-decoration: none;
  }
  .nav-drawer-foot .pill {
    align-self: flex-start;
    padding: 4px 10px;
    border: 1px solid var(--bone-300);
    border-radius: 999px;
    font-size: 11.5px;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--ink-700);
    margin-top: 8px;
    background: white;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 639px) {
  /* Utility bar gone — saves ~36 px of vertical real estate. Lang switcher
     migrates into the nav-drawer footer (see main-nav.php). */
  .utility { display: none; }

  /* Header is non-sticky on mobile — sticking 60+44 px eats too much of
     a 568 px iPhone SE viewport. User scrolls up to access menu. */
  .header { position: static; }
  .header .row {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    height: 60px;
  }
  .logo { height: 32px; justify-self: start; }
  .logo img,
  .logo .custom-logo,
  .logo .custom-logo-link { height: 32px; }

  /* Account icon hidden — the link migrated into the nav drawer footer.
     Cart icon stays in the header (the cart drawer is not yet mobile-aware). */
  .icon-btn--account { display: none; }

  /* Search-trigger icon replaces inline FiboSearch in the header row. */
  .nh-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-900);
    cursor: pointer;
    padding: 0;
  }
  .nh-search-trigger:hover { background: var(--bone-200); }

  /* Search-overlay: full-width drop-down panel, fixed at top of viewport,
     animates in via translateY. Backdrop fades over the page. */
  .nh-search-host {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 250;
    pointer-events: none;
  }
  .nh-search-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(15, 42, 34, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .nh-search-host.is-open { pointer-events: auto; }
  .nh-search-host.is-open .nh-search-backdrop { opacity: 1; }

  /* Single panel wraps both the close button and the search input — they
     animate together. */
  .nh-search-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top, 12px));
    background: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    transition: transform 0.25s ease;
  }
  .nh-search-host.is-open .nh-search-panel { transform: translateY(0); }

  .nh-search-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--bone-300);
    color: var(--ink-900);
    cursor: pointer;
    padding: 0;
    order: 2;  /* x sits to the right of the search field */
  }
  .nh-search-close:hover { background: var(--bone-200); }

  /* Inside the panel, .nh-search takes flex remaining width. Override the
     desktop `.nh-search { flex: 1; min-width: 0 }` is fine — same shape. */
  .nh-search-host > .nh-search-panel > .nh-search {
    flex: 1;
    min-width: 0;
    height: 44px;
  }
}

/* ---------- Responsive (Stage 4 — footer + newsletter + touch targets) ----- */

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  /* Newsletter card stacks. The decorative terra circle (`::before`) stays
     but pulls in. */
  .newsletter-wrap { padding: 64px 0; }
  .newsletter {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 40px;
  }
  .newsletter h2 { font-size: 32px; }

  /* Footer: 5-col → 2-col with brand spanning full row. */
  footer { padding: 56px 0 28px; }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
    margin-bottom: 36px;
  }
  .foot-grid > .foot-brand { grid-column: 1 / -1; }
  .foot-brand .foot-rating { margin-top: 14px; height: 52px; }

  /* Header icon-btn: ensure 40-px minimum at tablet too (icon-only state). */
  .icon-btn { min-width: 40px; min-height: 40px; padding: 10px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 639px) {
  /* Newsletter — drop the decorative circle, tighten everything. */
  .newsletter-wrap { padding: 40px 0; }
  .newsletter {
    padding: 32px 24px;
    gap: 24px;
  }
  .newsletter::before { display: none; }
  .newsletter h2 { font-size: 26px; }
  .newsletter p { font-size: 14px; margin-bottom: 16px; }
  .news-perks { gap: 8px; }
  .news-perks li { font-size: 13px; }
  .news-form { padding: 20px; }
  .news-form .field {
    flex-direction: column;
    align-items: stretch;
    border-radius: 12px;
    padding: 6px;
    gap: 6px;
  }
  .news-form input {
    padding: 12px 14px;
    font-size: 14px;
  }
  .news-form .sub-btn {
    width: 100%;
    min-height: 44px;
    padding: 12px 22px;
    border-radius: 999px;
    text-align: center;
    justify-content: center;
  }

  /* Footer — single column. */
  footer { padding: 40px 0 24px; }
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 28px;
  }
  .foot-grid > .foot-brand { grid-column: auto; }
  .foot-brand .foot-rating { height: 48px; margin-top: 12px; }
  footer h6 { margin-bottom: 12px; }
  footer ul { gap: 0; }
  /* 40-px touch floor on every footer link. */
  footer ul a { padding: 10px 0; min-height: 40px; }
  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
  }
  .foot-bottom .pays img { height: 24px; max-width: 100%; }

  /* ---------- Touch-target sweep (40-px floor) ---------- */
  /* Product card add-to-cart. */
  .product .add { width: 40px; height: 40px; border-radius: 10px; }
  /* Header icon buttons (cart on mobile). */
  .icon-btn { min-width: 40px; min-height: 40px; padding: 10px; }
  /* Cart count badge — keep the visual size; ensure parent icon-btn meets floor (above). */
}

/* ---------- Responsive (Stage 5 — homepage) ---------- */
/* Hero, categories, products, trust-bar, blog. Mirrors the category-archive
   pass (gotchas 26–34). Newsletter + footer already responsive (Stage 4). */

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  /* Section shell — tighten vertical rhythm. */
  section.block { padding: 56px 0; }
  .section-head { margin-bottom: 28px; gap: 16px; }
  .section-head h2 { font-size: 36px; }

  /* ---------- Hero ---------- */
  .hero { padding: 24px 0 8px; }
  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    height: auto;
    gap: 12px;
  }
  /* Main card spans both columns above the 2×2 sec block. */
  .hero-card.main {
    grid-column: 1 / -1;
    grid-row: auto;
    padding: 32px;
  }
  .hero-card.sec { padding: 20px; }
  .hero h1 { font-size: 48px; margin-top: 14px; }
  .hero .sub { font-size: 15px; }
  .hero .cta-row { margin-top: 22px; }
  .hero-card h3 { font-size: 22px; }
  .hero-card .discount { font-size: 28px; }
  .hero-card .discount span { font-size: 18px; }
  .hero-card.sec .arrow { width: 36px; height: 36px; }

  /* ---------- Categories ---------- */
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Featured tile keeps its 2×2 span at tablet — visually anchors the grid. */
  .cat-tile.featured h4 { font-size: 28px; max-width: 220px; }

  /* ---------- Products ---------- */
  .carousel { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* ---------- Trust bar ---------- */
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

  /* ---------- Blog ---------- */
  /* Big post spans the row, two small posts side-by-side below. */
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "big  big"
      "p2   p3";
    gap: 32px 20px;
  }
  .blog-grid > .post:nth-child(1) { grid-area: big; }
  .blog-grid > .post:nth-child(2) { grid-area: p2; }
  .blog-grid > .post:nth-child(3) { grid-area: p3; }
  /* Drop the tall 4/5 ratio at narrower widths — saves vertical real estate. */
  .post.big .thumb { aspect-ratio: 16 / 10; }
  .post.big h4 { font-size: 26px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 639px) {
  /* Section shell. */
  section.block { padding: 40px 0; }
  .section-head { margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
  .section-head h2 { font-size: 28px; }
  .section-head .desc { font-size: 14px; }
  .section-head .nav-arrows { display: none; }

  /* ---------- Hero ---------- */
  .hero { padding: 16px 0 4px; }
  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .hero-card.main {
    grid-column: 1 / -1;
    padding: 22px;
  }
  .hero-card.sec { padding: 16px; }
  .hero h1 { font-size: 32px; margin-top: 12px; }
  .hero .sub { font-size: 14px; margin-top: 10px; }
  .hero .cta-row { margin-top: 20px; }
  .btn-primary { padding: 12px 20px; font-size: 14px; min-height: 44px; }

  /* Countdown — 4 cells must fit on a 360-px viewport.
     Available content width ≈ 360 − 32 (container) − 44 (card padding) = 284 px.
     4 × 56 + 3 × 8 = 248 px. Fits. */
  .countdown { gap: 8px; }
  .countdown .c { padding: 8px 10px; min-width: 56px; }
  .countdown .c .n { font-size: 22px; }
  .countdown .c .l { font-size: 9px; }

  /* Hero stats — inline grid template is `1fr 1px 1fr 1px 1fr` (set in PHP).
     Force columns to minmax(0, 1fr) so cells shrink below content size; otherwise
     long uppercase labels ("Allahindlus kuni" / "Kalkulatsioon" / "Materjale") plus
     the eyebrow's 20-px ::before line blow each cell out and push the third stat
     off the right edge of the card on narrow viewports. */
  .hero-stats {
    grid-template-columns: minmax(0,1fr) 1px minmax(0,1fr) 1px minmax(0,1fr) !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
  }
  .hero-stats .hero-eyebrow {
    font-size: 10px;
    letter-spacing: 0.06em;
    gap: 0;
    overflow-wrap: anywhere;
  }
  .hero-stats .hero-eyebrow::before { display: none; }
  .hero-stats__value { font-size: 22px !important; }
  .hero-stats > div:first-child .hero-stats__value { font-size: 28px !important; }

  /* Sec cards — denser typography. */
  .hero-card h3 { font-size: 18px; margin-top: 8px; }
  .hero-card .discount { font-size: 22px; }
  .hero-card .discount span { font-size: 14px; }
  .hero-card.sec .arrow { width: 34px; height: 34px; }
  /* Invisible hit-zone: visual stays small, tap target ≥ 40 px. */
  .hero-card.sec .arrow { position: relative; }
  .hero-card.sec .arrow::before {
    content: "";
    position: absolute;
    inset: -8px;
  }

  /* ---------- Categories ---------- */
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* Featured drops its 2×2 span and becomes a full-width banner row 1. */
  .cat-tile.featured {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 16 / 9;
  }
  .cat-tile.featured h4 { font-size: 24px; max-width: none; }
  .cat-tile h4 { font-size: 16px; }
  .cat-tile { padding: 16px; }

  /* ---------- Products ---------- */
  .carousel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product .body { gap: 6px; }
  .product .price { font-size: 18px; }
  .product .add { width: 40px; height: 40px; }

  /* ---------- Trust bar ---------- */
  .trust { padding: 24px 0; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .trust-item { gap: 12px; }
  .trust-item .ic { width: 36px; height: 36px; }
  .trust-item h5 { font-size: 13px; }
  .trust-item p { font-size: 11.5px; }

  /* ---------- Blog ---------- */
  .blog-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    gap: 28px;
  }
  .blog-grid > .post:nth-child(1),
  .blog-grid > .post:nth-child(2),
  .blog-grid > .post:nth-child(3) { grid-area: auto; }
  .post .thumb,
  .post.big .thumb { aspect-ratio: 16 / 10; }
  .post h4 { font-size: 20px; }
  .post.big h4 { font-size: 22px; }
  .post p { font-size: 13.5px; }
}
