/* ===========================================================
   NNWI v5 — Grouped Shop (Plugin)
   All selectors scoped under .nnwi-v5-shop so styles cannot bleed
   into the parent theme, header, footer, or other plugins.
   =========================================================== */

/* Optional brand fonts — only loaded once per page (browser caches).
   If you'd rather not pull from Google, delete this line and the
   plugin falls back to the parent theme's fonts. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

/* ── Scoped design tokens ─────────────────────────────────── */
.nnwi-v5-shop {
  --nnwi-navy: #0d1b2a;
  --nnwi-navy-mid: #162436;
  --nnwi-gold: #c9933a;
  --nnwi-gold-light: #e8b96a;
  --nnwi-gold-dark: #a87825;
  --nnwi-cream: #f5f4f0;
  --nnwi-cream-dark: #edecea;
  --nnwi-white: #ffffff;
  --nnwi-slate: #5a6677;
  --nnwi-slate-dark: #3d4756;
  --nnwi-border: #d4cfc8;
  --nnwi-border-dark: #b8b2aa;

  --nnwi-font-h: 'Playfair Display', Georgia, serif;
  --nnwi-font-b: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --nnwi-shadow-sm: 0 2px 8px rgba(13, 27, 42, 0.06);
  --nnwi-shadow-md: 0 4px 16px rgba(13, 27, 42, 0.10);
  --nnwi-shadow-lg: 0 12px 32px rgba(13, 27, 42, 0.14);

  /* Container */
  display: block;
  background: var(--nnwi-cream);
  color: var(--nnwi-navy);
  font-family: var(--nnwi-font-b);
  line-height: 1.55;
  font-size: 16px;
  padding: 64px 24px;
  -webkit-font-smoothing: antialiased;
}

.nnwi-v5-shop * { box-sizing: border-box; }

.nnwi-v5-shop img {
  max-width: 100%;
  height: auto;
  display: block;
}

.nnwi-v5-shop a {
  color: var(--nnwi-navy);
  text-decoration: none;
}
.nnwi-v5-shop a:hover { color: var(--nnwi-gold-dark); }

/* ── Section header ───────────────────────────────────────── */
.nnwi-v5-shop__header {
  max-width: 880px;
  margin: 0 auto 40px;
  text-align: center;
}
.nnwi-v5-shop__header h2 {
  font-family: var(--nnwi-font-h);
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--nnwi-navy);
  line-height: 1.2;
}
.nnwi-v5-shop .nnwi-v5-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--nnwi-gold-dark);
  font-weight: 600;
  margin: 0 0 8px;
}
.nnwi-v5-shop .nnwi-v5-authority-note {
  font-size: 14px;
  color: var(--nnwi-slate);
  margin: 0;
}
.nnwi-v5-shop .nnwi-v5-error {
  padding: 16px;
  border: 1px solid #c00;
  color: #c00;
  border-radius: 6px;
  background: #fff5f5;
}

/* ── Card grid ────────────────────────────────────────────── */
.nnwi-v5-shop__grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .nnwi-v5-shop__grid { grid-template-columns: 1fr; }
}

/* ── Card shell ───────────────────────────────────────────── */
.nnwi-v5-shop .product-card {
  background: var(--nnwi-white);
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(13, 27, 42, 0.06);
  transition: box-shadow 0.18s, transform 0.18s;
}
.nnwi-v5-shop .product-card:hover {
  box-shadow: 0 12px 28px rgba(13, 27, 42, 0.12);
  transform: translateY(-2px);
}
.nnwi-v5-shop .product-card-header {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  padding: 24px 24px 0;
}
.nnwi-v5-shop .product-card-image {
  aspect-ratio: 1/1;
  background: var(--nnwi-cream-dark);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
}
.nnwi-v5-shop .product-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.nnwi-v5-shop .product-card-image-fallback {
  background: linear-gradient(135deg, var(--nnwi-cream-dark) 0%, var(--nnwi-cream) 100%);
}
.nnwi-v5-shop .product-card-meta {
  display: flex;
  flex-direction: column;
}
.nnwi-v5-shop .card-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--nnwi-gold-dark);
  font-weight: 600;
  margin: 0 0 6px;
}
.nnwi-v5-shop .card-title {
  font-family: var(--nnwi-font-h);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--nnwi-navy);
}
.nnwi-v5-shop .card-subtitle {
  font-size: 13px;
  color: var(--nnwi-slate);
  margin: 0 0 12px;
}
.nnwi-v5-shop .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.nnwi-v5-shop .chip {
  display: inline-block;
  background: var(--nnwi-cream-dark);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--nnwi-navy);
  font-weight: 500;
}
.nnwi-v5-shop .chip-soft {
  background: transparent;
  border: 1px solid var(--nnwi-border);
}

/* ── Card body ────────────────────────────────────────────── */
.nnwi-v5-shop .product-card-body {
  padding: 20px 24px 24px;
}

/* Product description block — pulled from WooCommerce short_description */
.nnwi-v5-shop .product-card-description {
  font-size: 14px;
  color: var(--nnwi-slate-dark);
  line-height: 1.5;
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--nnwi-cream-dark);
}
.nnwi-v5-shop .product-card-description[hidden] { display: none; }
.nnwi-v5-shop .product-card-description p {
  margin: 0 0 8px;
}
.nnwi-v5-shop .product-card-description p:last-child { margin-bottom: 0; }
.nnwi-v5-shop .product-card-description ul,
.nnwi-v5-shop .product-card-description ol {
  margin: 6px 0 8px 18px;
  padding: 0;
  font-size: 13px;
}
.nnwi-v5-shop .product-card-description li { margin-bottom: 4px; }
.nnwi-v5-shop .product-card-description strong { color: var(--nnwi-navy); }

