:root {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --text: #17181a;
  --text-muted: #6b6e73;
  --primary: #17181a;
  --primary-hover: #34363a;
  --accent: #17181a;
  --accent-hover: #34363a;
  --accent-soft: #ececea;
  --border: #e2e2df;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(23, 24, 26, 0.06);
  --shadow-lg: 0 16px 44px rgba(23, 24, 26, 0.14);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 40px;
}

h1, h2 { margin: 0 0 8px; letter-spacing: -0.01em; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-logo { height: 36px; width: auto; display: block; }
.brand-text { letter-spacing: 0.01em; }
.cart-toggle {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
}
.cart-toggle:hover { background: var(--bg); }
.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Hero */
.hero {
  background:
    radial-gradient(circle at 82% -20%, var(--accent-soft), transparent 55%),
    var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 64px 20px 40px;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 { font-size: 38px; max-width: 620px; margin: 0 auto 14px; }
.hero p { color: var(--text-muted); font-size: 16px; margin: 0 auto; max-width: 480px; }

/* How it works */
.how-it-works {
  max-width: 760px;
  margin: 40px auto 0;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  gap: 4px;
}
.how-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 14px;
  position: relative;
}
.how-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  right: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--border);
}
.how-num {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.how-step h3 { margin: 0 0 4px; font-size: 14px; }
.how-step p { margin: 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }

/* Products grid */
.products {
  max-width: 1100px;
  margin: 48px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.product-icon {
  background: linear-gradient(160deg, var(--bg), #ece9de);
  border-radius: 10px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  overflow: hidden;
}
.product-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}
.product-card:hover .product-icon img { transform: scale(1.05); }

.badge-sammel {
  align-self: flex-start;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.badge-sammel-inline {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  vertical-align: middle;
}
.sammel-note {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 4px 0 0;
}
.product-card h3 { margin: 0 0 4px; font-size: 16px; }
.product-price { font-weight: 700; color: var(--text); margin: 0 0 14px; font-variant-numeric: tabular-nums; }
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  padding: 11px 16px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--text);
  color: var(--text);
}
.btn-outline:hover { background: var(--text); color: #fff; }
.product-card .btn { margin-top: auto; }

.btn:focus-visible,
.size-option:focus-visible,
.cart-toggle:focus-visible,
.link-btn:focus-visible,
.qty-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Footer */
.site-footer {
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
.site-footer-admin { margin-top: 6px; }
.site-footer-admin a {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
}
.site-footer-admin a:hover { color: var(--text); text-decoration: underline; }

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 21, 18, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
}
.overlay.visible { opacity: 1; pointer-events: auto; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 20px;
}
.modal.visible { opacity: 1; pointer-events: auto; }
.modal-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 380px;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  background: linear-gradient(160deg, var(--bg), #ece9de);
  border-radius: 10px;
  height: 140px;
}
.modal-icon img { width: 100%; height: 100%; object-fit: contain; }
.modal-price { color: var(--text-muted); font-weight: 600; margin: 0 0 18px; }

.field-group { margin-bottom: 18px; }
.field-group > label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }

.size-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.size-option {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  transition: all 0.12s ease;
}
.size-option.selected { border-color: var(--accent); background: var(--accent); color: #fff; }
.size-option.has-error { border-color: #c0392b; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  background: var(--bg);
  border: none;
  width: 38px;
  height: 38px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: background 0.12s ease;
}
.qty-btn:hover { background: var(--border); }
.qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }
#qtyValue {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.field-error {
  color: #c0392b;
  font-size: 12px;
  margin: 6px 0 0;
}

select, input[type="text"], input[type="email"], textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input.has-error, textarea.has-error { border-color: #c0392b; }

.toggle-row { display: flex; gap: 16px; margin-bottom: 8px; }
.radio { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.initials-text { margin-top: 8px; }

/* Cart drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 92vw;
  background: var(--surface);
  box-shadow: -8px 0 30px rgba(20, 21, 18, 0.15);
  z-index: 35;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.cart-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  animation: item-in 0.25s ease;
}
@keyframes item-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
.cart-item-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item-icon img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info h4 { margin: 0 0 2px; font-size: 14px; }
.cart-item-meta { color: var(--text-muted); font-size: 12px; margin: 0 0 4px; }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; }
.cart-item-price { font-weight: 700; font-size: 14px; }
.remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.remove-btn.confirming { color: #c0392b; font-weight: 700; }
.remove-btn:disabled { opacity: 0.5; cursor: wait; }
.cart-empty { color: var(--text-muted); text-align: center; padding: 40px 0; font-size: 14px; }
.cart-footer { padding: 18px 20px; border-top: 1px solid var(--border); }
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 14px;
}

/* Checkout */
.checkout-view {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}
.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  margin-bottom: 16px;
}
.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  margin-top: 18px;
}
.checkout-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.checkout-form label { font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 6px; }
.checkout-form textarea { min-height: 70px; resize: vertical; }
.payment-note {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  color: var(--accent-hover);
  line-height: 1.5;
}
.privacy-note { color: var(--text-muted); font-size: 12px; line-height: 1.5; margin: -4px 0 0; }
.privacy-note a { color: var(--text); text-underline-offset: 2px; }
.checkout-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 86px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.summary-line-name { font-weight: 600; }
.summary-line-meta { color: var(--text-muted); }
.summary-group-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 16px 0 4px;
}
.summary-group-title:first-child { margin-top: 0; }
.summary-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

/* Confirmation */
.confirmation-view {
  max-width: 500px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}
.confirmation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 30px;
  box-shadow: var(--shadow);
}
.confirmation-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.confirmation-card p { color: var(--text-muted); margin-bottom: 22px; }

/* View transitions */
.checkout-view, .confirmation-view, main.products, .hero, .how-it-works {
  animation: view-in 0.3s ease;
}
@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: "✓"; color: #fff; font-weight: 800; }

@media (max-width: 700px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .how-it-works { flex-direction: column; gap: 22px; margin-top: 30px; }
  .how-step:not(:last-child)::after { display: none; }
  .checkout-summary { position: static; }
}
