/* Nordhauser — shop + product page styles. Loaded only on WC surfaces.
 * Archive-specific rules (category head, sidebar, toolbar, grid, pagination,
 * SEO body, recently viewed) live in category.css. This file keeps the
 * single-product wrapper resets, breadcrumb base, WC notices, and cart drawer.
 */

.nh-shop { padding: 32px 0 72px; }

.nh-shop .woocommerce-breadcrumb {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-500);
  letter-spacing: 0.04em;
  margin: 0 0 20px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.nh-shop .woocommerce-breadcrumb a {
  color: var(--ink-500);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.nh-shop .woocommerce-breadcrumb a:hover { color: var(--green-800); background: transparent; }
/* Single-product breadcrumb wrapper — same .container max-width / padding as
   every other section's container; only difference is vertical spacing. */
.nh-pdp-crumbs {
  padding-top: 24px;
  padding-bottom: 20px;
  /* Anchor for the full-viewport divider drawn via ::after below. */
  position: relative;
  /* Inherit horizontal padding (32px) from .container — nothing extra here. */
}
.nh-pdp-crumbs .woocommerce-breadcrumb { margin: 0; padding: 0; }
/* Full-viewport-width hairline between breadcrumb row and the product hero
   (.pdp2). A border on .nh-pdp-crumbs would only span 1360 px max because the
   wrapper is also a .container; instead, paint a pseudo-element that breaks
   out to the viewport edge via left/right calc(50% - 50vw). Matches the
   .nav / .shop-toolbar visual language site-wide. */
.nh-pdp-crumbs::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  height: 1px;
  background: var(--bone-300);
  pointer-events: none;
}
/* Strip any inherited border/divider on the inner <nav> (some plugin/WC-core
   sheets style .woocommerce-breadcrumb directly). */
.nh-shop .nh-pdp-crumbs .woocommerce-breadcrumb { border: 0 !important; }
/* Make sure .nh-shop's own padding doesn't add a horizontal offset on product pages
   (the breadcrumb container already brings .container's 32px padding). */
.nh-single-main { padding: 0 !important; }

/* WC messages (add-to-cart confirmation, errors) */
.nh-shop .woocommerce-message,
.nh-shop .woocommerce-info,
.nh-shop .woocommerce-error {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--green-50);
  color: var(--green-900);
  border: 1px solid var(--green-600);
  margin-bottom: 20px;
  font-size: 14px;
}
.nh-shop .woocommerce-error { background: var(--terra-50); border-color: var(--terra-500); color: var(--terra-600); }

/* ---------- Archive cards: strip the double-card ----------
 * `wc_product_class()` stamps `.product` onto the <li> archive wrapper,
 * AND our content-product.php emits an inner <a class="product"> with the
 * actual card markup (thumb + body + price-row). main.css's `.product`
 * rule then paints BOTH layers as a white card with a border + radius.
 *
 * Visually identical when the inner <a> fills the <li>, but on rows where
 * one product has a tall title and the others are short / out-of-stock
 * (no price-row to push the body taller), the <li> stretches via the
 * grid's `align-self: stretch` while the <a> stays content-sized — the
 * <li>'s border peeks out as a "border within a border" around the
 * shorter inner card.
 *
 * Fix: remove the box styling from <li.product> (scoped so the single-
 * product page's <div class="nh-single product"> is untouched) and
 * stretch the inner <a> to fill the row. Single visible card, aligned
 * bottoms across the row. */
