/* =========================================================
   NovaTech Shop — Stylesheet
   ========================================================= */

:root {
  --bg: #0a0c11;
  --bg-alt: #0e1118;
  --surface: #141822;
  --surface-2: #1a1f2b;
  --surface-3: #202634;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf6;
  --text-dim: #a7b0c4;
  --muted: #6f7a90;
  --accent: #5b8cff;
  --accent-2: #00d4ff;
  --accent-grad: linear-gradient(120deg, #5b8cff 0%, #00d4ff 100%);
  --violet: #8b7cf6;
  --hot: #ff5470;
  --gold: #ffb454;
  --green: #35d6a4;
  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 20px 60px -24px rgba(91, 140, 255, 0.55);
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Announcement bar ---------------- */
.topbar {
  background: linear-gradient(90deg, #131a2b, #16203a 45%, #131a2b);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}
.topbar__links { display: flex; gap: 20px; }
.topbar__links a:hover { color: var(--accent-2); }

/* ---------------- Header ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 12, 17, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo__img { height: 40px; width: auto; max-width: none; }
.logo picture { display: flex; align-items: center; }
@media (max-width: 720px) { .logo__img { height: 44px; } }

/* Search */
.search {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 6px 0 16px;
  height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within {
  border-color: rgba(91, 140, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.12);
}
.search__icon { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14.5px;
  padding: 0 12px;
  height: 100%;
}
.search input::placeholder { color: var(--muted); }
.search__btn {
  height: 34px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #06101f;
  font-weight: 700;
  font-size: 14px;
  transition: filter 0.2s, transform 0.15s;
}
.search__btn:hover { filter: brightness(1.1); }
.search__btn:active { transform: scale(0.97); }

.search__suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  max-height: 320px;
  overflow: auto;
  z-index: 80;
}
.search__suggest button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14px;
  text-align: left;
  color: var(--text-dim);
}
.search__suggest button:hover { background: var(--surface-3); color: var(--text); }
.search__suggest .sug-price { margin-left: auto; color: var(--accent-2); font-weight: 600; }

/* Header actions */
.header__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--text-dim);
  transition: background 0.2s, color 0.2s;
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.badge-count {
  position: absolute;
  top: 3px; right: 2px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--hot);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  transform: scale(0);
  transition: transform 0.25s var(--ease);
}
.badge-count.show { transform: scale(1); }
.nav-toggle { display: none; }

/* Navigation */
.nav { border-top: 1px solid var(--border); }
.nav__inner { display: flex; align-items: center; gap: 6px; height: 48px; }
.nav__link {
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 14.5px;
  color: var(--text-dim);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav__link:hover { background: var(--surface-2); color: var(--text); }
.nav__link.is-active { color: var(--accent-2); background: rgba(0, 212, 255, 0.08); }
.nav__link--hot { color: var(--gold); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s var(--ease), filter 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent-grad); color: #06101f; box-shadow: var(--shadow-glow); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.3); }
.btn--outline { border: 1px solid var(--border-strong); color: var(--text-dim); }
.btn--outline:hover { color: var(--text); border-color: var(--accent); }
.btn--block { width: 100%; }

/* ---------------- Hero carousel ---------------- */
.hero { padding: 28px 0 8px; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.carousel {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 420px;
}
.carousel__track { display: flex; height: 100%; transition: transform 0.6s var(--ease); }
.slide {
  position: relative;
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 20px;
  padding: 46px 54px;
  min-height: 420px;
  overflow: hidden;
}
.slide__bg { position: absolute; inset: 0; z-index: 0; }
.slide--1 .slide__bg {
  background:
    radial-gradient(700px 380px at 12% 15%, rgba(91, 140, 255, 0.28), transparent 65%),
    radial-gradient(600px 400px at 92% 88%, rgba(0, 212, 255, 0.18), transparent 60%),
    linear-gradient(135deg, #131a2e 0%, #0d1220 100%);
}
.slide--2 .slide__bg {
  background:
    radial-gradient(700px 380px at 10% 20%, rgba(0, 212, 255, 0.24), transparent 65%),
    radial-gradient(560px 380px at 95% 85%, rgba(53, 214, 164, 0.16), transparent 60%),
    linear-gradient(135deg, #0e1c26 0%, #0b1220 100%);
}
.slide--3 .slide__bg {
  background:
    radial-gradient(700px 380px at 14% 18%, rgba(139, 124, 246, 0.3), transparent 65%),
    radial-gradient(560px 380px at 92% 86%, rgba(255, 84, 112, 0.16), transparent 60%),
    linear-gradient(135deg, #1a1430 0%, #0d1020 100%);
}
.slide__content { position: relative; z-index: 2; max-width: 520px; }
.slide__tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(91, 140, 255, 0.18);
  color: #9dbaff;
  border: 1px solid rgba(91, 140, 255, 0.35);
  margin-bottom: 16px;
}
.slide__tag--cyan { background: rgba(0, 212, 255, 0.15); color: #7ee6ff; border-color: rgba(0, 212, 255, 0.35); }
.slide__tag--violet { background: rgba(139, 124, 246, 0.18); color: #c0b4ff; border-color: rgba(139, 124, 246, 0.38); }

.slide__title { font-size: clamp(26px, 3.1vw, 40px); letter-spacing: -0.025em; }
.slide__title em {
  font-style: normal;
  display: block;
  font-size: 0.62em;
  font-weight: 600;
  color: var(--accent-2);
  margin-top: 6px;
  letter-spacing: 0;
}
.slide__desc { color: var(--text-dim); margin-top: 14px; font-size: 14.5px; max-width: 460px; }
.slide__price { display: flex; align-items: baseline; gap: 12px; margin-top: 18px; }
.slide__price strong { font-size: 28px; font-weight: 800; }
.slide__price del { color: var(--muted); font-size: 15px; }
.slide__save {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--hot);
  background: rgba(255, 84, 112, 0.12);
  padding: 3px 9px;
  border-radius: 6px;
}
.slide__actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.slide__art { position: relative; z-index: 1; }
.slide__art svg { width: 100%; height: auto; filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.5)); }

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(14, 17, 24, 0.72);
  border: 1px solid var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s, background 0.2s, transform 0.2s;
}
.carousel__arrow svg { width: 20px; height: 20px; }
.carousel:hover .carousel__arrow { opacity: 1; }
.carousel__arrow:hover { background: var(--accent); color: #06101f; }
.carousel__arrow--prev { left: 14px; }
.carousel__arrow--next { right: 14px; }

.carousel__dots {
  position: absolute;
  bottom: 20px; left: 54px;
  z-index: 5;
  display: flex;
  gap: 8px;
}
.carousel__dots button {
  width: 9px; height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  transition: width 0.3s var(--ease), background 0.3s;
}
.carousel__dots button.is-active { width: 30px; background: var(--accent-grad); }

.carousel__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 5;
}
.carousel__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent-grad);
}

/* Carousel side cards */
.hero__side { display: flex; flex-direction: column; gap: 14px; }
.side-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 18px;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.side-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.side-card--flash {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(300px 200px at 90% 0%, rgba(255, 84, 112, 0.25), transparent 70%),
    linear-gradient(160deg, #241726, #141822);
  border-color: rgba(255, 84, 112, 0.3);
}
.side-card__label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--hot); text-transform: uppercase;
}
.side-card__title { font-size: 19px; font-weight: 700; margin-top: 6px; }
.side-card__mini {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 24px;
  font-weight: 700;
  color: #ffd9e0;
  margin-top: 10px;
  letter-spacing: 0.02em;
}
.side-card__cta { margin-top: 12px; font-size: 13.5px; color: var(--hot); font-weight: 600; }
.side-card--trade, .side-card--ship { display: flex; align-items: center; gap: 14px; }
.side-card__icon { font-size: 24px; }
.side-card__sub { font-size: 13px; color: var(--muted); }
.side-card--trade { background: linear-gradient(140deg, #141c2b, #141822); }
.side-card--ship { background: linear-gradient(140deg, #1b1a13, #141822); }

/* ---------------- Sections ---------------- */
.section { padding: 64px 0; }
section[id] { scroll-margin-top: 132px; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.section__title { font-size: clamp(22px, 2.4vw, 30px); }
.section__title::after {
  content: "";
  display: block;
  width: 44px; height: 3px;
  border-radius: 3px;
  background: var(--accent-grad);
  margin-top: 12px;
}
.section__sub { color: var(--muted); font-size: 14px; margin-top: 10px; }
.link-more { color: var(--accent-2); font-size: 14.5px; font-weight: 600; }
.link-more:hover { text-decoration: underline; }

/* ---------------- Categories ---------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(160px 90px at 50% 0%, rgba(91, 140, 255, 0.22), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.cat-card:hover { transform: translateY(-5px); border-color: rgba(91, 140, 255, 0.5); }
.cat-card:hover::before { opacity: 1; }
.cat-card__icon {
  position: relative;
  width: 66px; height: 66px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: linear-gradient(150deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--border);
  color: var(--accent-2);
  transition: transform 0.3s var(--ease), color 0.3s, border-color 0.3s;
}
.cat-card__icon svg { width: 36px; height: 36px; }
.cat-card:hover .cat-card__icon {
  transform: scale(1.06) rotate(-4deg);
  border-color: rgba(0, 212, 255, 0.45);
}
.cat-card__name { position: relative; font-size: 15px; font-weight: 600; }
.cat-card__count { position: relative; font-size: 12.5px; color: var(--muted); }

/* ---------------- Product filter tabs ---------------- */
.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.tab {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-dim);
  transition: background 0.2s, color 0.2s;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--accent-grad); color: #06101f; font-weight: 700; }

/* ---------------- Product cards ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.28s var(--ease), border-color 0.28s, box-shadow 0.28s;
  animation: cardIn 0.45s var(--ease) backwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(91, 140, 255, 0.45);
  box-shadow: var(--shadow);
}
.product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(220px 140px at 50% 20%, rgba(91, 140, 255, 0.14), transparent 70%),
    linear-gradient(160deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
  padding: 18px;
}
.product-card__media svg { width: 74%; height: auto; max-height: 130px; }
.product-card__badges {
  position: absolute;
  top: 12px; left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.badge {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge--hot { background: var(--hot); color: #fff; }
.badge--new { background: var(--accent-grad); color: #06101f; }
.badge--sale { background: var(--gold); color: #241701; }
.badge--out { background: var(--surface-3); color: var(--muted); }

.wish-btn {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(10, 12, 17, 0.6);
  border: 1px solid var(--border);
  color: var(--text-dim);
  backdrop-filter: blur(6px);
  transition: color 0.2s, transform 0.2s, background 0.2s;
}
.wish-btn svg { width: 17px; height: 17px; }
.wish-btn:hover { transform: scale(1.1); color: var(--hot); }
.wish-btn.is-active { color: var(--hot); background: rgba(255, 84, 112, 0.16); }
.wish-btn.is-active svg { fill: var(--hot); }

.product-card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.product-card__cat { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.product-card__name {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 45px;
}
.product-card__rating { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.stars { display: flex; gap: 1.5px; color: var(--gold); }
.stars svg { width: 13px; height: 13px; }
.product-card__price { display: flex; align-items: baseline; gap: 9px; margin-top: auto; padding-top: 6px; }
.product-card__price strong { font-size: 19px; font-weight: 800; }
.product-card__price del { font-size: 13px; color: var(--muted); }
.product-card__stock { font-size: 12px; color: var(--green); }
.product-card__stock.low { color: var(--gold); }
.product-card__stock.out { color: var(--muted); }

.product-card__actions { display: flex; gap: 8px; margin-top: 12px; }
.add-btn {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.add-btn:hover { background: var(--accent-grad); border-color: transparent; color: #06101f; }
.add-btn:active { transform: scale(0.97); }
.add-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.add-btn:disabled:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }

.load-more { display: flex; justify-content: center; margin-top: 36px; }

/* ---------------- Promotion ---------------- */
.promo { padding: 70px 0; }
.promo__banner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 46px 52px;
  border-radius: var(--radius-l);
  border: 1px solid rgba(255, 84, 112, 0.24);
  overflow: hidden;
  background:
    radial-gradient(720px 340px at 8% 10%, rgba(255, 84, 112, 0.22), transparent 62%),
    radial-gradient(600px 320px at 96% 96%, rgba(139, 124, 246, 0.2), transparent 60%),
    linear-gradient(130deg, #1b1420 0%, #0f1320 100%);
}
.promo__banner::after {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 84, 0.18), transparent 70%);
  pointer-events: none;
}
.promo__tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 84, 112, 0.16);
  border: 1px solid rgba(255, 84, 112, 0.4);
  color: #ff9db0;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 16px;
}
.promo__title { font-size: clamp(24px, 3vw, 36px); }
.promo__desc { color: var(--text-dim); margin-top: 12px; max-width: 480px; }

