/* Configurator page */

.page-configurator .site-header .nav-list a[aria-current="page"] {
  color: var(--brand);
}

.config-main {
  padding-top: var(--header-anchor);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.config-hero {
  position: relative;
  padding: 3rem 1.5rem 3.5rem;
  overflow: hidden;
}

.config-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 80% 0%, rgba(64, 191, 240, 0.2), transparent 55%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 100%);
}

.config-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.config-hero-badge {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
}

.config-hero-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  color: var(--white);
}

.config-hero-lede {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 40rem;
}

.config-hero-lede strong {
  color: var(--paper);
  font-weight: 600;
}

.config-meta {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(139, 149, 165, 0.85);
}

.config-code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  color: var(--brand);
}

/* Spotlight */
.config-spotlight {
  background: var(--slate);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2.5rem 1.5rem;
}

.spotlight-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.spotlight-copy {
  flex: 1 1 320px;
  max-width: 640px;
}

.spotlight-eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}

.spotlight-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  color: var(--white);
  line-height: 1.15;
}

.spotlight-desc {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.spotlight-desc strong {
  color: var(--paper);
}

.spotlight-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Layout */
.config-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 1.5rem 2rem;
  padding: 2.5rem 1.5rem 4rem;
  align-items: start;
  max-width: 1200px;
}

@media (max-width: 900px) {
  .config-layout {
    grid-template-columns: 1fr;
  }
}

.config-sidebar {
  position: sticky;
  top: calc(var(--header-anchor) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .config-sidebar {
    position: static;
  }
}

.config-categories {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.config-cat-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--slate);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.config-cat-btn:hover {
  border-color: rgba(64, 191, 240, 0.35);
}

.config-cat-btn[aria-selected="true"] {
  background: rgba(64, 191, 240, 0.12);
  border-color: var(--brand);
  color: var(--white);
}

.config-cat-btn-featured {
  border-color: rgba(64, 191, 240, 0.25);
}

.config-cat-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.config-sidebar-label {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.config-product-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: min(55vh, 420px);
  overflow-y: auto;
}

.config-product-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.config-product-btn:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.config-product-btn[aria-selected="true"] {
  border-color: var(--brand);
  background: rgba(64, 191, 240, 0.08);
}

.config-product-btn-name {
  display: block;
  font-weight: 600;
  color: var(--white);
}

.config-product-btn-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Workspace */
.config-workspace {
  min-height: 320px;
}

.config-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--ink-soft);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.config-empty-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
}

.config-empty-text {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.config-panel {
  background: var(--ink-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.config-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.config-panel-category {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.config-panel-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: -0.02em;
}

.config-panel-sku {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.config-panel-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 42rem;
}

.config-panel-stock {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.stock-ok {
  background: rgba(64, 191, 240, 0.12);
  color: var(--brand);
  border: 1px solid rgba(64, 191, 240, 0.3);
}

.stock-low {
  background: rgba(255, 180, 72, 0.12);
  color: #e8b060;
  border: 1px solid rgba(255, 180, 72, 0.35);
}

.stock-out {
  background: rgba(255, 100, 100, 0.1);
  color: #f09090;
  border: 1px solid rgba(255, 100, 100, 0.25);
}

.stock-pending {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.config-panel-body {
  padding: 1.25rem 1.5rem;
}

.config-fieldset-legend {
  padding: 0;
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--white);
}

.config-option-group {
  margin: 0 0 1.25rem;
  padding: 0;
  border: none;
}

.config-option-group:last-of-type {
  margin-bottom: 0;
}

.config-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.config-chip {
  position: relative;
}

.config-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.config-chip span {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--slate);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.config-chip input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.config-chip input:checked + span {
  border-color: var(--brand);
  background: rgba(64, 191, 240, 0.15);
  color: var(--white);
}

.config-select {
  width: 100%;
  max-width: 420px;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--white);
  background: var(--slate);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.config-addons {
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.config-addons-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.config-addon {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--paper);
}

.config-addon input {
  margin-top: 0.35rem;
  accent-color: var(--brand);
}

.config-addon-text {
  flex: 1;
}

.config-addon-price {
  color: var(--brand);
  font-weight: 600;
  white-space: nowrap;
}

.config-qty-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.config-qty-label {
  font-weight: 600;
  color: var(--white);
}

.config-qty-input {
  width: 5rem;
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--white);
  background: var(--slate);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.config-panel-footer {
  padding: 1.25rem 1.5rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.config-totals {
  margin-bottom: 1.25rem;
}

.config-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.config-price-row strong {
  font-size: 1.125rem;
  color: var(--white);
  font-weight: 700;
}

.config-price-total strong {
  font-size: 1.5rem;
  color: var(--brand);
}

.config-disclaimer {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: rgba(139, 149, 165, 0.9);
  line-height: 1.4;
}

.config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.config-add-cart-feedback {
  margin: 0.5rem 0 0;
  min-height: 1.25rem;
  font-size: 0.8125rem;
  color: var(--brand);
}

.config-copy-feedback {
  margin: 0.75rem 0 0;
  min-height: 1.25rem;
  font-size: 0.8125rem;
  color: var(--brand);
}

.cart-nav-count {
  font-weight: 700;
  color: var(--brand);
}

/* Cart page */
.page-cart .cart-main {
  padding-top: var(--header-anchor);
}

.cart-page-head {
  padding: 2.5rem 1.5rem 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.cart-page-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--white);
}

.cart-page-lede {
  margin: 0;
  color: var(--muted);
}

.cart-panel {
  max-width: 900px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.cart-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--ink-soft);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--muted);
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
  background: var(--ink-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

@media (max-width: 640px) {
  .cart-line {
    grid-template-columns: 1fr;
  }
}

.cart-line-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
}

.cart-line-meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.cart-line-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-line-qty input {
  width: 4rem;
  padding: 0.4rem 0.5rem;
  font-size: 1rem;
  color: var(--white);
  background: var(--slate);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.cart-line-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.cart-line-total {
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.cart-summary {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--slate);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.cart-summary-row strong {
  color: var(--brand);
  font-size: 1.25rem;
}

.cart-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

button.btn {
  border: 2px solid transparent;
  cursor: pointer;
}

/* Inventory table */
.config-inventory-section {
  background: var(--ink-soft);
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.config-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.config-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.config-table th,
.config-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.config-table th {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
}

.config-table tbody tr:hover td {
  background: rgba(64, 191, 240, 0.04);
}

.config-th-num {
  text-align: right;
}

.config-table .config-td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace;
  color: var(--brand);
  font-weight: 600;
}

.config-table .config-td-qty {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.config-td-low {
  color: #e8b060;
}

.config-td-out {
  color: #f09090;
}
