/* ============================================================
   shop.css — Winkel-, cart-, checkout- en accountpagina's
   Vereist: base.css (tokens, reset, buttons, forms, notices)
   ============================================================ */

/* ---- Pagina layout -------------------------------------------------------- */

.site-main { padding: 32px 0 64px; }
.table-scroll { width: 100%; overflow-x: auto; }

.status-help-toggle {
  margin: 0 0 18px;
  border: 1px solid var(--shop-border, #d9dee8);
  border-radius: 12px;
  background: var(--shop-surface, #fff);
}
.status-help-toggle--spaced {
  margin-bottom: 20px;
}

.status-help-toggle summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.status-help-toggle summary::-webkit-details-marker {
  display: none;
}

.status-help-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
  font-weight: 700;
  line-height: 1;
}

.status-help-toggle[open] summary {
  border-bottom: 1px solid var(--shop-border, #d9dee8);
}

.status-help-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.status-help-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--shop-border, #d9dee8);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.02);
}

.status-help-item span {
  color: var(--shop-muted, #5b6678);
}
.shop-notice-banner {
  margin-bottom: 24px;
  padding: 14px 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-700);
}

/* ---- Shop layout ---------------------------------------------------------- */

.shop-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 768px) {
  .shop-layout { grid-template-columns: 1fr; }
}

.shop-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  position: sticky;
  top: 24px;
}
.shop-sidebar h3 {
  margin: 0 0 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-500);
}

.category-list { list-style: none; margin: 0; padding: 0; }
.category-list li { border-bottom: 1px solid var(--line); }
.category-list li:last-child { border: none; }
.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  padding-left: 8px;
  color: var(--ink-700);
  font-size: 14px;
  border-left: 2px solid transparent;
  margin-left: -8px;
  transition: color .15s, border-color .15s;
}
.category-list li.active > a {
  color: var(--brand-accent);
  font-weight: 600;
  border-left-color: var(--brand-accent);
}
.category-list a:hover { color: var(--brand-accent); }
.category-list .count { color: var(--ink-500); font-size: 12px; font-weight: 400; }

/* Ingesprongen subcategorieën */
.category-list .cat-child a {
  padding-left: 22px;
  font-size: 13px;
  color: var(--ink-500);
}
.category-list .cat-child.active a {
  color: var(--brand-accent);
  font-weight: 600;
  border-left-color: var(--brand-accent);
}
.category-list .cat-child a:hover { color: var(--brand-accent); }

/* Winkelwerkbalk */
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.shop-info h1 { margin: 0; font-size: 22px; font-weight: 700; }
.result-count { display: block; font-size: 13px; color: var(--ink-500); margin-top: 2px; }
.shop-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sort-label { font-size: 13px; color: var(--ink-500); white-space: nowrap; }

/* ---- Productengrid -------------------------------------------------------- */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: var(--line-strong);
}

.product-image-link {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-soft);
}
.product-image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.product-card:hover .product-image-link img { transform: scale(1.04); }

.no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-500);
  font-size: 13px;
}

.sale-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--clr-error);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.product-info { padding: 16px; display: flex; flex-direction: column; }
.product-title { margin: 0 0 6px; font-size: 14px; line-height: 1.4; flex-grow: 1; }
.product-title a { color: var(--ink-900); }
.product-title a:hover { color: var(--brand-accent); }

.product-rating { display: flex; gap: 2px; align-items: center; margin-bottom: 6px; }
.star { color: var(--line-strong); font-size: 14px; }
.star.filled { color: var(--brand-accent); }
.rating-count { font-size: 12px; color: var(--ink-500); margin-left: 4px; }