.nh-shop li.product {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.nh-shop li.product > a.product {
  height: 100%;
  width: 100%;
}

/* ---------- Single product ----------
   The flowing-editorial single-product layout lives in product.css
   (each section: .pdp2, .sd-grid, .bndl, .related2, .guides2 …
   owns its own grid + paint). The .nh-single class on the
   wc_product_class wrapper is just a hook — no layout here.

   `overflow: visible` is critical: WooCommerce Blocks (or the parent block
   theme styles) apply `overflow: clip` to elements with `.product` class.
   That `clip` propagates a CSS containing block that BREAKS position:sticky
   for any descendant — like our .bb2-wrap buy box. Forcing overflow visible
   on this wrapper lets the buy box stick all the way down through .pdp2. */
.nh-single { overflow: visible !important; }
.nh-single.product { overflow: visible !important; }

/* Reset the archive-card chrome that bleeds onto the single-product wrapper.
   `main.css .product { background:white; border:1px solid var(--bone-300);
   border-radius:var(--radius-md); display:flex; flex-direction:column }` was
   written for <li class="product"> archive cards — but WooCommerce's
   wc_product_class() also adds `.product` to the <div> single-product
   wrapper, so the whole PDP picked up a white rounded-bordered card from the
   breadcrumb down to the footer. Strip those properties here; the editorial
   PDP paints its own per-section backgrounds. */
.nh-single.product {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: block !important;
  /* keep the property reset minimal; transition + flex-direction on a
     non-flex container are no-ops once display is block */
}

/* Mini-cart drawer content styles (.nh-cart-drawer .widget_shopping_cart_content
   et al.) moved to main.css so the slide-out cart looks identical on every
   route. shop.css is gated to PDP / cart / archives — without the move, the
   drawer slid open on homepage / blog / generic pages with no styling on its
   inner WC mini-cart markup. */

/* ============================================================
 * .nh-qty — canonical pill quantity stepper.
 *
 * Used everywhere woocommerce/global/quantity-input.php renders:
 * cart line items, mini-cart drawer, PDP buybox, action bar. Base
 * styling lives here (loaded on cart + PDP + archives via shop.css);
 * PDP buybox bumps the size via .bb2 form.cart .nh-qty in product.css
 * (those rules use !important to override these defaults, intentional).
 * ============================================================ */
.nh-qty {
  display: inline-grid;
  grid-template-columns: 32px minmax(48px, 1fr) 32px;
  align-items: stretch;
  height: 36px;
  background: white;
  border: 1px solid var(--bone-400);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.nh-qty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bone-100);
  color: var(--ink-700);
  border: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.nh-qty__btn:hover { background: var(--bone-200); color: var(--ink-900); }
.nh-qty__btn:active { background: var(--bone-300); }
.nh-qty__input {
  /* Reset WC's .input-text defaults — no border (the wrap holds it),
     center-align, tabular numerals so 1/9/10 don't jitter the layout. */
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  outline: none;
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
}
.nh-qty__input::-webkit-outer-spin-button,
.nh-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ============================================================
 * Section head + product-card scroller (`.pdp-head` + `.related2`).
 *
 * Shared by the PDP "Vaata ka" related products band and the cart
 * empty-state recently-viewed band. Background variants
 * (.pdp-section.bone / .dark) and the `.lede-h` block stay in
 * product.css — they're PDP-section-only.
 *
 * Same arrow-step + quick-add handlers live in main.js so behavior
 * is identical across surfaces.
 * ============================================================ */
.pdp-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 36px;
}
.pdp-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra-600);
  margin-bottom: 10px;
  display: block;
}
.pdp-head h2 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 40px;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

/* Horizontal product-card scroller (6 cards visible, arrows step 3). */
.related2 {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.related2::-webkit-scrollbar { display: none; }
.related2-card {
  flex: 0 0 calc((100% - 14px * 5) / 6);
  scroll-snap-align: start;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--bone-300);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.related2-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.related2-card .thumb {
  aspect-ratio: 1;
  background: var(--bone-200);
  position: relative;
  overflow: hidden;
}
.related2-card .thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related2-card .thumb .badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--terra-500);
  color: white;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 3px;
  font-weight: 600;
}
.related2-card .body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.related2-card .sku-s {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-500);
  letter-spacing: 0.04em;
}
.related2-card h5 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 34px;
  text-wrap: pretty;
}
.related2-card .p-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
}
.related2-card .p {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.012em;
}
.related2-card .was {
  font-size: 11px;
  color: var(--ink-400);
  text-decoration: line-through;
  display: block;
}
.related2-card .add-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green-800);
  color: white;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.related2-card .add-btn:hover { background: var(--green-900); }
.related2-card .add-btn:active { transform: scale(0.94); }

/* Tablet/mobile reflow for .pdp-head — drops to single column. */
@media (max-width: 1023px) {
  .pdp-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 28px;
  }
  .pdp-head h2 { font-size: 32px; }
}
