/* Sea Chips — design tokens + components */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
  /* Marine superfood palette — OKLch */
  --bg:           oklch(98% 0.008 165);
  --surface:      oklch(100% 0 0);
  --surface-warm: oklch(96% 0.018 85);
  --fg:           oklch(22% 0.025 200);
  --muted:        oklch(52% 0.02 200);
  --border:       oklch(90% 0.012 165);
  --sea:          oklch(48% 0.11 165);
  --sea-light:    oklch(92% 0.04 165);
  --sea-dark:     oklch(38% 0.10 165);
  --beet:         oklch(52% 0.17 18);
  --beet-light:   oklch(94% 0.04 18);
  --accent:       var(--sea);
  --accent-2:     var(--beet);
  --success:      oklch(58% 0.14 145);
  --warn:         oklch(72% 0.14 85);
  --danger:       oklch(55% 0.18 25);

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    'Source Sans 3', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px oklch(20% 0.02 200 / 0.06);
  --shadow:    0 4px 20px oklch(20% 0.02 200 / 0.08);
  --shadow-lg: 0 12px 40px oklch(20% 0.02 200 / 0.12);
  --header-h:  64px;
  --max-w:     1200px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  min-height: 100dvh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

.container {
  width: min(100% - 32px, var(--max-w));
  margin-inline: auto;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: oklch(100% 0 0 / 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sea) 0%, var(--sea-dark) 100%);
  display: grid;
  place-items: center;
  color: white;
  font-size: 18px;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav-desktop a {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.nav-desktop a:hover,
.nav-desktop a.active { color: var(--fg); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease);
}

.icon-btn:hover { background: var(--sea-light); }

.cart-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--beet);
  color: white;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.25s var(--ease);
}

.cart-badge.visible {
  opacity: 1;
  transform: scale(1);
}

.menu-toggle { display: grid; }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: oklch(100% 0 0 / 0.96);
  backdrop-filter: blur(16px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav a {
  padding: 16px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.mobile-nav a:hover { background: var(--sea-light); }

.mobile-nav-close {
  align-self: flex-end;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.25s var(--ease);
  min-height: 48px;
}

.btn-primary {
  background: var(--sea);
  color: white;
  box-shadow: 0 4px 14px oklch(48% 0.11 165 / 0.35);
}

.btn-primary:hover {
  background: var(--sea-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px oklch(48% 0.11 165 / 0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--sea);
  background: var(--sea-light);
}

.btn-beet {
  background: var(--beet);
  color: white;
}

.btn-beet:hover { filter: brightness(1.08); }

.btn-sm {
  padding: 10px 18px;
  min-height: 40px;
  font-size: 0.875rem;
}

.btn-block { width: 100%; }

/* ——— Product photo placeholder ——— */
.product-photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--sea-light) 0%, var(--surface-warm) 50%, var(--beet-light) 100%);
  aspect-ratio: 1;
}

.product-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, oklch(55% 0.08 165 / 0.3) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, oklch(52% 0.12 18 / 0.2) 0%, transparent 45%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 3px,
      oklch(45% 0.06 165 / 0.04) 3px,
      oklch(45% 0.06 165 / 0.04) 6px
    );
}

.product-photo-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  padding: 8px 12px;
  background: oklch(100% 0 0 / 0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* ——— Cards ——— */
.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: oklch(48% 0.11 165 / 0.25);
}

.product-card .product-photo {
  border-radius: 0;
  aspect-ratio: 4/3;
}

.product-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sea-light);
  color: var(--sea-dark);
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
}

.product-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}

.product-card-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}

/* ——— Badges ——— */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-vegan { background: var(--sea-light); color: var(--sea-dark); }
.badge-hit { background: var(--beet-light); color: var(--beet); }

/* ——— Section ——— */
.section {
  padding: 48px 0;
}

.section-header {
  margin-bottom: 32px;
}

.section-kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sea);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ——— Grid ——— */
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 20px; }
.grid-4 { display: grid; gap: 20px; }

@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ——— Feature row ——— */
.feature-row {
  display: grid;
  gap: 16px;
}

.feature-item {
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease);
}

.feature-item:hover { border-color: var(--sea); }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--sea-light);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.feature-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-item p {
  font-size: 0.9375rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .feature-row { grid-template-columns: repeat(4, 1fr); }
}

/* ——— Footer ——— */
.site-footer {
  background: var(--sea-dark);
  color: oklch(92% 0.02 165);
  padding: 48px 0 32px;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h4 {
  font-family: var(--font-display);
  color: white;
  margin-bottom: 12px;
}

.footer-grid a {
  display: block;
  padding: 4px 0;
  font-size: 0.9375rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-grid a:hover { opacity: 1; }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid oklch(100% 0 0 / 0.12);
  font-size: 0.875rem;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ——— Form controls ——— */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 48px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--sea);
  box-shadow: 0 0 0 3px oklch(48% 0.11 165 / 0.15);
}

.form-input.error { border-color: var(--danger); }

.form-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--danger);
  margin-top: 4px;
}

/* ——— Qty stepper ——— */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-stepper button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.qty-stepper button:hover { background: var(--sea-light); }

.qty-stepper span {
  min-width: 36px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ——— Toast ——— */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 300;
  padding: 14px 24px;
  background: var(--fg);
  color: white;
  border-radius: var(--radius);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.35s var(--ease);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ——— Animations ——— */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeUp 0.6s var(--ease) both;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }

/* ——— Sticky buy bar (mobile product) ——— */
.sticky-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 12px 16px;
  background: oklch(100% 0 0 / 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
}

.sticky-buy-bar.visible { transform: translateY(0); }

@media (min-width: 768px) {
  .sticky-buy-bar { display: none; }
}

/* ——— Filter panel ——— */
.filter-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
}

.filter-group { margin-bottom: 24px; }
.filter-group:last-child { margin-bottom: 0; }

.filter-group h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s var(--ease);
}

.filter-chip:hover { border-color: var(--sea); }

.filter-chip.active {
  background: var(--sea);
  border-color: var(--sea);
  color: white;
}

.catalog-layout {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .catalog-layout {
    grid-template-columns: 260px 1fr;
    align-items: start;
  }
  .filter-panel { position: sticky; top: calc(var(--header-h) + 16px); }
}

.mobile-filter-toggle {
  display: flex;
  margin-bottom: 16px;
}

@media (min-width: 900px) {
  .mobile-filter-toggle { display: none; }
}

.filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: oklch(100% 0 0 / 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.filter-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.filter-drawer-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85dvh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px;
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
}

.filter-drawer.open .filter-drawer-panel {
  transform: translateY(0);
}

@media (min-width: 900px) {
  .filter-drawer { display: none; }
}

/* ——— Order summary ——— */
.order-summary {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
}

.order-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9375rem;
}

.order-summary-row.total {
  border-top: 1.5px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}

/* ——— Review card ——— */
.review-card {
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.review-stars { color: var(--beet); letter-spacing: 2px; margin-bottom: 8px; }
.review-text { font-size: 0.9375rem; color: var(--muted); margin-bottom: 12px; }
.review-author { font-weight: 600; font-size: 0.875rem; }

/* ——— Steps indicator ——— */
.checkout-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.checkout-step {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--radius);
  background: var(--surface-warm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.checkout-step.active {
  background: var(--sea-light);
  color: var(--sea-dark);
}

.checkout-step.done {
  background: var(--sea);
  color: white;
}

@media (min-width: 600px) {
  .checkout-step { font-size: 0.875rem; }
}
