/* ============================================================
   Koveira — Multi-vendor Marketplace Concept Demo
   Design tokens & styles. Light premium theme, indigo #4f46e5.
   Mobile-first, no frameworks.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Brand & neutrals */
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-soft: #eef2ff;
  --color-primary-soft-2: #e0e7ff;
  --color-accent-glow: rgba(79, 70, 229, 0.14);

  --color-ink: #0f172a;
  --color-body: #475569;
  --color-muted: #94a3b8;
  --color-surface: #ffffff;
  --color-canvas: #f8fafc;
  --color-line: #e2e8f0;
  --color-line-soft: #eef2f7;

  /* Semantic */
  --color-success: #059669;
  --color-success-soft: #ecfdf5;
  --color-warning: #b45309;
  --color-warning-soft: #fffbeb;
  --color-danger: #dc2626;
  --color-danger-soft: #fef2f2;

  /* Category tints */
  --tint-electronics: #eef2ff;
  --tint-fashion: #fdf2f8;
  --tint-home: #fffbeb;
  --tint-sports: #ecfdf5;

  /* Radii (10–14px system) */
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 14px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 14px 34px rgba(15, 23, 42, 0.12);

  /* Spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Type scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: clamp(26px, 4.5vw, 34px);
  --text-hero: clamp(40px, 7vw, 62px);

  --header-h: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-body);
  background: var(--color-canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, p { margin: 0; }
img, svg { display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--color-primary-soft-2); color: var(--color-primary-hover); }

/* ---------- Utilities ---------- */
.container {
  width: min(100% - 40px, 1160px);
  margin-inline: auto;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--color-primary); color: #fff;
  padding: 10px 16px; border-radius: 0 0 10px 0;
  font-weight: 600; font-size: var(--text-sm);
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s,
              box-shadow 0.2s, transform 0.2s;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--color-primary); color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.32);
}
.btn--primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); }
.btn--primary:disabled { opacity: 0.45; box-shadow: none; cursor: not-allowed; transform: none; }

.btn--secondary {
  background: var(--color-surface); border-color: var(--color-line); color: var(--color-ink);
}
.btn--secondary:hover { border-color: var(--color-primary-soft-2); background: var(--color-primary-soft); color: var(--color-primary); }

.btn--block { width: 100%; }

.add-btn.is-added {
  background: var(--color-success); border-color: var(--color-success);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.3);
}

/* ---------- Header / navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.is-scrolled { border-bottom-color: var(--color-line); box-shadow: var(--shadow-sm); }

.navbar {
  height: var(--header-h);
  display: flex; align-items: center;
  justify-content: space-between; gap: var(--space-4);
}

.brand {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-weight: 800; letter-spacing: -0.02em; color: var(--color-ink);
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--color-primary);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark--sm { width: 26px; height: 26px; border-radius: 8px; }

.nav-links { display: flex; align-items: center; gap: var(--space-1); }

.nav-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 8px 12px;
  border: 0; background: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 500; font-family: inherit;
  color: var(--color-body);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--color-ink); background: var(--color-primary-soft); }
.nav-link svg { width: 17px; height: 17px; }
.nav-admin.is-active { color: var(--color-primary); background: var(--color-primary-soft); }

.nav-actions { display: flex; align-items: center; gap: var(--space-2); }

.cart-button {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-ink);
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.cart-button:hover { border-color: var(--color-primary); color: var(--color-primary); box-shadow: var(--shadow-md); }
.cart-button svg { width: 19px; height: 19px; }

.cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--color-primary); color: #fff;
  font-size: 11px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}
.cart-count.is-pop { animation: pop 0.4s var(--ease-out); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: var(--space-16) 0 var(--space-12);
  text-align: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 320px at 15% 5%, var(--color-accent-glow), transparent 70%),
    radial-gradient(520px 300px at 88% 15%, rgba(79, 70, 229, 0.09), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 25%, transparent 75%);
}
.hero-inner {
  position: relative;
  display: grid; justify-items: center; gap: var(--space-5);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 8px 14px;
  border: 1px solid var(--color-primary-soft-2);
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.hero-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-primary);
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--color-ink);
}

.hero-sub {
  max-width: 560px;
  font-size: var(--text-lg);
  color: var(--color-body);
}

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.hero-note { font-size: var(--text-sm); color: var(--color-muted); }

/* ---------- Sections ---------- */
.catalog { padding: var(--space-8) 0 var(--space-20); scroll-margin-top: calc(var(--header-h) + 16px); }