.product-price { font-size: 16px; font-weight: 700; color: var(--brand-accent); margin-bottom: 12px; }
.product-price del { color: var(--ink-500); font-weight: 400; font-size: 13px; margin-right: 4px; }
.product-price ins { text-decoration: none; color: var(--clr-error); }
.price-tax-note { font-size: 13px; font-weight: 400; color: var(--ink-500); margin-left: 4px; position: relative; display: inline-flex; align-items: center; gap: 4px; }
.btw-info-btn { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--ink-400); background: none; color: var(--ink-500); font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; vertical-align: middle; }
.btw-info-btn:hover { border-color: var(--ink-700); color: var(--ink-700); }
.btw-tooltip { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 200; background: var(--ink-900, #1a1a1a); color: #fff; font-size: 13px; font-weight: 400; line-height: 1.5; padding: 10px 14px; border-radius: 6px; width: 280px; box-shadow: 0 4px 12px rgba(0,0,0,.18); pointer-events: none; }
.btw-tooltip::after { content: ''; position: absolute; top: 100%; left: 16px; border: 6px solid transparent; border-top-color: var(--ink-900, #1a1a1a); }

.product-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.product-actions .btn { width: 100%; justify-content: center; text-align: center; }
.product-actions .add-to-cart-form { width: 100%; }
.product-actions .add-to-cart-form .btn { width: 100%; }
.out-of-stock { color: var(--ink-500); font-size: 13px; font-style: italic; }

/* ---- Enkelvoudig product -------------------------------------------------- */

.product-single {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  .product-single { grid-template-columns: 1fr; }
}

/* ---- Product gallery ----------------------------------------------------- */

.product-gallery { display: flex; flex-direction: column; gap: 12px; }

.product-gallery__main {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  line-height: 0;
}
.gallery-main-img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
  transition: transform 0.35s ease;
}
.product-gallery__main:hover .gallery-main-img {
  transform: scale(1.05);
}

.product-gallery__thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 72px;
  height: 72px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: none;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.gallery-thumb.is-active,
.gallery-thumb:hover { border-color: var(--clr-primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.88);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 0.15s;
}
.gallery-arrow:hover { background: #fff; }
.gallery-arrow--prev { left: 10px; }
.gallery-arrow--next { right: 10px; }

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-lightbox[hidden] { display: none !important; }
.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  cursor: pointer;
}
.gallery-lightbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1;
  max-width: 92vw;
  max-height: 92vh;
}
.gallery-lightbox__img {
  max-width: 80vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  display: block;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.gallery-lightbox__close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.gallery-lightbox__close:hover { background: rgba(255,255,255,0.35); }
.gallery-lightbox__arrow {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  font-size: 38px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
  line-height: 1;
}
.gallery-lightbox__arrow:hover { background: rgba(255,255,255,0.35); }

.no-image-large {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-500);
}
.product-details .product-title { font-size: 28px; margin: 0 0 16px; }
.product-details .product-price { font-size: 24px; margin-bottom: 16px; }
.sale-price { color: var(--clr-error) !important; }
.product-short-description { color: var(--ink-700); margin-bottom: 16px; }
.variation-description {
  margin-bottom: 16px;
  color: var(--ink-700);
}
.product-sku { font-size: 13px; color: var(--ink-500); }
.product-stock { margin-bottom: 16px; }
.in-stock  { color: var(--clr-success); font-weight: 600; }
.stock-qty { font-size: 13px; color: var(--ink-500); }
.stock-prompt { color: var(--ink-500); font-size: 14px; }
.product-variations {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}
.variation-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}
.variation-note {
  margin: -4px 0 14px;
  color: var(--ink-500);
  font-size: 13px;
}
.quantity-wrapper { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.qty-input { width: 70px; }
.qty-input.small { width: 60px; }
.backorder-note { margin-top: 10px; color: var(--ink-500); font-size: 13px; }
.product-categories, .product-tags { font-size: 13px; color: var(--ink-500); margin-top: 12px; }
.product-description-tabs { margin-top: 48px; }
.product-description {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: var(--radius-md);
}

/* ---- Winkelwagen ---------------------------------------------------------- */

.cart-empty { text-align: center; padding: 60px 0; }

/* Twee-kolom layout op desktop: tabel links, totalen rechts */
.cart-layout {
  display: grid;
  gap: 32px;
  align-items: start;
}
@media (min-width: 900px) {
  .cart-layout { grid-template-columns: 1fr 320px; }
}

.cart-form { display: grid; gap: 0; }

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}
.cart-table th, .cart-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.cart-table thead { background: var(--surface-soft); font-weight: 700; font-size: 13px; }
.product-thumbnail img { border-radius: var(--radius-sm); display: block; }
.no-thumb {
  width: 60px;
  height: 60px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* Loading state bij auto-update */
.cart-item { transition: opacity 0.15s ease; }
.cart-item.is-updating { opacity: 0.45; pointer-events: none; }
.cart-item.is-updating .qty-stepper { cursor: wait; }

.remove-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--ink-400); padding: 4px 6px; line-height: 1; border-radius: var(--radius-sm); transition: color 0.15s, background 0.15s; }
.remove-btn:hover { color: var(--clr-error); background: color-mix(in srgb, var(--clr-error) 8%, transparent); }

