/* PaperBox v3 — Product Page Calculator */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --brand: #1DC071;
  --brand-dark: #15a05c;
  --brand-soft: #E8F8F0;
  --ink: #0F1B14;
  --ink-2: #3A4A40;
  --ink-3: #6B7B70;
  --line: #E4E8E5;
  --bg: #FAFAF7;
  --card: #FFFFFF;
  --warn: #C45A1F;
  --shadow-sm: 0 1px 2px rgba(15,27,20,0.04);
  --shadow-md: 0 4px 16px rgba(15,27,20,0.06);
  --shadow-lg: 0 12px 40px rgba(15,27,20,0.08);
  --radius: 10px;
  --radius-sm: 6px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.serif { font-family: 'Fraunces', serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }

/* === Top Bar === */
.topbar {
  background: var(--ink);
  color: #C5D5CC;
  font-size: 12px;
  padding: 8px 0;
  text-align: center;
  letter-spacing: 0.02em;
}
.topbar strong { color: white; font-weight: 600; }

/* === Header === */
.v3-header {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.v3-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.v3-logo {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.v3-logo b { color: var(--brand); font-weight: 700; }
.v3-nav-links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.v3-nav-links a { color: var(--ink-2); transition: color 0.15s; }
.v3-nav-links a:hover, .v3-nav-links a.active { color: var(--brand); }
.v3-nav-cta {
  background: var(--ink);
  color: white !important;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}
.v3-nav-cta:hover { background: var(--brand); }

/* === Breadcrumb === */
.v3-breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--header-h, 80px) + 24px) 32px 0;
  font-size: 13px;
  color: var(--ink-3);
}
.v3-breadcrumb a { color: var(--ink-3); }
.v3-breadcrumb a:hover { color: var(--brand); }
.v3-breadcrumb span.sep { margin: 0 6px; opacity: 0.5; }

/* === Product Hero === */
.product {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 56px;
}

/* === Gallery === */
.gallery { position: sticky; top: calc(var(--header-h, 80px) + 16px); align-self: start; }
.gallery-main {
  background: linear-gradient(135deg, #F4F0EA 0%, #EDE6DA 100%);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .placeholder-svg { width: 60%; max-width: 380px; opacity: 0.5; }
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #F4F0EA 0%, #EDE6DA 100%);
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s;
}
.thumb.active { border-color: var(--brand); }
.thumb:hover { border-color: var(--ink-3); }
.thumb-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
}

/* === Info / Calculator === */
.info { position: sticky; top: calc(var(--header-h, 80px) + 16px); align-self: start; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.product h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 10px;
}
.subtitle {
  color: var(--ink-2);
  font-size: 15px;
  margin-bottom: 20px;
}
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 24px;
  color: var(--ink-2);
}
.spec-grid div { display: flex; align-items: center; gap: 6px; }
.spec-grid svg { flex-shrink: 0; color: var(--brand); }

/* === Calculator === */
.calc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.calc-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}
.calc-header h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.live {
  font-size: 11px;
  color: var(--brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.live::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--brand);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.field { margin-bottom: 18px; }
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.field-label .helper {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-3);
  font-size: 11px;
}

