/* ==========================================================
   TROCHOS COSMETICS — design tokens, reset, primitives
   Palette derived from the logo: magenta #9E0E5C -> plum #5C2A63
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* brand */
  --brand:          #9E0E5C;
  --brand-600:      #8A0C50;
  --brand-700:      #6E0A40;
  --plum:           #5C2A63;
  --plum-600:       #4A2150;
  --pop:            #E0218A;
  --brand-grad:     linear-gradient(135deg, #9E0E5C 0%, #7A1A5F 50%, #5C2A63 100%);
  --brand-grad-soft:linear-gradient(135deg, #FFF0F7 0%, #F6EDF8 100%);

  /* neutrals */
  --ink:            #111111;
  --ink-2:          #3A3A3A;
  --ink-3:          #6B6B6B;
  --ink-4:          #9A9A9A;
  --line:           #E6E6E6;
  --line-2:         #F0F0F0;
  --bg:             #FFFFFF;
  --bg-2:           #FAFAFA;
  --bg-3:           #F5F5F5;

  /* status */
  --ok:             #1B8A4B;
  --warn:           #C77700;
  --err:            #D32F2F;
  --star:           #FFB400;

  /* type */
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body:    'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* layout */
  --wrap:     1400px;
  --wrap-narrow: 1180px;
  --radius:   4px;
  --radius-lg:10px;
  --header-h: 64px;

  /* elevation */
  --sh-1: 0 1px 3px rgba(0,0,0,.08);
  --sh-2: 0 4px 16px rgba(0,0,0,.10);
  --sh-3: 0 12px 36px rgba(0,0,0,.14);
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* Inline icons default to text size; any component rule overrides this. */
svg { width: 1em; height: 1em; vertical-align: -0.125em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.15;
}

/* ---------- layout ---------- */
.wrap      { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.wrap-n    { width: 100%; max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: 16px; }
.row       { display: flex; align-items: center; }
.between   { justify-content: space-between; }
.center    { justify-content: center; }
.gap-8     { gap: 8px; }  .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.hide      { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- section headings ---------- */
.sec { padding: 44px 0; }
.sec-head { text-align: center; margin-bottom: 26px; }
.sec-title {
  font-size: clamp(20px, 3vw, 30px);
  text-transform: uppercase;
  letter-spacing: .01em;
  font-weight: 900;
}
.sec-title .accent {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.sec-sub { color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.sec-rule {
  width: 56px; height: 3px; margin: 10px auto 0;
  background: var(--brand-grad); border-radius: 2px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px;
  font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: .06em; text-transform: uppercase;
  border-radius: var(--radius);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--brand); }
.btn-brand   { background: var(--brand-grad); color: #fff; box-shadow: 0 4px 14px rgba(158,14,92,.28); }
.btn-brand:hover { filter: brightness(1.08); box-shadow: 0 6px 20px rgba(158,14,92,.36); }
.btn-outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost   { background: var(--bg-3); color: var(--ink); }
.btn-ghost:hover { background: var(--line); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 11.5px; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

/* ---------- form controls ---------- */
.field { margin-bottom: 14px; }
.label {
  display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-3); margin-bottom: 6px;
}
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 12px;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(158,14,92,.12);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.hint { font-size: 11.5px; color: var(--ink-4); margin-top: 5px; }
.err-text { font-size: 12px; color: var(--err); margin-top: 5px; }

/* ---------- badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  font-family: var(--display); font-size: 10px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
  border-radius: 2px; background: var(--ink); color: #fff;
}
/* class names are derived from the badge text: BESTSELLER -> badge-bestseller */
.badge-new        { background: var(--brand-grad); }
.badge-bestseller { background: #111; }
.badge-sale       { background: var(--err); }
.badge-limited    { background: var(--plum); }
.badge-out        { background: var(--ink-3); }

.pill {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  font-size: 11.5px; font-weight: 600; border-radius: 999px;
  background: var(--bg-3); color: var(--ink-2);
}

/* ---------- price ---------- */
.price     { font-family: var(--display); font-weight: 800; font-size: 15px; }
.price-mrp { color: var(--ink-4); text-decoration: line-through; font-weight: 500; font-size: 13px; }
.price-off { color: var(--ok); font-weight: 700; font-size: 12.5px; }

/* ---------- star rating ---------- */
.stars { display: inline-flex; gap: 1px; color: var(--star); font-size: 12px; letter-spacing: -.5px; }
.stars.dim { color: var(--line); }

/* ---------- skeleton loading ---------- */
.sk {
  background: linear-gradient(90deg, #f2f2f2 25%, #e9e9e9 37%, #f2f2f2 63%);
  background-size: 400% 100%;
  animation: sk 1.2s ease-in-out infinite;
  border-radius: var(--radius);
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- toast ---------- */
#toasts {
  position: fixed; z-index: 9999; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; box-shadow: var(--sh-3);
  animation: toastIn .22s ease both; max-width: 320px;
}
.toast.ok  { background: var(--ok); }
.toast.err { background: var(--err); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- scrollbar ---------- */
.scroll-x {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.scroll-x::-webkit-scrollbar { height: 4px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.no-bar { scrollbar-width: none; }
.no-bar::-webkit-scrollbar { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