.cart-variation-summary { margin-top: 4px; color: var(--ink-500); font-size: 12px; }
.cart-backorder-note { margin-top: 4px; font-size: 12px; color: var(--ink-500); }

/* Aantal-stepper: [−] [input] [+] */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.qty-step-btn {
  background: none;
  border: none;
  width: 32px;
  height: 36px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  padding: 0;
}
.qty-step-btn:hover { background: var(--surface-soft); color: var(--clr-primary); }
.qty-step-btn:active { background: var(--line); }
.qty-stepper .qty-input {
  width: 48px;
  height: 36px;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 0 4px;
  -moz-appearance: textfield;
  background: var(--surface);
}
.qty-stepper .qty-input::-webkit-inner-spin-button,
.qty-stepper .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper .qty-input:focus { outline: none; background: var(--surface-soft); }

.cart-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.cart-totals {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  position: sticky;
  top: 24px;
}
.totals-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.totals-table th, .totals-table td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.totals-table th { text-align: left; font-weight: 600; }
.totals-table td { text-align: right; }
.order-total th, .order-total td { font-size: 18px; padding-top: 14px; border-bottom: none; }
.free-shipping { color: var(--clr-success); font-weight: 600; }

/* ---- Winkelwagen mobiel -------------------------------------------------- */
@media (max-width: 640px) {

  /* Tabel-header verbergen; tbody/table als block zodat tr een grid kan zijn */
  .cart-table thead { display: none; }
  .cart-table,
  .cart-table tbody { display: block; }

  /* Elke productrij wordt een 3-koloms kaart:
     [afbeelding] | [naam / prijs / stepper] | [× / regeltotaal] */
  .cart-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    column-gap: 12px;
    row-gap: 4px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
  }
  .cart-item:last-child { border-bottom: none; }
  .cart-item td { display: block; border: none; padding: 0; }

  /* Gridposities per cel */
  .product-thumbnail { grid-column: 1; grid-row: 1 / 4; align-self: center; }
  .product-name      { grid-column: 2; grid-row: 1; font-size: 14px; line-height: 1.3; align-self: end; }
  .product-remove    { grid-column: 3; grid-row: 1; align-self: start; }
  .product-price     { grid-column: 2; grid-row: 2; font-size: 13px; color: var(--ink-500); align-self: center; }
  .product-subtotal  { grid-column: 3; grid-row: 2; font-weight: 700; font-size: 15px; text-align: right; align-self: center; white-space: nowrap; }
  .product-qty       { grid-column: 2 / 4; grid-row: 3; padding-top: 6px; }

  /* Grotere touch targets voor stepper (minimaal 44px) */
  .qty-step-btn { width: 40px; height: 44px; font-size: 20px; }
  .qty-stepper .qty-input { width: 52px; height: 44px; font-size: 15px; }

  /* Totalen niet sticky op kleine schermen */
  .cart-totals { position: static; }

  /* Checkout-knop wat groter */
  .cart-totals .btn-primary { font-size: 16px; padding: 15px; }
}

/* ---- Afrekenen ------------------------------------------------------------ */