.nnwi-v5-shop .option-row { margin-bottom: 14px; }
.nnwi-v5-shop .option-row label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nnwi-slate);
  font-weight: 600;
  margin-bottom: 6px;
}
.nnwi-v5-shop .option-row select,
.nnwi-v5-shop .option-row input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--nnwi-border);
  border-radius: 6px;
  background: var(--nnwi-white);
  color: var(--nnwi-navy);
}
.nnwi-v5-shop .option-row select:focus,
.nnwi-v5-shop .option-row input[type="number"]:focus {
  outline: 2px solid var(--nnwi-gold);
  outline-offset: -1px;
  border-color: var(--nnwi-gold);
}

/* ── Price line ───────────────────────────────────────────── */
.nnwi-v5-shop .card-price-line {
  margin: 14px 0 4px;
  font-family: var(--nnwi-font-h);
  line-height: 1;
}
.nnwi-v5-shop .card-price-amount {
  font-size: 30px;
  font-weight: 700;
  color: var(--nnwi-gold-dark);
  letter-spacing: -0.01em;
}
.nnwi-v5-shop .card-price-each {
  margin-left: 6px;
  font-family: var(--nnwi-font-b);
  font-size: 13px;
  color: var(--nnwi-slate);
  font-weight: 500;
}

/* ── SKU + dimensions micro-line ──────────────────────────── */
.nnwi-v5-shop .card-sku-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--nnwi-slate);
}
.nnwi-v5-shop .card-sku-tag {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--nnwi-slate-dark);
}
.nnwi-v5-shop .card-dim { color: var(--nnwi-slate); }

/* ── Qty + Add to Cart row ────────────────────────────────── */
.nnwi-v5-shop .qty-action-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.nnwi-v5-shop .qty-input-wrap label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nnwi-slate);
  font-weight: 600;
  margin-bottom: 6px;
}
.nnwi-v5-shop .qty-input-wrap input {
  width: 100%;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--nnwi-border);
  border-radius: 6px;
  background: var(--nnwi-white);
  color: var(--nnwi-navy);
}
.nnwi-v5-shop .qty-input-wrap input:focus {
  outline: 2px solid var(--nnwi-gold);
  outline-offset: -1px;
  border-color: var(--nnwi-gold);
}
.nnwi-v5-shop .add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  background: var(--nnwi-gold);
  color: var(--nnwi-navy);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.nnwi-v5-shop .add-to-cart-btn:hover {
  background: var(--nnwi-gold-dark);
  color: var(--nnwi-white);
  transform: translateY(-1px);
  box-shadow: var(--nnwi-shadow-md);
}

/* ── Tier toggle (text trigger, not button) ───────────────── */
.nnwi-v5-shop .tier-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  padding: 6px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--nnwi-gold-dark);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.nnwi-v5-shop .tier-trigger:hover {
  color: var(--nnwi-navy);
  border-bottom-color: var(--nnwi-gold);
}
.nnwi-v5-shop .tier-trigger-caret {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 12px;
}
.nnwi-v5-shop .tier-trigger.is-open .tier-trigger-caret {
  transform: rotate(180deg);
}
.nnwi-v5-shop .tier-trigger:focus-visible {
  outline: 2px solid var(--nnwi-gold);
  outline-offset: 3px;
}

/* ── Tier table ───────────────────────────────────────────── */
.nnwi-v5-shop .tier-block {
  margin: 10px 0 6px;
}
.nnwi-v5-shop .tier-block[hidden] { display: none; }

.nnwi-v5-shop .tier-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.nnwi-v5-shop .tier-table th {
  background: transparent;
  color: var(--nnwi-slate);
  border-bottom: 1px solid var(--nnwi-border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 8px;
  text-align: left;
}
.nnwi-v5-shop .tier-table td {
  border-bottom: 1px solid var(--nnwi-cream-dark);
  padding: 7px 8px;
  font-size: 13px;
}
.nnwi-v5-shop .tier-table td.col-qty {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.nnwi-v5-shop .tier-table td.col-price {
  text-align: right;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-weight: 600;
}
.nnwi-v5-shop .tier-table tr:nth-child(even) td {
  background: rgba(245, 244, 240, 0.55);
}
.nnwi-v5-shop .tier-table tr.active td {
  background: rgba(201, 147, 58, 0.14);
  color: var(--nnwi-navy);
  font-weight: 700;
}
.nnwi-v5-shop .tier-table tr.active td.col-price {
  color: var(--nnwi-gold-dark);
}
.nnwi-v5-shop .tier-table tr:last-child td { border-bottom: 0; }

.nnwi-v5-shop .tier-foot {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--nnwi-slate);
  font-style: italic;
  letter-spacing: 0.01em;
}

/* ── Secondary action: View product ───────────────────────── */
.nnwi-v5-shop .card-secondary-action {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--nnwi-cream-dark);
  text-align: right;
}
.nnwi-v5-shop .view-product-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--nnwi-slate);
  letter-spacing