.section-head { max-width: 640px; margin-bottom: var(--space-6); }
.section-head--row {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: var(--space-4);
  max-width: none;
}

.eyebrow {
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.section-title {
  font-size: var(--text-3xl); font-weight: 800;
  letter-spacing: -0.02em; color: var(--color-ink);
}
.section-sub { margin-top: var(--space-2); color: var(--color-muted); }

/* ---------- Category chips ---------- */
.chip-row {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.chip {
  padding: 9px 16px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-body);
  font-size: var(--text-sm); font-weight: 600; font-family: inherit;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--color-primary-soft-2); color: var(--color-primary); }
.chip.is-active {
  background: var(--color-primary); border-color: var(--color-primary); color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.product-card {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, border-color 0.25s;
  animation: card-in 0.5s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-line);
}

.product-tile {
  width: 100%; aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  font-size: 44px;
  border: 1px solid var(--color-line-soft);
  border-radius: var(--radius-md);
  background: var(--color-canvas);
}
.product-tile--electronics { background: var(--tint-electronics); }
.product-tile--fashion    { background: var(--tint-fashion); }
.product-tile--home       { background: var(--tint-home); }
.product-tile--sports     { background: var(--tint-sports); }

.product-info { display: grid; gap: 2px; }
.product-name {
  font-size: var(--text-base); font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.3; color: var(--color-ink);
}
.product-vendor { font-size: var(--text-sm); color: var(--color-muted); }
.product-vendor::before { content: "by "; }

.product-buy { margin-top: auto; display: grid; gap: var(--space-3); }
.product-price { font-size: var(--text-lg); font-weight: 700; color: var(--color-ink); }

/* ---------- Backdrop & cart drawer ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.backdrop.is-open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: min(420px, 100%);
  display: flex; flex-direction: column;
  background: var(--color-surface);
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.14);
  transform: translateX(100%);
  transition: transform 0.38s var(--ease-out);
}
.cart-drawer.is-open { transform: translateX(0); }

.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-line-soft);
}
.cart-head h2 {
  font-size: var(--text-xl); font-weight: 700;
  letter-spacing: -0.01em; color: var(--color-ink);
  display: inline-flex; align-items: center; gap: var(--space-2);
}
.cart-head-count {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--text-xs); font-weight: 700;
}

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-body);
  transition: all 0.15s;
}
.icon-btn:hover { color: var(--color-ink); background: var(--color-canvas); }
.icon-btn svg { width: 18px; height: 18px; }

.cart-body {
  flex: 1; overflow-y: auto;
  padding: var(--space-4) var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-4);
}

.cart-empty {
  margin: auto;
  display: grid; justify-items: center; gap: var(--space-2);
  text-align: center; color: var(--color-muted);
}
.cart-empty-emoji { font-size: 40px; }
.cart-empty strong { color: var(--color-ink); font-weight: 600; }
.cart-empty .btn { margin-top: var(--space-2); }

.cart-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: var(--space-3); align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--color-line-soft);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  animation: fade-in 0.3s var(--ease-out);
}
.cart-item-tile {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 26px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
}
.cart-item-info { display: grid; gap: 1px; min-width: 0; }
.cart-item-name {
  font-size: var(--text-sm); font-weight: 600;
  color: var(--color-ink); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cart-item-vendor { font-size: var(--text-xs); color: var(--color-muted); }
.cart-item-price { font-size: var(--text-xs); color: var(--color-muted); margin-top: 2px; }

.cart-item-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2);
}
.cart-item-total { font-size: var(--text-sm); font-weight: 700; color: var(--color-ink); }

.cart-remove {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border: 0; background: none;
  border-radius: 7px;
  color: var(--color-muted);
  transition: all 0.15s;
}
.cart-remove:hover { color: var(--color-danger); background: var(--color-danger-soft); }
.cart-remove svg { width: 14px; height: 14px; }

.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-surface);
}
.qty button {
  width: 28px; height: 28px;
  border: 0; background: none;
  border-radius: 999px;
  font-size: var(--text-base); font-weight: 700; line-height: 1;
  color: var(--color-body);
  transition: all 0.15s;
}
.qty button:hover { color: var(--color-primary); background: var(--color-primary-soft); }
.qty span {
  min-width: 26px; text-align: center;
  font-size: var(--text-sm); font-weight: 600; color: var(--color-ink);
}

.cart-foot {
  padding: var(--space-5) var(--space-6);
  display: grid; gap: var(--space-3);
  border-top: 1px solid var(--color-line-soft);
  background: var(--color-surface);
}
.cart-total-row { display: flex; align-items: baseline; justify-content: space-between; }
.cart-total-row span { font-weight: 500; color: var(--color-muted); }
.cart-total-row strong { font-size: var(--text-xl); color: var(--color-ink); }
.cart-note { font-size: var(--text-xs); color: var(--color-muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: var(--space-6); z-index: 90;
  max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: var(--space-3);
  padding: 14px 18px;
  background: var(--color-ink); color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm); font-weight: 500;
  transform: translate(-50%, 16px);
  opacity: 0; pointer-events: none;
  transition: transform 0.35s var(--ease-out), opacity 0.35s;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast-icon {
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-success);
}
.toast-icon svg { width: 12px; height: 12px; }

/* ---------- Admin view ---------- */
.admin {
  padding: var(--space-12) 0 var(--space-20);
  scroll-margin-top: calc(var(--header-h) + 12px);
  animation: fade-in 0.4s var(--ease-out);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.stat {
  padding: var(--space-4);
  display: grid; gap: 2px;
  background: var(--color-surface);
  border: 1px solid var(--color-line-soft);
  border-radius: var(--radius-md);
}
.stat-value { font-size: var(--text-2xl); font-weight: 800; color: var(--color-ink); letter-spacing: -0.02em; }
.stat-label { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-muted); }