.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .order-review { order: -1; }
  .order-review-inner { position: static; top: auto; }
  .checkout-submit-desktop { display: none; }
  .checkout-submit-mobile { display: block; }
}
.checkout-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}
.checkout-section h2 { margin: 0 0 20px; font-size: 18px; }
.checkout-submit-desktop { margin-top: 20px; }
.checkout-submit-mobile { display: none; }
.checkout-address-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 600;
}
.checkout-address-toggle input { margin-top: 3px; }
.checkout-hint {
  margin: 0 0 18px;
  color: var(--ink-500);
  font-size: 13px;
}
.order-review-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.review-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.review-table th, .review-table td { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.review-table td { text-align: right; }
.total-row th, .total-row td { font-size: 16px; font-weight: 700; }
.payment-methods { display: flex; flex-direction: column; gap: 12px; }
.payment-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.payment-option:has(input:checked) { border-color: var(--brand-accent); }
.payment-option input { margin-right: 8px; }
.payment-option small { color: var(--ink-500); font-size: 12px; }
.checkout-privacy { font-size: 12px; color: var(--ink-500); margin-top: 12px; }

/* ---- Authenticatie -------------------------------------------------------- */

.auth-layout { display: flex; justify-content: center; padding: 48px 20px; }
.auth-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-soft);
}
.auth-box h1 { margin: 0 0 8px; font-size: 22px; }
.auth-box .subtitle { color: var(--ink-500); margin: 0 0 28px; font-size: 14px; }
.auth-box--wide { max-width: 620px; }
.field-note { color: var(--ink-500); font-size: 12px; font-weight: 400; }
.field-note.vat-checking { color: var(--ink-500); font-style: italic; }
.field-note.vat-valid    { color: #1a7f37; font-weight: 500; }
.field-note.vat-invalid  { color: var(--clr-error, #c0392b); font-weight: 500; }
input.input-valid   { border-color: #1a7f37 !important; }
input.input-invalid { border-color: var(--clr-error, #c0392b) !important; }
.auth-resend {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.auth-resend h2 { margin: 0 0 8px; font-size: 18px; }
.auth-resend p { margin: 0 0 16px; color: var(--ink-500); font-size: 14px; }
.auth-switch { text-align: center; margin-top: 24px; font-size: 14px; color: var(--ink-500); }
.auth-switch--secondary { margin-top: 16px; }
.auth-switch a { color: var(--brand-accent); font-weight: 600; }
.security-turnstile { margin: 18px 0 6px; }

/* ---- Account -------------------------------------------------------------- */

.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
@media (max-width: 768px) {
  .account-layout { grid-template-columns: 1fr; }
}

/* Navigatie sidebar */
.account-nav {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px;
  height: fit-content;
  position: sticky;
  top: 130px;
}
.account-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.account-nav li { border: none; }
.account-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ink-600);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.account-nav li.active a {
  color: var(--brand-accent);
  background: color-mix(in srgb, var(--brand-accent) 8%, var(--surface));
  border-left-color: var(--brand-accent);
  font-weight: 600;
}
.account-nav a:hover { color: var(--brand-accent); background: var(--surface-soft); }
.account-nav__logout:hover { color: var(--clr-error) !important; background: color-mix(in srgb, var(--clr-error) 6%, var(--surface)) !important; }
.account-nav__icon { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; }
.account-nav__icon svg { width: 16px; height: 16px; }
.account-nav__badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink-500);
}

/* Content gebied */
.account-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
}

/* Dashboard welkomst-hero */
.account-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.account-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.account-hero__copy h1 { margin: 0 0 4px; font-size: 20px; }
.account-hero__copy p  { margin: 0; color: var(--ink-500); font-size: 14px; }

/* Adreskaarten */
.account-section-intro { margin: -6px 0 22px; color: var(--ink-500); font-size: 14px; }
.account-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}
.account-address-grid--compact { margin-top: 0; }
.account-address-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}
.account-address-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.account-address-card__head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.account-address-card h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.account-address-edit { font-size: 13px; color: var(--brand-accent); font-weight: 600; }
.account-address-edit:hover { text-decoration: underline; }
.account-address-body { color: var(--ink-600); line-height: 1.75; font-size: 14px; }
.account-address-form .checkout-section:last-of-type { margin-bottom: 20px; }

.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th, .orders-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.orders-table thead { background: var(--surface-soft); font-weight: 600; }

/* Bestelstatus badges */
.order-status { font-size: 12px; padding: 3px 8px; border-radius: 20px; font-weight: 600; }
.pending    { background: var(--bg-warning); color: var(--clr-warning); }
.processing { background: #e5f5ff; color: #005b8e; }
.completed  { background: var(--bg-success); color: var(--clr-success); }
.cancelled  { background: var(--surface-soft); color: var(--ink-500); }
.failed     { background: var(--bg-error); color: var(--clr-error); }
.on-hold    { background: var(--bg-warning); color: var(--clr-warning); }

/* ---- Bestelling ontvangen ------------------------------------------------- */

.order-received { text-align: center; padding: 60px 20px; max-width: 600px; margin: 0 auto; }
.order-received-icon {
  font-size: 64px;
  background: var(--clr-success);
  color: #fff;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.order-received h1 { color: var(--clr-success); }
.order-received-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
  text-align: left;
}
.detail-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: var(--radius-sm);
}
.detail-item .label { display: block; font-size: 12px; color: var(--ink-500); text-transform: uppercase; letter-spacing: .05em; }
.detail-item .value { display: block; font-weight: 700; font-size: 16px; }
.order-received-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

/* ---- Adressen / bestellingdetail (oud) ------------------------------------ */

.order-addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.address-block {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: var(--radius-sm);
  line-height: 1.8;
  font-size: 14px;
}
.order-detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.order-items-table { width: 100%; border-collapse: collapse; }
.order-items-table th, .order-items-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.order-items-table .text-center { text-align: center; }
.order-items-table .text-right  { text-align: right; }
.order-summary-table { width: 100%; border-collapse: collapse; }
.order-summary-table th, .order-summary-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.order-items-summary table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.order-items-summary th, .order-items-summary td { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ---- Nieuwe bestellingdetail pagina --------------------------------------- */

/* Paginakoptekst */
.order-detail-page { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.order-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.order-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-500);
  text-decoration: none;
  margin-bottom: 6px;
}
.order-detail-back:hover { color: var(--brand-accent); }
.order-detail-title { margin: 0 0 4px; font-size: 22px; }
.order-detail-title span { color: var(--ink-400); }
.order-detail-meta { margin: 0; font-size: 14px; color: var(--ink-500); }

/* Status badge */
.order-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.order-status-badge.badge-sm { padding: 2px 8px; font-size: 11px; }
.badge-green  { background: var(--bg-success); color: var(--clr-success); }
.badge-blue   { background: #e5f5ff; color: #005b8e; }
.badge-amber  { background: var(--bg-warning); color: var(--clr-warning); }
.badge-red    { background: #fee2e2; color: #b91c1c; }
.badge-muted  { background: var(--surface-soft); color: var(--ink-400); }

/* Actiebalk */
.order-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
}
.order-alert--warning { background: var(--bg-warning); border: 1px solid var(--clr-warning); }
.order-alert--error   { background: #fee2e2; border: 1px solid #f87171; }
.order-alert__text { display: flex; flex-direction: column; gap: 2px; }
.order-alert__text strong { font-weight: 700; }

/* Voortgangsbalk */
.order-progress {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.order-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.order-progress__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink-400);
  transition: all .2s;
}
.order-progress__step--done .order-progress__dot {
  background: var(--clr-success);
  border-color: var(--clr-success);
  color: #fff;
}
.order-progress__step--active .order-progress__dot {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #fff;
}
.order-progress__label { font-size: 12px; color: var(--ink-400); font-weight: 500; }
.order-progress__step--done .order-progress__label,
.order-progress__step--active .order-progress__label { color: var(--ink-900); font-weight: 600; }
.order-progress__line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 0 4px;
  margin-bottom: 18px;
}
.order-progress__line--done { background: var(--clr-success); }

/* Tracking balk */
.order-tracking-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  flex-wrap: wrap;
}
.order-tracking-bar svg { color: #1d4ed8; flex-shrink: 0; }
.order-tracking-bar__number { font-family: monospace; background: #dbeafe; padding: 2px 8px; border-radius: 4px; }

/* Tweekoloms layout */
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

/* Kaarten */
.order-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  overflow: hidden;
}
.order-card:last-child { margin-bottom: 0; }
.order-card__title {
  margin: 0;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.order-card .table-scroll { padding: 0; }
.order-card .order-items-table th,
.order-card .order-items-table td { padding: 12px 18px; }
.order-card--note { border-color: #fde68a; background: #fffbeb; }
.order-card--note .order-card__title { background: #fef3c7; border-color: #fde68a; }
.order-note-text { padding: 14px 18px; margin: 0; font-size: 14px; line-height: 1.7; }

/* Product thumbnail in tabel */
.order-item-thumb-cell { width: 56px; padding: 12px 8px 12px 18px !important; }
.order-item-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: block;
}
.order-item-thumb--placeholder {
  width: 48px;
  height: 48px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.order-item-name { font-weight: 600; font-size: 14px; color: var(--ink-900); text-decoration: none; }
.order-item-name:hover { color: var(--brand-accent); }
.order-item-variation { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.order-item-sku { font-size: 11px; color: var(--ink-400); margin-top: 2px; }

/* Orderinfo lijst */
.order-info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  padding: 14px 18px;
  margin: 0;
  font-size: 13px;
  align-items: center;
}
.order-info-list dt { color: var(--ink-500); font-weight: 500; white-space: nowrap; }
.order-info-list dd { margin: 0; font-weight: 600; }

/* Acties */
.order-actions { display: flex; flex-direction: column; gap: 8px; padding: 14px 18px; }
.btn-block { width: 100%; justify-content: center; display: flex; align-items: center; gap: 7px; }
.btn-danger { color: #b91c1c; border-color: #fca5a5; }
.btn-danger:hover { background: #fee2e2; color: #b91c1c; border-color: #f87171; }

/* Adres */
.order-address { padding: 14px 18px; font-style: normal; font-size: 13px; line-height: 1.9; color: var(--ink-700); display: block; }

/* Responsive */
@media (max-width: 700px) {
  .order-detail-grid { grid-template-columns: 1fr; }
  .order-detail-header { flex-direction: column; }
  .order-progress { padding: 14px 10px; }
  .order-progress__label { font-size: 10px; }
  .order-item-thumb-cell { display: none !important; }
}

/* ---- Beveiliging tab (account) ------------------------------------------- */

.account-section-intro {
  margin: 0 0 24px;
  color: var(--ink-500);
  font-size: 14px;
  line-height: 1.6;
}

.security-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 700px) {
  .security-forms { grid-template-columns: 1fr; }
}

.security-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.security-form-card h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.security-form-card__current {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--ink-500);
}

.security-form { display: flex; flex-direction: column; gap: 14px; }

.security-form__footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-400);
}

/* ---- Admin notities (order) ----------------------------------------------- */

.admin-customer-note {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.admin-customer-note--original {
  background: #fefce8;
  border-left: 3px solid #fbbf24;
}

.admin-customer-note__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-400);
  margin-bottom: 4px;
}

.admin-customer-note p { margin: 0; font-size: 13px; line-height: 1.6; }

.admin-notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.admin-notes-list__item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
}

