:root {
  color-scheme: dark;
  --bg: #030914;
  --panel: #07111e;
  --panel-2: #091827;
  --text: #f7fbff;
  --muted: #92a8b8;
  --cyan: #00dff4;
  --blue: #008eff;
  --green: #35ef5a;
  --lime: #20ef45;
  --line: rgba(85, 184, 218, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: #020812;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, #0a1b35 0%, #041126 34%, #020713 72%);
  transition: opacity .45s ease, visibility .45s ease;
}
.splash img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 24px var(--cyan)) drop-shadow(0 0 38px var(--green));
  animation: splashGlow 1.15s ease-in-out infinite alternate;
}
.splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes splashGlow { from { transform: scale(.96); } to { transform: scale(1.04); } }

.app { width: 100%; min-height: 100vh; padding-bottom: 78px; background: linear-gradient(180deg, #020812 0%, #06101b 60%, #02070d 100%); }
.legacy-header { position: relative; z-index: 50; background: #030a14; box-shadow: 0 9px 30px rgba(0,0,0,.28); }

.status-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px 7px;
  color: #e9f6fb;
  font-size: .78rem;
  font-weight: 750;
}
.status-row .product-count b { color: var(--green); text-shadow: 0 0 9px rgba(53,239,90,.5); }
.status-row a { font-weight: 850; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

.brand-row {
  min-height: 92px;
  display: grid;
  grid-template-columns: 62px minmax(0,1fr) 62px;
  align-items: center;
  gap: 14px;
  padding: 7px 18px 12px;
}
.legacy-logo { display: flex; justify-content: center; }
.legacy-logo img { width: min(220px, 100%); height: auto; filter: drop-shadow(0 0 14px rgba(0,205,255,.27)); }
.round-action {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0,208,255,.23);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(4,23,38,.95), rgba(2,10,18,.95));
  color: #e9faff;
  box-shadow: inset 0 0 22px rgba(0,191,255,.035), 0 0 18px rgba(0,174,255,.06);
  cursor: pointer;
}
.round-action svg { width: 27px; height: 27px; }
.cart-action { color: var(--green); border-color: rgba(53,239,90,.27); }

.quick-search { padding: 0 18px 13px; position: relative; }
.quick-search input {
  width: 100%;
  min-height: 50px;
  padding: 0 48px 0 16px;
  border: 1px solid rgba(0,221,244,.28);
  border-radius: 14px;
  outline: 0;
  background: #071522;
  color: white;
  box-shadow: 0 0 0 3px rgba(0,221,244,.035);
}
.quick-search input:focus { border-color: rgba(0,221,244,.7); }
.quick-search button {
  position: absolute;
  top: 5px;
  right: 23px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #9fb2bf;
  font-size: 1.5rem;
  cursor: pointer;
}

.legacy-tabs {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: linear-gradient(90deg, #16ef42, #2cff43 50%, #12e93e);
  color: #04120b;
  box-shadow: 0 6px 24px rgba(20,242,65,.18);
}
.legacy-tabs::-webkit-scrollbar { display: none; }
.legacy-tabs a {
  flex: 0 0 auto;
  min-height: 55px;
  display: grid;
  place-items: center;
  padding: 0 24px;
  border-right: 1px solid rgba(0,0,0,.08);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .075em;
  white-space: nowrap;
}
.legacy-tabs a.is-active { background: rgba(255,255,255,.08); box-shadow: inset 0 -4px 0 #001b0c; }

.legacy-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #042a82;
  border-bottom: 1px solid rgba(0,213,255,.2);
}
.legacy-hero img { width: 100%; height: auto; object-fit: cover; }
.hero-hit { position: absolute; inset: 0; }

.catalog-section { width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 34px 0 22px; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 7px; }
.catalog-heading span { color: var(--cyan); font-size: .68rem; font-weight: 900; letter-spacing: .15em; }
.catalog-heading h1 { margin: 6px 0 0; font-size: clamp(1.45rem, 5vw, 2.1rem); }
.catalog-heading > strong { color: var(--green); font-size: 2.25rem; line-height: 1; text-shadow: 0 0 18px rgba(53,239,90,.25); }
.sync-state { min-height: 20px; margin: 0 0 18px; color: #77909f; font-size: .76rem; }
.sync-state.is-live { color: #98eab0; }
.sync-state.is-fallback { color: #e5c67b; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(0,194,239,.16);
  border-radius: 18px;
  background: linear-gradient(180deg, #091827, #06111d);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.product-card__image { aspect-ratio: 1/1; display: grid; place-items: center; padding: 12px; background: #f7fafc; }
.product-card__image img { width: 100%; height: 100%; object-fit: contain; }
.product-card__body { padding: 12px; }
.product-card h2 { min-height: 44px; margin: 0 0 10px; font-size: .85rem; line-height: 1.3; }
.product-card__price { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-card__price strong { color: var(--green); font-size: 1.05rem; }
.product-card__price span { color: #8296a2; font-size: .67rem; }
.product-card__button { min-height: 38px; display: grid; place-items: center; margin-top: 11px; border-radius: 10px; background: linear-gradient(100deg, #00bfe9, #2cec63); color: #001016; font-size: .72rem; font-weight: 950; }
.loading-card, .empty-card { grid-column: 1/-1; padding: 34px 18px; border: 1px dashed rgba(0,210,255,.24); border-radius: 18px; color: #88a3b2; text-align: center; }

.load-more {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 1px solid rgba(53,239,90,.25);
  border-radius: 13px;
  background: rgba(12,50,31,.4);
  color: #dfffe7;
  font-weight: 850;
  cursor: pointer;
}
.catalog-footer { display: grid; gap: 8px; margin: 22px 0 8px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(4,17,29,.76); }
.catalog-footer a { color: var(--cyan); font-weight: 850; }
.catalog-footer small { color: #7c939f; line-height: 1.45; }

.bottom-dock {
  position: fixed;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 10px;
  z-index: 120;
  min-height: 62px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  border: 1px solid rgba(0,199,241,.2);
  border-radius: 20px;
  background: rgba(2,10,17,.94);
  box-shadow: 0 16px 40px rgba(0,0,0,.48);
  backdrop-filter: blur(18px);
}
.bottom-dock a, .bottom-dock button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: #9cb0bc;
  cursor: pointer;
}
.bottom-dock span { color: #d7f8ff; font-size: 1.15rem; }
.bottom-dock small { font-size: .62rem; }
.bottom-dock .active small, .bottom-dock .active span { color: var(--green); }

@media (min-width: 720px) {
  .app { width: min(100%, 1180px); margin: 0 auto; border-inline: 1px solid rgba(0,205,255,.08); }
  .status-row { padding-inline: 28px; }
  .brand-row { grid-template-columns: 68px 1fr 68px; padding-inline: 28px; }
  .legacy-logo img { width: 240px; }
  .legacy-tabs a { flex: 1 0 auto; }
  .legacy-hero { border-radius: 0 0 26px 26px; }
  .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
  .bottom-dock { left: 50%; width: min(640px, calc(100% - 20px)); transform: translateX(-50%); }
}

@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .legacy-hero { max-height: 670px; }
  .legacy-hero img { height: 100%; object-fit: cover; }
}

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