/* =============================================================
   Nordic-LED · product page styling
   Maps the redesign onto real WooCommerce single-product markup.
   Pairs with: content-single-product.php, product-page-functions.php
   (discount-badge.css handles the −% badge + saving pill colours)
   ============================================================= */

:root {
  --nl-green-50:  #ECF7EE;
  --nl-green-100: #D7EFDD;
  --nl-green-600: #0F9047;
  --nl-green-700: #0B7A3B;
  --nl-ink-900: #0C1311;
  --nl-ink-700: #2E3936;
  --nl-ink-500: #5E6964;
  --nl-ink-400: #828D88;
  --nl-ink-300: #B7C0BC;
  --nl-ink-200: #DDE3E0;
  --nl-ink-100: #EEF1EF;
  --nl-ink-50:  #F7F9F8;
  --nl-amber-500: #F59E0B;
  --nl-red-500: #DC2626;
  --nl-red-50:  #FEEAEA;
  --nl-radius: 12px;
  --nl-radius-lg: 18px;
}

/* ---- Layout: 2-column ---- */
.nl-product { font-family: 'Manrope', system-ui, sans-serif; color: var(--nl-ink-900); }
.nl-product__crumbs { padding: 14px 0; font-size: 12.5px; color: var(--nl-ink-500); }
.nl-product__crumbs a { color: inherit; text-decoration: none; }

.nl-product__main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: flex-start;
  margin-bottom: 40px;
}
@media (max-width: 1023px) {
  .nl-product__main { grid-template-columns: 1fr; gap: 20px; }
}

/* Sticky gallery on desktop */
.nl-product__gallery { position: relative; }
@media (min-width: 1024px) {
  .nl-product__gallery { position: sticky; top: 24px; }
  .woocommerce-product-gallery { border-radius: var(--nl-radius-lg); overflow: hidden; }
}

/* ---- Title ---- */
.nl-product__summary .product_title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 10px;
}
@media (max-width: 1023px) {
  .nl-product__summary .product_title { font-size: 26px; }
}

/* ---- Stock badge ---- */
.nl-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--nl-ink-50);
  box-shadow: inset 0 0 0 1px var(--nl-ink-100);
  margin: 4px 0 14px;
}
.nl-stock__dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.nl-stock--ok   .nl-stock__dot { background: var(--nl-green-600); box-shadow: 0 0 0 3px color-mix(in oklab, var(--nl-green-600) 18%, transparent); }
.nl-stock--warn .nl-stock__dot { background: var(--nl-amber-500); box-shadow: 0 0 0 3px color-mix(in oklab, var(--nl-amber-500) 18%, transparent); }
.nl-stock--out  .nl-stock__dot { background: var(--nl-red-500);   box-shadow: 0 0 0 3px color-mix(in oklab, var(--nl-red-500) 18%, transparent); }
.nl-stock__label { font-size: 13px; font-weight: 700; color: var(--nl-ink-900); }
.nl-stock__sub { font-size: 12.5px; color: var(--nl-ink-500); }

/* ---- Price ---- */
.nl-product__summary .price {
  display: block;
  margin: 0 0 4px;
  color: var(--nl-green-700);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.nl-product__summary .price del {
  color: var(--nl-ink-400);
  font-size: 18px;
  font-weight: 600;
  margin-left: 10px;
}
.nl-product__summary .price del span { text-decoration: line-through; }
.nl-product__summary .price ins { text-decoration: none; }

.nl-price-extras__pill { display: inline-block; margin: 6px 0 0; }
.nl-price-exvat {
  margin-top: 6px;
  font-size: 13px;
  color: var(--nl-ink-500);
  font-variant-numeric: tabular-nums;
}

/* ---- Add to cart row ---- */
.nl-product__summary form.cart {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.nl-product__summary form.cart .quantity {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--nl-ink-200);
  flex: 0 0 auto;
}
.nl-product__summary form.cart .quantity input.qty {
  width: 48px;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  -moz-appearance: textfield;
}
.nl-product__summary form.cart .quantity input.qty::-webkit-outer-spin-button,
.nl-product__summary form.cart .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* The main CTA — bright green rectangle */
.nl-product__summary form.cart .single_add_to_cart_button {
  flex: 1;
  min-width: 240px;
  padding: 17px 24px;
  border: 0;
  border-bottom: 3px solid rgba(0,0,0,.18);
  border-radius: 8px;
  background: var(--nl-green-600);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease;
}
.nl-product__summary form.cart .single_add_to_cart_button:hover { background: var(--nl-green-700); }
@media (max-width: 1023px) {
  .nl-product__summary form.cart .single_add_to_cart_button { min-width: 100%; }
}

/* ---- Trust row ---- */
.nl-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 24px;
  padding: 18px 0;
  margin-top: 4px;
  border-top: 1px solid var(--nl-ink-100);
}
@media (max-width: 1023px) { .nl-trust { grid-template-columns: 1fr; } }
.nl-trust__item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--nl-ink-700); }
.nl-trust__check {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
  background: var(--nl-green-50); color: var(--nl-green-700);
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}