.admin-notes-list__item:last-child { border-bottom: none; }

.admin-notes-list__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.admin-notes-list__author {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
}

.admin-notes-list__date {
  font-size: 11px;
  color: var(--ink-400);
}

.admin-notes-list__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-700);
}

.admin-add-note-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 5px);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  background: var(--surface);
  color: var(--ink-700);
}

.admin-add-note-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(79 70 229 / .12);
}

/* ---- Juridische pagina's -------------------------------------------------- */

.legal-page {
  display: grid;
  gap: 24px;
}
.legal-page__header {
  display: grid;
  gap: 8px;
}
.legal-page__header h1 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
}
.legal-page__meta {
  margin: 0;
  color: var(--ink-500);
  font-size: 14px;
}
.legal-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.legal-page__layout--with-sidebar {
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
  align-items: start;
}
.legal-page__content,
.legal-page__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}
.legal-page__sidebar {
  position: sticky;
  top: 88px;
}
.legal-page__card h2 {
  margin: 0 0 18px;
  font-size: 18px;
}
.legal-page__details {
  display: grid;
  gap: 16px;
  margin: 0;
}
.legal-page__details div {
  display: grid;
  gap: 4px;
}
.legal-page__details dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.legal-page__details dd {
  margin: 0;
  color: var(--ink-900);
  line-height: 1.7;
}
.legal-page__details a {
  color: var(--brand-accent);
}
.managed-text-content {
  color: var(--ink-900);
  font-size: 15px;
  line-height: 1.85;
  white-space: normal;
  word-break: break-word;
}
.managed-text-content > *:first-child {
  margin-top: 0;
}
.managed-text-content > *:last-child {
  margin-bottom: 0;
}
.managed-text-content p,
.managed-text-content ul,
.managed-text-content ol,
.managed-text-content blockquote {
  margin: 0 0 1.1em;
}
.managed-text-content ul,
.managed-text-content ol {
  padding-left: 1.4em;
}
.managed-text-content li + li {
  margin-top: 0.3em;
}
.managed-text-content h2,
.managed-text-content h3,
.managed-text-content h4 {
  margin: 1.4em 0 0.6em;
  color: var(--ink-950);
}
.managed-text-content a {
  color: var(--brand-accent);
  text-decoration: underline;
}
.managed-text-content blockquote {
  padding-left: 1em;
  border-left: 3px solid var(--line);
  color: var(--ink-700);
}

