﻿/* ============================================================
   HAVIT — design tokens
   ============================================================ */
:root {
  /* Brand */
  --red: #DC3D2C;
  --red-600: #C5301F;
  --red-700: #A6271A;
  --red-soft: #FDECE9;
  --red-tint: #FFF6F4;

  /* Ink / surfaces */
  --ink: #0B0B0E;
  --ink-2: #1A1A1F;
  --ink-3: #2C2C33;
  --muted: #6B6B73;
  --muted-2: #9A9AA3;
  --line: #ECECEE;
  --line-2: #DEDEE2;
  --bg: #FFFFFF;
  --surf: #F7F7F8;
  --surf-2: #F1F1F3;
  --night: #0E0E12;

  /* Type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;

  /* Radii / shadow */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(11,11,14,.04), 0 2px 8px rgba(11,11,14,.04);
  --shadow-2: 0 12px 40px -12px rgba(11,11,14,.18);
  --shadow-red: 0 10px 30px -10px rgba(220,61,44,.4);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-size: var(--text-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ============================================================
   Layout
   ============================================================ */
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 18px; } }

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  background: var(--ink);
  color: #fff;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.topbar__msg { display: flex; align-items: center; gap: 10px; }
.topbar__msg .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.topbar__links { display: flex; gap: 22px; font-size: var(--text-xs); }
.topbar__links a { opacity: .8; }
.topbar__links a:hover { opacity: 1; color: var(--red); }
@media (max-width: 720px) { .topbar__links { display: none; } }

/* ============================================================
   Header / nav
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 92px; height: 30px; background: var(--red); border-radius: 4px; display: grid; place-items: center; }
.brand__mark span { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: var(--text-lg); letter-spacing: 0.18em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 10px 14px;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-sm);
  transition: background .15s ease, color .15s ease;
  position: relative;
}
.nav a:hover { background: var(--surf); color: var(--ink); }
.nav a.is-active { color: var(--red); }
.nav a.has-menu::after {
  content: "";
  width: 6px; height: 6px;
  display: inline-block; vertical-align: middle;
  margin-left: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .5;
}

.actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: background .15s ease;
  position: relative;
}
.icon-btn:hover { background: var(--surf); }
.icon-btn svg { width: 20px; height: 20px; stroke-width: 1.6; }
.icon-btn .badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--red); color: #fff;
  font-size: var(--text-2xs); font-weight: 700;
  display: grid; place-items: center;
  border: 2px solid #fff;
}

/* Search */
.search-mini {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  background: var(--surf);
  border-radius: var(--r-full);
  width: 240px;
  color: var(--muted);
  font-size: var(--text-sm);
  transition: background .15s ease, width .2s ease;
}
.search-mini:hover { background: var(--surf-2); }
.search-mini svg { width: 16px; height: 16px; }
.search-mini kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
  color: var(--muted);
}

@media (max-width: 1000px) {
  .nav, .search-mini, .topbar { display: none; }
  .header__inner { grid-template-columns: auto auto; justify-content: space-between; }
  .header__inner .actions { gap: 4px; }
}

/* ============================================================
   Mobile bottom nav
   ============================================================ */
.mob-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  z-index: 60;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.mob-nav__inner { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.mob-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px;
  font-size: var(--text-2xs);
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--r-sm);
  position: relative;
}
.mob-nav a svg { width: 22px; height: 22px; stroke-width: 1.6; }
.mob-nav a.is-active { color: var(--red); }
.mob-nav a .badge {
  position: absolute;
  top: 4px; right: 50%; transform: translateX(14px);
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  background: var(--red); color: #fff;
  font-size: var(--text-2xs); font-weight: 700;
  display: grid; place-items: center;
}
@media (max-width: 1000px) {
  .mob-nav { display: block; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 22px; height: 48px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: 0.01em;
  border-radius: var(--r-full);
  transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .2s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-600); box-shadow: var(--shadow-red); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-3); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--outline { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn--outline:hover { background: var(--red); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { height: 36px; padding: 0 14px; font-size: var(--text-sm); }
.btn--lg { height: 56px; padding: 0 30px; font-size: var(--text-md); }

/* ============================================================
   Section / common
   ============================================================ */
.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }
@media (max-width: 720px) { .section { padding: 48px 0; } .section--tight { padding: 36px 0; } }

.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.section__title { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.02em; }
.section__sub { color: var(--muted); font-size: var(--text-base); margin-top: 6px; }
.section__more { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 600; color: var(--ink); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.section__more:hover { color: var(--red); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--red);
  font-weight: 500;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--red); }