/* ---- Payment marks ---- */
.nl-payments { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 2px; }
.nl-pay {
  display: inline-grid; place-items: center;
  height: 28px; padding: 0 10px; border-radius: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  background: var(--nl-ink-100); color: var(--nl-ink-700);
}
.nl-pay--apple-pay { background: #000; color: #fff; }
.nl-pay--visa { background: #1A1F71; color: #fff; }
.nl-pay--mc { background: #EB001B; color: #fff; }
.nl-pay--vipps { background: #FF5B24; color: #fff; }
.nl-pay--klarna { background: #FFB3C7; color: #17120f; }

/* =============================================================
   TABS (Beskrivelse / Spesifikasjoner / Nedlasting / Anmeldelser)
   ============================================================= */
.woocommerce-tabs { margin-top: 28px; }
.woocommerce-tabs ul.tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  border-bottom: 1px solid var(--nl-ink-100);
  list-style: none;
}
.woocommerce-tabs ul.tabs::before { display: none; }
.woocommerce-tabs ul.tabs li {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 12px 4px;
  margin-right: 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--nl-ink-500);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.woocommerce-tabs ul.tabs li.active a {
  color: var(--nl-green-700);
  border-bottom-color: var(--nl-green-600);
}
.woocommerce-tabs .panel { padding: 0; }

/* Spec table (Additional information) */
.woocommerce-product-attributes {
  width: 100%;
  max-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
}
.woocommerce-product-attributes th,
.woocommerce-product-attributes td {
  padding: 11px 14px;
  text-align: left;
  border: 0;
}
.woocommerce-product-attributes tr:nth-child(odd) { background: var(--nl-ink-50); }
.woocommerce-product-attributes th { color: var(--nl-ink-500); font-weight: 500; width: 45%; }
.woocommerce-product-attributes td { color: var(--nl-ink-900); font-weight: 600; }

/* =============================================================
   "OFTE KJØPT SAMMEN" — from frequently-bought-together.php
   ============================================================= */
.nl-fbt { margin-top: 32px; }
.nl-fbt__head { margin-bottom: 16px; }
.nl-fbt__head .nl-eyebrow {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--nl-green-700);
}
.nl-fbt__head h2 { margin: 4px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -0.015em; }
.nl-fbt__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1023px) {
  .nl-fbt__grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .nl-fbt__card { flex: 0 0 62%; scroll-snap-align: start; }
}
.nl-fbt__card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: var(--nl-radius-lg);
  background: #fff; box-shadow: 0 6px 18px -8px rgba(15,40,25,.10), inset 0 0 0 1px var(--nl-ink-100);
}
.nl-fbt__img { display: block; }
.nl-fbt__img img { width: 100%; height: auto; border-radius: var(--nl-radius); }
.nl-fbt__name {
  font-size: 13px; font-weight: 600; color: var(--nl-ink-800, #1A2421);
  line-height: 1.3; min-height: 34px; text-decoration: none;
}
.nl-fbt__price { font-size: 15px; font-weight: 800; margin-top: auto; }
.nl-fbt__price del { color: var(--nl-ink-400); font-size: 12px; font-weight: 600; margin-left: 4px; }
.nl-fbt__add {
  width: 100%; padding: 12px 10px;
  border: 0; border-radius: 8px; cursor: pointer;
  background: var(--nl-green-600); color: #fff;
  font-weight: 800; font-size: 12px; letter-spacing: .03em; text-transform: uppercase;
}
.nl-fbt__add:hover { background: var(--nl-green-700); }

/* =============================================================
   MOBILE STICKY BUY BAR — from product-page-functions.php
   ============================================================= */
.nl-buybar { display: none; }
@media (max-width: 1023px) {
  .nl-buybar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--nl-ink-200);
    box-shadow: 0 -12px 24px -10px rgba(15,40,25,.10);
  }
  .nl-buybar__price { flex: 0 0 auto; line-height: 1.1; }
  .nl-buybar__now { display: block; font-size: 20px; font-weight: 800; color: var(--nl-green-700); }
  .nl-buybar__now del { display: none; }
  .nl-buybar__exvat { font-size: 11px; color: var(--nl-ink-500); }
  .nl-buybar__btn {
    flex: 1;
    padding: 15px 18px;
    border: 0; border-radius: 999px;
    background: var(--nl-green-600); color: #fff;
    font-weight: 800; font-size: 15px; cursor: pointer;
  }
  /* keep page content clear of the fixed bar */
  body.single-product { padding-bottom: 84px; }
}

/* =============================================================
   SHARED STOCK STATUS — .stock-status renderer
   -------------------------------------------------------------
   Used by nl_stock_status_html() in: the summary stock field,
   "Ofte kjøpt sammen" cards (.stock-status--fbt) and bundled
   items / "Komplett pakke" (.stock-status--bundle).
   Your global styles.css already styles .stock-status on the
   live site; these rules only scope/compact it for the new
   layout contexts and are safe to keep alongside the globals.
   ============================================================= */

/* Summary stock field — sits between the title and the price. */
.nl-product__summary .stock-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
  font-size: 14px;
  font-weight: 700;
}
.nl-product__summary .stock-status.in-stock { color: var(--nl-green-700); }
.nl-product__summary .stock-status.delivery-time { color: var(--nl-ink-700); font-weight: 600; }
.stock-status .stock-icon { display: inline-flex; line-height: 0; }
.stock-status .stock-icon svg { width: 18px; height: 18px; }

/* "Ofte kjøpt sammen" cards — compact line under the product name. */
.nl-fbt__card .stock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -2px 0 2px;
  font-size: 12px;
  font-weight: 600;
}
.nl-fbt__card .stock-status.in-stock { color: var(--nl-green-700); }
.nl-fbt__card .stock-status.delivery-time { color: var(--nl-ink-500); }
.nl-fbt__card .stock-status .stock-icon svg { width: 14px; height: 14px; }

/* Bundled items / "Komplett pakke" — small line under each item name. */
.stock-status--bundle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  font-size: 12.5px;
  font-weight: 600;
}
.stock-status--bundle.in-stock { color: var(--nl-green-700); }
.stock-status--bundle.delivery-time { color: var(--nl-ink-500); }
.stock-status--bundle .stock-icon svg { width: 14px; height: 14px; }