.admin-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.search-field { position: relative; flex: 1 1 260px; display: flex; align-items: center; }
.search-field svg {
  position: absolute; left: 12px;
  width: 16px; height: 16px;
  color: var(--color-muted); pointer-events: none;
}
.search-field input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--text-sm); font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-field input::placeholder { color: var(--color-muted); }
.search-field input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15); }

.table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.admin-table th {
  text-align: left;
  padding: var(--space-3) var(--space-5);
  background: #f8fafc;
  border-bottom: 1px solid var(--color-line-soft);
  font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-muted);
}
.admin-table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-line-soft);
  vertical-align: middle;
}
.admin-table tbody tr { transition: background 0.15s; }
.admin-table tbody tr:hover { background: var(--color-primary-soft); }
.admin-table tbody tr:last-child td { border-bottom: 0; }

.admin-product { display: flex; align-items: center; gap: var(--space-3); }
.admin-tile {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  font-size: 18px;
  border: 1px solid var(--color-line-soft);
  border-radius: var(--radius-sm);
  background: var(--color-canvas);
}
.admin-name { font-weight: 600; color: var(--color-ink); }
.admin-price { font-weight: 600; color: var(--color-ink); }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--text-xs); font-weight: 600;
  white-space: nowrap;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill--active { background: var(--color-success-soft); color: var(--color-success); }
.status-pill--low    { background: var(--color-warning-soft); color: var(--color-warning); }
.status-pill--out    { background: var(--color-danger-soft); color: var(--color-danger); }

.admin-actions-td { display: flex; gap: var(--space-2); }
.action-btn {
  width: 32px; height: 32px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--color-line);
  border-radius: 9px;
  background: var(--color-surface);
  color: var(--color-muted);
  transition: all 0.15s;
}
.action-btn:hover { border-color: var(--color-primary-soft-2); color: var(--color-primary); background: var(--color-primary-soft); }
.action-btn--danger:hover { border-color: #fecaca; color: var(--color-danger); background: var(--color-danger-soft); }
.action-btn svg { width: 15px; height: 15px; }

.admin-empty { text-align: center; padding: var(--space-8); color: var(--color-muted); }

/* Admin table → stacked cards on mobile */
@media (max-width: 719px) {
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tbody { padding: var(--space-3); display: grid; gap: var(--space-3); }
  .admin-table tr {
    background: var(--color-surface);
    border: 1px solid var(--color-line-soft);
    border-radius: var(--radius-md);
    padding: var(--space-4);
  }
  .admin-table td {
    border: 0;
    padding: var(--space-1) 0;
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-4);
  }
  .admin-table td::before {
    content: attr(data-label);
    flex: none;
    font-size: var(--text-xs); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--color-muted);
  }
  .admin-empty { padding: var(--space-6) 0; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--space-8) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-line-soft);
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-4);
}
.footer-brand { display: grid; gap: var(--space-2); }
.footer-note { font-size: var(--text-sm); color: var(--color-muted); }
.footer-link { color: var(--color-primary); font-weight: 600; }
.footer-link:hover { text-decoration: underline; }

/* ---------- Animations ---------- */
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .container { width: min(100% - 48px, 1160px); }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
  .admin-stats { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: var(--space-20) 0 var(--space-16); }
  .catalog { padding-top: var(--space-12); }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-admin-label { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
