@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Manrope:wght@400..800&display=swap');

:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --surface: #17171a;
  --surface-hover: #1e1e22;
  --border: #2a2a2e;
  --border-soft: #1c1c1f;
  --text: #f4f2ec;
  --text-muted: #a3a29c;
  --text-faint: #6c6b67;
  --accent: #1f9d6b;
  --accent-strong: #29c084;
  --accent-soft: rgba(31, 157, 107, 0.14);
  --accent-ink: #04120b;
  --error: #e5484d;
  --error-soft: rgba(229, 72, 77, 0.12);

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  --shadow-pop: 0 20px 60px -20px rgba(0, 0, 0, 0.7);

  color-scheme: dark;
}

/* z-index scale: 10 sticky header, 20 toast, 30 drawer/overlay backdrop, 40 drawer panel, 50 modal */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* focus ring, keyboard only */
:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.container {
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  padding: 13px 26px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-strong);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 10px 16px;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-block {
  width: 100%;
}

/* ---------- cards / surfaces ---------- */

.surface {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.product-card {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
}

.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-card__media img {
  transform: scale(1.05);
}

/* ---------- badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: transparent;
}

.badge-error {
  background: var(--error-soft);
  color: var(--error);
  border-color: transparent;
}

/* ---------- forms ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-error input,
.field-error select {
  border-color: var(--error);
}

.field-error-msg {
  font-size: 12.5px;
  color: var(--error);
  display: none;
}

.field-error .field-error-msg {
  display: block;
}

.field-hint {
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- radio option cards (courier / payment) ---------- */

.option-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.option-row:hover {
  border-color: var(--border);
  background: var(--surface-hover);
}

.option-row:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-row input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* ---------- toast ---------- */

.toast-stack {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: var(--text);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  height: 72px;
  display: flex;
  align-items: center;
}

.cart-dot {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- skeleton ---------- */

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* ---------- scroll reveal (GSAP driven, CSS fallback via .is-visible) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- view transitions between pages ---------- */

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: seis-fade-out 0.22s ease both;
}

::view-transition-new(root) {
  animation: seis-fade-in 0.28s ease both;
}

@keyframes seis-fade-out {
  to { opacity: 0; }
}

@keyframes seis-fade-in {
  from { opacity: 0; }
}

/* ---------- misc ---------- */

.divider {
  height: 1px;
  background: var(--border-soft);
  border: none;
}

.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-accent { color: var(--accent-strong); }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.qty-stepper button {
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.qty-stepper span {
  min-width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 13.5px;
}

.star-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--accent-strong);
}

@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
  .nav-links { display: none !important; }
}