/* ============================================================
   Product card
   ============================================================ */
.card-prod {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .2s ease, transform .25s ease, box-shadow .25s ease;
}
.card-prod:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.card-prod__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surf);
  display: grid; place-items: center;
  overflow: hidden;
}
.card-prod__media img {
  width: 80%; height: 80%; object-fit: contain;
  transition: transform .4s ease;
  mix-blend-mode: multiply;
}
.card-prod:hover .card-prod__media img { transform: scale(1.05); }
.card-prod__wishlist {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: color .15s ease, background .15s ease;
}
.card-prod__wishlist:hover { background: #fff; color: var(--red); }
.card-prod__wishlist svg { width: 16px; height: 16px; }
.card-prod__tag {
  position: absolute; top: 12px; left: 12px;
  background: #fff;
  color: var(--ink);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.card-prod__tag--red { background: var(--red); color: #fff; border-color: var(--red); }
.card-prod__tag--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-prod__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.card-prod__cat { font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.card-prod__title { font-family: var(--font-body); font-size: var(--text-base); font-weight: 600; color: var(--ink); line-height: 1.35; min-height: 38px; }
.card-prod__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.card-prod__price { display: flex; align-items: baseline; gap: 8px; }
.card-prod__price .now { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; color: var(--ink); }
.card-prod__price .was { font-size: var(--text-sm); color: var(--muted); text-decoration: line-through; }
.card-prod__rating { display: flex; align-items: center; gap: 3px; font-size: var(--text-xs); color: var(--muted); }
.card-prod__rating svg { width: 12px; height: 12px; color: #FFB23F; fill: currentColor; }
.card-prod__add {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid; place-items: center;
  transition: background .15s ease, transform .15s ease;
}
.card-prod__add:hover { background: var(--red); transform: rotate(90deg); }
.card-prod__add svg { width: 16px; height: 16px; stroke-width: 2; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--night);
  color: #fff;
  padding: 80px 0 32px;
  margin-top: 80px;
}
.footer a:hover { color: var(--red); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 56px;
}
.footer__brand { max-width: 360px; }
.footer__mark {
  width: 110px; height: 36px;
  background: var(--red);
  border-radius: 5px;
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.footer__mark span { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); letter-spacing: 0.18em; }
.footer__tag { color: rgba(255,255,255,.65); font-size: var(--text-base); margin-bottom: 24px; }
.footer__socials { display: flex; gap: 8px; }
.footer__socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: grid; place-items: center;
  transition: background .15s ease;
}
.footer__socials a:hover { background: var(--red); color: #fff; }
.footer__socials svg { width: 16px; height: 16px; }
.footer__col h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: #fff;
  margin-bottom: 18px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 12px; }
.footer__col a { font-size: var(--text-sm); color: rgba(255,255,255,.6); transition: color .15s ease; }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  font-size: var(--text-sm);
}
.footer__bottom-links { display: flex; gap: 20px; }
@media (max-width: 1000px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ============================================================
   Utilities
   ============================================================ */
.divider { height: 1px; background: var(--line); border: none; }
.scroll-x { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { scroll-snap-align: start; flex-shrink: 0; }

.fade-in { opacity: 0; transform: translateY(12px); animation: fade-in .6s ease forwards; }
@keyframes fade-in { to { opacity: 1; transform: none; } }

/* ============================================================
   Mobile globals — overrides that apply across every page
   ============================================================ */
@media (max-width: 720px) {
  /* iOS not-zoom-on-focus: inputs must be >= 16px */
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
}

/* Generous tap area around small checkboxes/radios without changing their visual size */
.check-row, .auth__check, label.check-row { min-height: 40px; padding: 6px 0; }