.countdown { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.countdown__unit {
  min-width: 72px;
  padding: 10px 8px;
  border-radius: var(--radius-s);
  background: rgba(10, 12, 17, 0.6);
  border: 1px solid var(--border-strong);
  text-align: center;
}
.countdown__unit strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  color: #fff;
}
.countdown__unit span { font-size: 12px; color: var(--muted); }
.countdown__sep { font-size: 22px; font-weight: 700; color: var(--muted); }

.promo__actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.promo__right { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 18px; }
.promo__progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 9px;
}
.promo__bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.promo__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hot), var(--gold));
  animation: barGrow 1.4s var(--ease) both;
}
@keyframes barGrow { from { width: 0 !important; } }
.promo__stock {
  font-size: 14px;
  color: var(--text-dim);
  padding: 14px 16px;
  border-radius: var(--radius-s);
  background: rgba(10, 12, 17, 0.45);
  border: 1px solid var(--border);
}
.promo__stock strong { color: var(--gold); }

.promo__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.promo-card {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.28s var(--ease), border-color 0.28s;
}
.promo-card:hover { transform: translateY(-5px); }
.promo-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
}
.promo-card--student::before { background: linear-gradient(90deg, #5b8cff, #00d4ff); }
.promo-card--bundle::before { background: linear-gradient(90deg, #8b7cf6, #ff5470); }
.promo-card--service::before { background: linear-gradient(90deg, #35d6a4, #ffb454); }
.promo-card--student:hover { border-color: rgba(91, 140, 255, 0.5); }
.promo-card--bundle:hover { border-color: rgba(139, 124, 246, 0.5); }
.promo-card--service:hover { border-color: rgba(53, 214, 164, 0.5); }
.promo-card__kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
.promo-card h3 { font-size: 19px; margin-top: 8px; }
.promo-card p { color: var(--text-dim); font-size: 14px; margin-top: 8px; }
.promo-card__link { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--accent-2); }
.promo-card:hover .promo-card__link { text-decoration: underline; }

/* ---------------- Service promises ---------------- */
.services { padding: 52px 0; }
.services__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.service {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.service__icon { font-size: 26px; }
.service strong { display: block; font-size: 15px; }
.service small { color: var(--muted); font-size: 13px; }

/* ---------------- Footer ---------------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding-top: 54px; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
}
.logo--footer { margin-bottom: 14px; }
.logo--footer .logo__img { height: 34px; }
.footer__brand p { color: var(--muted); font-size: 14px; max-width: 340px; }
.footer__pay { margin-top: 16px; font-size: 12.5px; color: var(--muted); letter-spacing: 0.03em; }
.footer__col h4 { font-size: 14.5px; margin-bottom: 14px; }
.footer__col a { display: block; color: var(--muted); font-size: 14px; padding: 5px 0; transition: color 0.2s, transform 0.2s; }
.footer__col a:hover { color: var(--accent-2); transform: translateX(3px); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ---------------- Cart drawer ---------------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 90;
}
.drawer-mask.show { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  width: 400px;
  max-width: 92vw;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border-strong);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
}
.drawer.show { transform: none; }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.drawer__head h3 { font-size: 17px; }
.drawer__head span { color: var(--muted); font-weight: 500; }
.drawer__close {
  width: 34px; height: 34px;
  border-radius: 9px;
  color: var(--text-dim);
  font-size: 16px;
}
.drawer__close:hover { background: var(--surface-2); color: var(--text); }
.drawer__body { flex: 1; overflow: auto; padding: 16px 22px; }
.drawer__empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 14px; }
.drawer__empty span { display: block; font-size: 40px; margin-bottom: 12px; }

.cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item__thumb {
  width: 66px; height: 66px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  padding: 6px;
}
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name { font-size: 14px; font-weight: 600; line-height: 1.4; }
.cart-item__price { font-size: 13.5px; color: var(--accent-2); font-weight: 700; margin-top: 4px; }
.cart-item__qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-item__qty button {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1;
}
.cart-item__qty button:hover { color: var(--text); border-color: var(--border-strong); }
.cart-item__qty span { min-width: 22px; text-align: center; font-size: 14px; }
.cart-item__del { align-self: flex-start; color: var(--muted); font-size: 12.5px; }
.cart-item__del:hover { color: var(--hot); }

.drawer__foot { padding: 20px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.drawer__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.drawer__total strong { font-size: 22px; font-weight: 800; }
.drawer__note { display: block; text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 10px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 26px);
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.35s var(--ease), visibility 0.3s;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__side { flex-direction: row; }
  .side-card { flex: 1; }
  .side-card--flash { min-height: 140px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  section[id] { scroll-margin-top: 176px; }
  .header__inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; }
  .nav-toggle { display: grid; }
  .nav { max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease); }
  .nav.open { max-height: 340px; }
  .nav__inner { flex-direction: column; align-items: stretch; height: auto; padding: 8px 24px 16px; }
  .nav__link { padding: 11px 14px; }
  .slide { grid-template-columns: 1fr; padding: 34px 26px 62px; min-height: 480px; }
  .slide__art { order: -1; max-width: 260px; margin: 0 auto; }
  .carousel__dots { left: 26px; }
  .promo__banner { grid-template-columns: 1fr; padding: 32px 26px; gap: 26px; }
  .promo__cards { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .topbar__links { display: none; }
  .hero__side { flex-direction: column; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .countdown__unit { min-width: 58px; }
  .countdown__unit strong { font-size: 21px; }
  .search__btn { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =========================================================
   Pre-owned store components
   ========================================================= */

/* ---------------- Condition pills ---------------- */
.grade-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.grade-pill--new { color: #7ee6ff; background: rgba(0, 212, 255, 0.12); border-color: rgba(0, 212, 255, 0.35); }
.grade-pill--pristine { color: #7ff0c8; background: rgba(53, 214, 164, 0.12); border-color: rgba(53, 214, 164, 0.35); }
.grade-pill--excellent { color: #a8c1ff; background: rgba(91, 140, 255, 0.14); border-color: rgba(91, 140, 255, 0.38); }
.grade-pill--verygood { color: #c0b4ff; background: rgba(139, 124, 246, 0.14); border-color: rgba(139, 124, 246, 0.38); }
.grade-pill--good { color: #ffd39b; background: rgba(255, 180, 84, 0.13); border-color: rgba(255, 180, 84, 0.36); }

/* ---------------- Condition grade guide ---------------- */
.grade-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.grade-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.grade-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.grade-card--new::before { background: linear-gradient(90deg, #00d4ff, #5b8cff); }
.grade-card--pristine::before { background: linear-gradient(90deg, #35d6a4, #00d4ff); }
.grade-card--excellent::before { background: linear-gradient(90deg, #5b8cff, #8b7cf6); }
.grade-card--verygood::before { background: linear-gradient(90deg, #8b7cf6, #ff5470); }
.grade-card--good::before { background: linear-gradient(90deg, #ffb454, #ff5470); }
.grade-card--new:hover { border-color: rgba(0, 212, 255, 0.45); transform: translateY(-4px); }
.grade-card--pristine:hover { border-color: rgba(53, 214, 164, 0.45); transform: translateY(-4px); }
.grade-card--excellent:hover { border-color: rgba(91, 140, 255, 0.45); transform: translateY(-4px); }
.grade-card--verygood:hover { border-color: rgba(139, 124, 246, 0.45); transform: translateY(-4px); }
.grade-card--good:hover { border-color: rgba(255, 180, 84, 0.45); transform: translateY(-4px); }

.grade-card__head { display: flex; align-items: center; gap: 9px; }
.grade-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.grade-dot--new { background: #00d4ff; box-shadow: 0 0 12px rgba(0, 212, 255, 0.7); }
.grade-dot--pristine { background: #35d6a4; box-shadow: 0 0 12px rgba(53, 214, 164, 0.7); }
.grade-dot--excellent { background: #5b8cff; box-shadow: 0 0 12px rgba(91, 140, 255, 0.7); }
.grade-dot--verygood { background: #8b7cf6; box-shadow: 0 0 12px rgba(139, 124, 246, 0.7); }
.grade-dot--good { background: #ffb454; box-shadow: 0 0 12px rgba(255, 180, 84, 0.7); }
.grade-card__name { font-size: 16px; font-weight: 700; }
.grade-card__save {
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-2);
}
.grade-card--good .grade-card__save { color: var(--gold); }
.grade-card--pristine .grade-card__save { color: var(--green); }
.grade-card--verygood .grade-card__save { color: var(--violet); }
.grade-card__desc {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
  flex: 1;
}
.grade-card__foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
}

.grade-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(91, 140, 255, 0.28);
  background: rgba(91, 140, 255, 0.07);
}
.grade-note__icon { font-size: 22px; line-height: 1.3; flex-shrink: 0; }
.grade-note p { font-size: 14px; color: var(--text-dim); }
.grade-note strong { color: var(--text); }

/* ---------------- Refurb process steps ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  position: relative;
  padding: 26px 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.step:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.step__num {
  display: block;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step__title { margin-top: 14px; font-size: 16px; }
.step__text { margin-top: 9px; font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }
.steps__note {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-s);
  background: rgba(255, 180, 84, 0.08);
  border: 1px solid rgba(255, 180, 84, 0.25);
  color: var(--text-dim);
  font-size: 13.5px;
}

/* ---------------- Filter rows ---------------- */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.filter-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.filter-row__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 82px;
}
.tabs--cond .tab { padding: 6px 15px; font-size: 13.5px; }

/* ---------------- Product card: condition & meta ---------------- */
.product-card__tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.product-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  margin-top: 2px;
}
.meta-chip { color: var(--text-dim); }
.stock-line { color: var(--green); }
.stock-line.is-single { color: var(--gold); font-weight: 600; }
.stock-line.is-out { color: var(--muted); }

.save-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--hot);
  background: rgba(255, 84, 112, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.product-card__note {
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  border-left: 2px solid var(--border-strong);
  padding-left: 10px;
  margin: 2px 0 0;
}
.unit-tag {
  position: absolute;
  bottom: 10px;
  left: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(10, 12, 17, 0.72);
  border: 1px solid rgba(255, 180, 84, 0.42);
  color: var(--gold);
  backdrop-filter: blur(6px);
}

/* ---------------- Cart drawer additions ---------------- */
.cart-item__grade { display: flex; align-items: center; gap: 7px; margin-top: 6px; flex-wrap: wrap; }
.cart-item__single { font-size: 11px; font-weight: 700; color: var(--gold); }
.cart-item__limit { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.cart-item__qty button:disabled { opacity: 0.32; cursor: not-allowed; }
.cart-item__qty button:disabled:hover { color: var(--text-dim); border-color: var(--border); }

/* ---------------- Search suggestion condition chip ---------------- */
.search__suggest .sug-cond {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--surface-3);
  white-space: nowrap;
}
.search__suggest .sug-price { margin-left: 10px; }

/* ---------------- Side card / promo tweaks ---------------- */
.side-card--warranty { background: linear-gradient(140deg, #142320, #141822); }
.promo__stock--warn { border-color: rgba(255, 180, 84, 0.28); color: var(--gold); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .grade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .grade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row__label { min-width: 100%; }
  .grade-note { flex-direction: column; gap: 10px; }
}

@media (max-width: 560px) {
  .grade-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tabs--cond .tab { padding: 6px 12px; font-size: 13px; }
}