/* ---- Paginering ----------------------------------------------------------- */

.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 32px; justify-content: center; }
.page-link {
  display: inline-block;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-700);
}
.page-link.current { background: var(--brand-accent); color: #fff; border-color: var(--brand-accent); }
.page-link:hover:not(.current) { border-color: var(--brand-accent); color: var(--brand-accent); }
.page-dots { padding: 6px 4px; color: var(--ink-500); }

/* ---- 404 ------------------------------------------------------------------ */

.error-404 { text-align: center; padding: 80px 20px; }
.error-404 h1 { font-size: 48px; color: var(--ink-500); margin-bottom: 8px; }

/* ---- Responsive ----------------------------------------------------------- */

@media (max-width: 600px) {
  .site-main { padding: 22px 0 48px; }
  .form-row.two-cols { grid-template-columns: 1fr; }
  .order-received-details { grid-template-columns: 1fr; }
  .order-addresses { grid-template-columns: 1fr; }
  .account-address-grid { grid-template-columns: 1fr; }
  .legal-page__layout--with-sidebar { grid-template-columns: 1fr; }
  .legal-page__sidebar { position: static; }
  .legal-page__content, .legal-page__card { padding: 20px; }
  .checkout-section,
  .account-content,
  .cart-totals,
  .product-description,
  .auth-box { padding: 20px; }
  .shop-toolbar,
  .shop-filters { width: 100%; }
  .shop-sidebar { position: static; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .product-actions,
  .order-received-actions { flex-direction: column; }
  .order-received-actions .btn { width: 100%; }
  .quantity-wrapper { flex-wrap: wrap; }
  .account-nav {
    padding: 0;
    height: auto;
    border: none;
    background: transparent;
    overflow-x: auto;
  }
  .account-nav ul {
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
  }
  .account-nav li {
    border: none;
    flex: 0 0 auto;
  }
  .account-nav a {
    border: 1px solid var(--line);
    background: var(--surface);
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  .cart-table,
  .orders-table,
  .order-items-table,
  .order-summary-table {
    border: 0;
    background: transparent;
  }

  .cart-table thead,
  .orders-table thead,
  .order-items-table thead,
  .order-summary-table thead {
    display: none;
  }

  .cart-table tbody,
  .orders-table tbody,
  .order-items-table tbody,
  .order-summary-table tbody {
    display: grid;
    gap: 12px;
  }

  .cart-table tr,
  .orders-table tr,
  .order-items-table tr,
  .order-summary-table tr {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .cart-table td,
  .orders-table td,
  .order-items-table td,
  .order-summary-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    padding: 0;
    border: 0;
  }

  .cart-table td::before,
  .orders-table td::before,
  .order-items-table td::before,
  .order-summary-table td::before {
    content: attr(data-label);
    flex: 0 0 92px;
    color: var(--ink-500);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .cart-table .product-thumbnail,
  .cart-table .product-name {
    display: block;
  }

  .cart-table .product-thumbnail::before,
  .cart-table .product-name::before {
    display: none;
  }

  .cart-table .product-thumbnail img,
  .cart-table .no-thumb {
    width: 72px;
    height: 72px;
  }

  .cart-table .product-remove {
    justify-content: flex-end;
  }

  .orders-table td:last-child {
    display: grid;
    gap: 8px;
  }

  .orders-table td:last-child::before {
    margin-bottom: 2px;
  }

  .orders-table td:last-child .btn {
    width: 100%;
  }

  .order-items-table tfoot,
  .order-summary-table tfoot {
    display: block;
    margin-top: 12px;
  }

  .order-items-table tfoot tr,
  .order-summary-table tfoot tr {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .order-items-table tfoot th,
  .order-items-table tfoot td,
  .order-summary-table tfoot th,
  .order-summary-table tfoot td {
    padding: 0;
    border: 0;
  }
}

.coupon-code-badge {
  display: inline-block;
  padding: 1px 7px;
  background: var(--color-success-bg, #d1fae5);
  color: var(--color-success, #065f46);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  vertical-align: middle;
  text-transform: uppercase;
}