.btn-group { display: grid; gap: 6px; }
.btn-group.cols-2 { grid-template-columns: 1fr 1fr; }
.btn-group.cols-3 { grid-template-columns: repeat(3, 1fr); }
.btn-group.cols-4 { grid-template-columns: repeat(4, 1fr); }
.opt {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  position: relative;
}
.opt:hover { border-color: var(--ink-3); color: var(--ink); }
.opt.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.opt-sub {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 2px;
}
.opt.selected .opt-sub { opacity: 0.85; }
.opt-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--brand);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.swatch { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; }
.swatch-color {
  width: 28px; height: 28px;
  border-radius: 50%;
  margin-bottom: 6px;
  border: 2px solid var(--line);
}
.opt.selected .swatch-color { border-color: white; }
.mat-art { background: linear-gradient(135deg, #F8F4ED, #E8DCC4); }
.mat-kraft { background: linear-gradient(135deg, #C49E73, #8B6843); }
.mat-corr { background: linear-gradient(135deg, #D4B891, #A57F50); }
.mat-white { background: linear-gradient(135deg, #FFFFFF, #E8E8E8); }

/* === Total === */
.total-card {
  background: linear-gradient(135deg, var(--ink) 0%, #1a2920 100%);
  color: white;
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.total-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--brand) 0%, transparent 70%);
  opacity: 0.15;
  pointer-events: none;
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.per-piece-label {
  font-size: 12px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.per-piece {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color 0.3s;
}
.per-piece.flash { color: var(--brand); }
.total-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 14px 0; }
.total-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  opacity: 0.8;
}
.total-line.grand {
  font-size: 16px;
  font-weight: 600;
  opacity: 1;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.total-line.grand b { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; }
.savings-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(29,192,113,0.2);
  color: #6FE5A6;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  margin-top: 10px;
}
.floor-breach {
  background: rgba(196,90,31,0.15);
  border: 1px solid rgba(196,90,31,0.4);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 14px;
  font-size: 13px;
  color: #FFB892;
  text-align: center;
}
.floor-breach b { color: white; display: block; margin-bottom: 6px; font-size: 14px; }

/* === Advanced === */
.advanced {
  border-top: 1px dashed var(--line);
  margin-top: 6px;
  padding-top: 14px;
  margin-bottom: 18px;
}
.advanced summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  user-select: none;
}
.advanced summary::-webkit-details-marker { display: none; }
.adv-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.adv-current {
  flex: 1;
  text-align: right;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.adv-chev {
  color: var(--ink-3);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.advanced[open] .adv-chev { transform: rotate(180deg); }
.advanced[open] summary { margin-bottom: 4px; }

/* === CTAs === */
.ctas { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.v3-btn {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
  width: 100%;
  font-family: inherit;
}
.v3-btn-primary { background: #25D366; color: white; }
.v3-btn-primary:hover { background: #1bb557; }
.v3-btn-secondary {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.v3-btn-secondary:hover { border-color: var(--ink); }
.v3-btn-tertiary {
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  padding: 8px;
}
.v3-btn-tertiary:hover { color: var(--brand); }

.trust {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}
.trust-item { display: flex; align-items: center; gap: 8px; }
.trust-item svg { color: var(--brand); flex-shrink: 0; }

/* === Banner === */
.banner {
  max-width: 1280px;
  margin: 24px auto 0;
  padding: 0 32px;
}
.banner-card {
  background: linear-gradient(100deg, var(--brand-soft) 0%, #F0FBF5 100%);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border: 1px solid rgba(29,192,113,0.15);
}
.banner-text { font-size: 14px; color: var(--ink-2); }
.banner-text b { color: var(--ink); }
.banner-link {
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}
.banner-link:hover { background: var(--brand); }

/* === Variant Chooser === */
.chooser-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.chooser-page > h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 42px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.chooser-page > p {
  color: var(--ink-2);
  font-size: 16px;
  margin-bottom: 40px;
  max-width: 640px;
}
.chooser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
.variant-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.variant-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.variant-image {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #F4F0EA 0%, #EDE6DA 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.variant-image img { width: 100%; height: 100%; object-fit: cover; }
.variant-image svg { width: 80px; height: 80px; color: var(--brand); opacity: 0.3; }
.variant-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.variant-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.variant-card.printed .variant-tag { background: var(--ink); color: white; }
.variant-body h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.variant-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.variant-price .from { font-size: 12px; color: var(--ink-3); }
.variant-price .price {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.variant-price .unit { font-size: 13px; color: var(--ink-3); }
.variant-lead { font-size: 13px; color: var(--ink-2); margin-bottom: 20px; }
.variant-features { list-style: none; padding: 0; margin-bottom: 24px; flex: 1; }
.variant-features li {
  font-size: 14px;
  color: var(--ink-2);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.variant-features li::before {
  content: '';
  width: 16px; height: 16px;
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center;
  flex-shrink: 0;
}
.variant-cta {
  background: var(--ink);
  color: white !important;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.variant-cta:hover { background: var(--brand); }
.chooser-helper {
  text-align: center;
  font-size: 14px;
  color: var(--ink-3);
  padding: 24px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* === Gallery (products list) === */
.v3-gallery-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.v3-gallery-page > h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 42px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.v3-gallery-page > p {
  color: var(--ink-2);
  font-size: 16px;
  margin-bottom: 32px;
}
.cat-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.cat-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  background: var(--card);
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
}
.cat-btn:hover { border-color: var(--ink-3); color: var(--ink); }
.cat-btn.active { background: var(--ink); color: white; border-color: var(--ink); }
.v3-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.v3-product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}
.v3-product-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.v3-product-image {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #F4F0EA 0%, #EDE6DA 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.v3-product-image img { width: 100%; height: 100%; object-fit: cover; }
.v3-product-image svg { width: 60px; height: 60px; color: var(--brand); opacity: 0.3; }
.v3-product-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.v3-product-body h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.variant-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  padding: 6px 0;
  color: var(--ink-2);
}
.variant-row strong { color: var(--ink); font-weight: 600; }
.variant-row .lead-time { font-size: 11px; color: var(--ink-3); }
.v3-product-cta {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--ink);
  color: white !important;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s;
}
.v3-product-cta:hover { background: var(--brand); }

/* === Footer (simple) === */
.v3-footer {
  background: var(--ink);
  color: #C5D5CC;
  padding: 40px 0;
  text-align: center;
  font-size: 13px;
}
.v3-footer a { color: var(--brand); }

/* === Responsive === */
@media (max-width: 980px) {
  .product { grid-template-columns: 1fr; padding: 16px 16px 200px; gap: 24px; }
  .gallery, .info { position: static; }
  .product h1 { font-size: 28px; }
  .calc { padding: 20px; }
  .v3-nav-links { display: none; }
  .v3-breadcrumb { padding: calc(var(--header-h, 80px) + 16px) 16px 0; }
  .banner { padding: 0 16px; }
  .banner-card { flex-direction: column; align-items: flex-start; padding: 16px; }
  .chooser-grid { grid-template-columns: 1fr; }
  .v3-products-grid { grid-template-columns: repeat(2, 1fr); }
  .chooser-page > h1, .v3-gallery-page > h1 { font-size: 30px; }
}
@media (max-width: 600px) {
  .v3-products-grid { grid-template-columns: 1fr; }
}

/* === Quantity Dropdown === */
.qty-select {
  width: 100%;
  padding: 13px 44px 13px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background-color: white;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230F1B14' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.qty-select:hover { border-color: var(--ink-3); }
.qty-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* === v4 Sidebar Layout === */
.v4-breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--header-h, 80px) + 24px) 32px 0;
  font-size: 13px;
  color: var(--ink-3);
}
.v4-breadcrumb a { color: var(--ink-3); }
.v4-breadcrumb a:hover { color: var(--brand); }
.v4-breadcrumb span.sep { margin: 0 6px; opacity: 0.5; }

.v4-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px 0;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

.v4-sidebar {
  position: sticky;
  top: calc(var(--header-h, 80px) + 16px);
  align-self: start;
}
.v4-sidebar-inner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 12px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.v4-sb-all {
  display: block;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: background 0.15s, color 0.15s;
}
.v4-sb-all:hover, .v4-sb-all.active { background: var(--brand-soft); color: var(--brand-dark); }

.v4-sb-group { margin-bottom: 6px; }
.v4-sb-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  background: #EDEFEC;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.v4-sb-cat:hover { background: var(--brand-soft); color: var(--brand-dark); }
.v4-sb-cat.active {
  background: var(--ink);
  color: white;
}
.v4-sb-cat-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  font-size: 18px;
  font-weight: 400;
  margin-left: 8px;
  flex-shrink: 0;
}
.v4-sb-cat-icon::before { content: '+'; }
.v4-sb-group.expanded .v4-sb-cat-icon::before { content: '−'; }

.v4-sb-items {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
}
.v4-sb-group.expanded .v4-sb-items {
  max-height: 1500px;
  padding: 6px 0 8px;
}
.v4-sb-item {
  display: block;
  padding: 7px 14px 7px 18px;
  font-size: 13px;
  color: var(--ink-2);
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  border-left: 2px solid transparent;
}
.v4-sb-item:hover { background: var(--bg); color: var(--ink); }
.v4-sb-item.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
  border-left-color: var(--brand);
}

/* Variant page: top-left tag + product title above gallery */
.product-tag-top {
  margin-bottom: 10px;
}
.product-title-top {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.15;
}

/* Override max-widths inside v4-layout so inner sections fill the main column */
.v4-layout .product,
.v4-layout .chooser-page,
.v4-layout .v3-gallery-page,
.v4-layout .v4-gallery-main {
  max-width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}
/* Variant page calculator stays right-aligned within main column */
.v4-layout .product { grid-template-columns: 1fr 420px; gap: 40px; }
.v4-main { min-width: 0; }

/* Mobile: stack sidebar above main */
@media (max-width: 900px) {
  .v4-layout {
    grid-template-columns: 1fr;
    padding: 12px 16px 0;
  }
  .v4-sidebar { position: static; }
  .v4-sidebar-inner { max-height: none; }
  .v4-layout .product { grid-template-columns: 1fr; gap: 24px; }
  .v4-breadcrumb { padding: calc(var(--header-h, 80px) + 16px) 16px 0; }
}

/* =============================================
   ENQUIRY MODE (pre-launch pivot)
   Used when products.pricing_mode = 'enquiry'
   ============================================= */

/* Chooser card price block — replaces "From RM X.XX /pc" */
.variant-price-enquiry {
  display: flex;
  align-items: center;
  margin: 12px 0;
  min-height: 38px;
}
.variant-price-enquiry .price-enquiry {
  font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  color: var(--ink, #111);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* When a chooser card is in enquiry mode, it's a <div> not <a> — remove link hover state */
.variant-card-enq { cursor: default; }
.variant-card-enq:hover { transform: none; }

/* Chooser card action buttons (WhatsApp + Email stacked at bottom of card) */
.variant-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.variant-actions .enquire-btn {
  padding: 12px 16px;
  font-size: 0.875rem;
}
.variant-actions .enquire-btn.enquire-wa { margin-bottom: 0; }

/* Enquire Now card — replaces the entire calculator on variant detail */
.enquire-card {
  background: #fff;
  border: 1px solid var(--border, #e6e6e6);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.enquire-card .enquire-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500, #6b6b6b);
  background: var(--off-white, #f7f5f1);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.enquire-card .enquire-title {
  font-size: 1.875rem;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--ink, #111);
  letter-spacing: -0.02em;
}
.enquire-card .enquire-sub {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--gray-500, #6b6b6b);
  margin: 0 0 22px;
}
.enquire-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
  letter-spacing: 0.01em;
  font-family: inherit;
}
.enquire-btn.enquire-wa {
  background: #1DC071;
  color: #fff;
  margin-bottom: 10px;
}
.enquire-btn.enquire-wa:hover {
  background: #19a862;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29,192,113,0.25);
}
.enquire-btn.enquire-email {
  background: var(--ink, #111);
  color: #fff;
  border: 1.5px solid var(--ink, #111);
}
.enquire-btn.enquire-email:hover {
  background: #000;
  border-color: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.enquire-trust {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border, #e6e6e6);
  font-size: 0.8125rem;
  color: var(--gray-500, #6b6b6b);
}
.enquire-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.enquire-trust svg { color: #1DC071; flex-shrink: 0; }
.enquire-leadtime {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--gray-500, #6b6b6b);
}

/* Email Quote Request modal */
.enq-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 200ms ease;
}
.enq-modal.open { opacity: 1; }
.enq-modal[hidden] { display: none; }
.enq-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,20,20,0.55);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.enq-modal-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  transform: translateY(10px);
  transition: transform 200ms ease;
}
.enq-modal.open .enq-modal-box { transform: translateY(0); }
.enq-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--gray-500, #6b6b6b);
  border-radius: 6px;
}
.enq-modal-close:hover { background: var(--off-white, #f7f5f1); color: var(--ink, #111); }
.enq-modal-box h3 {
  font-size: 1.625rem;
  margin: 0 0 6px;
  color: var(--ink, #111);
  letter-spacing: -0.02em;
}
.enq-modal-sub {
  font-size: 0.875rem;
  color: var(--gray-500, #6b6b6b);
  margin: 0 0 22px;
}
.enq-form { display: flex; flex-direction: column; gap: 14px; }
.enq-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.enq-field { display: flex; flex-direction: column; }
.enq-field label {
  font-size: 0.75rem;
  color: var(--gray-500, #6b6b6b);
  margin-bottom: 5px;
  font-weight: 500;
}
.enq-field label .req { color: #d34343; }
.enq-field input,
.enq-field textarea {
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 10px 12px;
  border: 1px solid var(--border, #d8d6d2);
  border-radius: 6px;
  background: #fff;
  color: var(--ink, #111);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.enq-field input:focus,
.enq-field textarea:focus {
  outline: none;
  border-color: #1DC071;
  box-shadow: 0 0 0 3px rgba(29,192,113,0.15);
}
.enq-field input[readonly] {
  background: var(--off-white, #f7f5f1);
  color: var(--gray-500, #6b6b6b);
  cursor: default;
}
.enq-field textarea { resize: vertical; min-height: 80px; }
.enq-msg {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
}
.enq-msg-success { background: #e7f7ee; color: #0f7a3d; border: 1px solid #b9e6c9; }
.enq-msg-error { background: #fdeaea; color: #a02525; border: 1px solid #f3c2c2; }

@media (max-width: 600px) {
  .enq-row { grid-template-columns: 1fr; }
  .enq-modal-box { padding: 24px 20px; }
  .enquire-card { padding: 24px 20px; }
  .enquire-card .enquire-title { font-size: 1.5rem; }
}
