/* ============================================================
   druoutlet — design system
   White, airy base · deep ink/navy · one orange-red deal accent
   ============================================================ */

:root {
  /* color tokens (tweakable accent overridden at runtime) */
  --bg:        oklch(0.992 0.004 70);     /* warm near-white page */
  --surface:   #ffffff;
  --surface-2: oklch(0.974 0.006 75);     /* soft panel / section band */
  --surface-3: oklch(0.955 0.008 75);     /* deeper panel */

  --ink:       oklch(0.245 0.045 264);    /* deep navy — text & nav */
  --ink-2:     oklch(0.40 0.035 264);     /* secondary text */
  --ink-3:     oklch(0.56 0.025 264);     /* muted / captions */

  --line:      oklch(0.915 0.008 264);    /* hairline borders */
  --line-2:    oklch(0.875 0.01 264);

  --accent:    #f23b1e;                   /* deal / CTA orange-red (tweakable) */
  --accent-ink:#c42a10;                   /* text-on-light accent */
  --accent-press: oklch(0.55 0.20 28);

  --good:      oklch(0.62 0.13 150);      /* in-stock green */
  --good-bg:   oklch(0.95 0.04 150);

  --shadow-sm: 0 1px 2px rgba(15,22,45,.05), 0 1px 3px rgba(15,22,45,.05);
  --shadow-md: 0 4px 14px rgba(15,22,45,.07), 0 2px 6px rgba(15,22,45,.05);
  --shadow-lg: 0 18px 50px rgba(15,22,45,.13), 0 6px 18px rgba(15,22,45,.07);
  --shadow-accent: 0 8px 22px color-mix(in srgb, var(--accent) 32%, transparent);

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  --maxw: 1280px;

  --sans: "Onest", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  --header-h: 132px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

/* ---------- typography helpers ---------- */
.h-display { font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 500;
}
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }

.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   WORDMARK
   ============================================================ */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  font-size: 26px;
}
.wordmark .dot { color: var(--accent); }
.wordmark .out {
  color: var(--accent);
}
.wordmark-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: lowercase;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 22px;
  line-height: 1;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-accent:hover { background: var(--accent-press); }
.btn-ink {
  background: var(--ink);
  color: #fff;
}
.btn-ink:hover { background: oklch(0.32 0.05 264); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--surface-2); }
.btn-soft {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-ink);
}
.btn-soft:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }

/* icon-only round button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  position: relative;
  transition: border-color .15s, background .15s;
}
.icon-btn:hover { border-color: var(--ink); }
.cart-count {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  line-height: 1;
  white-space: nowrap;
}
.badge-deal { background: var(--accent); color: #fff; }
.badge-pct  { background: var(--ink); color: #fff; }
.badge-top  { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.badge-new  { background: var(--good-bg); color: var(--good); }

/* ============================================================
   PRICE BLOCK
   ============================================================ */
.price { display: flex; flex-direction: column; gap: 2px; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-bgn {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.price-bgn .cur { font-size: 0.6em; font-weight: 700; color: var(--ink-2); margin-left: 2px; }
.price-eur {
  font-family: var(--mono);
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
}
.price-old {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent);
  font-weight: 600;
}
.price-save {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 13px;
}

/* size variants */
.price-sm .price-bgn { font-size: 21px; }
.price-sm .price-eur { font-size: 12.5px; }
.price-md .price-bgn { font-size: 27px; }
.price-md .price-eur { font-size: 13.5px; }
.price-xl .price-bgn { font-size: 46px; }
.price-xl .price-eur { font-size: 17px; }

/* ============================================================
   STARS
   ============================================================ */
.stars { display: inline-flex; align-items: center; gap: 3px; }
.stars svg { width: 14px; height: 14px; }
.stars .s-on { color: var(--accent); }
.stars .s-off { color: var(--line-2); }
.rating-line { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); }

/* ============================================================
   DEVICE PLACEHOLDER IMAGE
   ============================================================ */
.ph {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r);
  background:
    repeating-linear-gradient(135deg,
      oklch(0.97 0.006 264) 0 11px,
      oklch(0.945 0.008 264) 11px 22px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ph-glyph { color: oklch(0.72 0.02 264); }
.ph-label {
  position: absolute;
  left: 10px; bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: oklch(0.62 0.02 264);
}
.ph-wide { aspect-ratio: 16 / 10; }

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
  position: relative;
  height: 100%;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--line-2); transform: translateY(-2px); }
.card-media { position: relative; }
.card-badges {
  position: absolute; top: 8px; left: 8px;
  display: flex; gap: 6px; z-index: 2;
}
.card-fav {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 34px; height: 34px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, #fff 78%, transparent);
  backdrop-filter: blur(4px);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  transition: color .15s, border-color .15s;
}
.card-fav:hover, .card-fav.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.card-brand { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.card-title {
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.32;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.64em;
}
.card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 11px; }
.card a.card-title:hover { color: var(--accent-ink); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 56px 0; }
.section-band { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.section-head h2 { font-size: 30px; margin: 0; font-weight: 800; letter-spacing: -0.025em; }
.section-head .sub { color: var(--ink-3); font-size: 15px; margin-top: 6px; }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent-ink); font-size: 15px; }
.section-link:hover { gap: 9px; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* horizontal scroller for product rows on small screens handled by media query */

/* ============================================================
   FORMS
   ============================================================ */
.input {
  width: 100%;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: var(--r);
  padding: 13px 15px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; display: block; }

/* ============================================================
   UTIL
   ============================================================ */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- stock pill ---------- */
.stock-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 13.5px;
}
.stock-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.stock-pill.in  { color: var(--good); }
.stock-pill.in .dot  { background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.stock-pill.low { color: var(--accent-ink); }
.stock-pill.low .dot { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent); }
.stock-pill.out { color: var(--ink-3); }
.stock-pill.out .dot { background: var(--ink-3); }

/* ---------- trust bar ---------- */
.trustbar { background: var(--ink); color: #fff; }
.trustbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 13px 24px; flex-wrap: wrap;
}
.trust-item { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; color: oklch(0.92 0.01 264); }
.trust-item svg { color: var(--accent); flex: none; }
.trustbar.compact .trustbar-inner { padding: 10px 24px; }

.fade-in { animation: fadeIn .4s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
