:root {
  color-scheme: light;
  --navy: #06194c;
  --navy-deep: #031033;
  --blue: #0077ff;
  --cyan: #12cfff;
  --glass: rgba(243, 249, 255, .94);
  --ink: #1b2233;
  --muted: #6b7489;
  --line: #d9dee8;
  --media: #d3d3d3;
  --star: #f5b81c;
  --heart: #e5484d;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
  background: #eaf4ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  display: grid;
  place-items: start center;
  overflow-x: hidden;
}

/* ============ HERO (unchanged) ============ */
.site-shell {
  position: relative;
  width: 100vw;
  max-width: 2200px;
  aspect-ratio: 1676 / 939;
  isolation: isolate;
  background: #dfeeff;
  overflow: hidden;
}

.master-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  pointer-events: none;
}

.hotspot,
.search-hotspot {
  position: absolute;
  z-index: 5;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow .22s ease, background-color .22s ease, transform .22s ease;
}

.hotspot:hover,
.hotspot:focus-visible {
  box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 0 20px 6px rgba(0,126,255,.42);
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}

.logo { left: 2.4%; top: 1.1%; width: 22.3%; height: 6.5%; }
.categories { left: 25.8%; top: 1.8%; width: 9.1%; height: 5.5%; }
.cart { left: 67.3%; top: 1.6%; width: 3.5%; height: 5.8%; }
.alerts { left: 70.9%; top: 1.6%; width: 3.3%; height: 5.8%; }
.signin { left: 75.1%; top: 1.5%; width: 7.3%; height: 6%; }
.upload { left: 83.4%; top: 1.7%; width: 14.4%; height: 5.8%; }
.marketplace { left: 4.75%; top: 64%; width: 17.3%; height: 6.7%; }
.how-it-works { left: 22.75%; top: 64%; width: 12%; height: 6.7%; }
.feature-verified { left: 5.4%; top: 83.4%; width: 20.2%; height: 10%; }
.feature-payments { left: 28.2%; top: 83.4%; width: 20.2%; height: 10%; }
.feature-support { left: 51.2%; top: 83.4%; width: 20.2%; height: 10%; }
.feature-video { left: 74%; top: 83.4%; width: 22%; height: 10%; }

.search-hotspot {
  left: 35.2%;
  top: 1.9%;
  width: 30.8%;
  height: 5.3%;
  padding: 0 2.5%;
  font-size: clamp(12px, 1.05vw, 22px);
  color: transparent;
  caret-color: transparent;
  cursor: text;
}

.search-hotspot::placeholder { color: transparent; }

.search-hotspot:focus {
  color: var(--navy);
  caret-color: var(--blue);
  background: rgba(255,255,255,.97);
  box-shadow: 0 8px 34px rgba(1, 27, 72, .18), 0 0 0 2px rgba(0,119,255,.22);
}

.search-hotspot:focus::placeholder { color: #63708d; }

.menu {
  position: absolute;
  z-index: 20;
  left: 25.8%;
  top: 8.1%;
  width: min(300px, 22vw);
  padding: 12px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 18px;
  background: rgba(246, 251, 255, .96);
  box-shadow: 0 18px 55px rgba(2, 26, 68, .22);
  backdrop-filter: blur(22px) saturate(145%);
  transform: translateY(-8px) scale(.98);
  transform-origin: top;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}

.menu.open { opacity: 1; pointer-events: auto; transform: none; }

.menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.menu a:hover { background: #e4f3ff; color: #006bec; }

/* ============ CATALOG ============ */
.catalog {
  width: 100%;
  justify-self: stretch;
  background: #fff;
  border-top: 26px solid #f6f8fb;
  padding: 48px 20px 72px;
}

.catalog-inner {
  max-width: 1296px;
  margin: 0 auto;
}

.catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.catalog-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: -.01em;
}

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.filter-btn:hover { border-color: var(--navy); }

.filter-btn[aria-pressed="true"] {
  background: #212529;
  border-color: #212529;
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.product-card:hover {
  border-color: #b9c6dc;
  box-shadow: 0 10px 28px rgba(6, 25, 76, .10);
}

.product-card:focus-within { border-color: var(--blue); }

.product-media {
  display: grid;
  place-items: center;
  height: 200px;
  padding: 15px;
  background: var(--media);
}

.product-media img,
.product-media .placeholder {
  width: 171px;
  max-width: 70%;
  height: 170px;
  object-fit: contain;
  background: #fff;
}

.placeholder {
  display: grid;
  place-items: center;
  color: #9aa3b5;
}

.placeholder svg { width: 56px; height: 56px; }

.fav-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #8f8f8f;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
  transition: transform .15s ease, color .15s ease;
}

.fav-btn svg { width: 17px; height: 17px; }
.fav-btn:hover { transform: scale(1.08); }
.fav-btn[aria-pressed="true"] { color: var(--heart); }

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 16px 22px;
}

.product-title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.product-title a {
  color: inherit;
  text-decoration: none;
}

.product-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.product-title a:focus-visible { outline: none; }

.product-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.product-meta strong { color: var(--ink); font-weight: 700; }
.product-meta svg { width: 17px; height: 17px; color: var(--star); }

.product-price {
  margin: auto 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.catalog-more {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.more-btn {
  padding: 12px 28px;
  border: 1px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.more-btn:hover { background: var(--navy); color: #fff; }
.more-btn[hidden] { display: none; }

.empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

/* ============ FOOTER ============ */
.site-footer {
  width: 100%;
  justify-self: stretch;
  background: var(--navy);
  color: #c9d5ef;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.footer-top {
  max-width: 1296px;
  margin: 0 auto;
  padding: 64px 20px 44px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.brand-mark svg { width: 20px; height: 20px; color: #fff; }

.footer-brand p {
  max-width: 34ch;
  margin: 16px 0 24px;
  font-size: 14px;
  line-height: 1.6;
}

.newsletter label {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.newsletter-row {
  display: flex;
  max-width: 380px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  overflow: hidden;
}

.newsletter input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.newsletter input::placeholder { color: #8fa0c4; }

.newsletter button {
  margin: 4px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #086eff, #00a8ff);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.footer-col h3 {
  margin: 6px 0 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.footer-col a,
.footer-bottom a {
  color: #c9d5ef;
  font-size: 14px;
  text-decoration: none;
}

.footer-col a:hover,
.footer-bottom a:hover { color: #fff; text-decoration: underline; }

.contact-list li { font-size: 14px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
}

.footer-bottom-inner {
  max-width: 1296px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}

.legal-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
}

.socials a:hover { background: var(--blue); text-decoration: none; }
.socials svg { width: 17px; height: 17px; }

/* ============ SHARED UI ============ */
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  max-width: min(90vw, 520px);
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 999px;
  background: rgba(3, 23, 65, .92);
  box-shadow: 0 18px 55px rgba(1, 17, 52, .35), 0 0 35px rgba(0, 162, 255, .25);
  color: white;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  backdrop-filter: blur(18px);
  transform: translate(-50%, 150%);
  opacity: 0;
  transition: .3s ease;
}

.toast.show { transform: translate(-50%, 0); opacity: 1; }

.dialog {
  width: min(92vw, 520px);
  padding: 0;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 28px;
  background: rgba(248, 252, 255, .97);
  box-shadow: 0 35px 100px rgba(2, 22, 62, .4);
  color: var(--navy);
  overflow: hidden;
  backdrop-filter: blur(24px);
}

.dialog::backdrop { background: rgba(1, 12, 40, .5); backdrop-filter: blur(6px); }
.dialog-body { padding: 30px; }
.dialog h2 { margin: 0 0 10px; font-size: 26px; }
.dialog p { margin: 0 0 24px; color: #52607b; line-height: 1.55; }
.dialog-close {
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #086eff, #00a8ff);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.mobile-note {
  display: none;
  position: sticky;
  left: 0;
  bottom: 0;
  z-index: 30;
  width: 100vw;
  padding: 9px 14px;
  background: rgba(2,21,60,.9);
  color: white;
  font-size: 12px;
  text-align: center;
  backdrop-filter: blur(12px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(0, 119, 255, .9);
  outline-offset: 2px;
}

.hotspot:focus-visible { outline: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { display: block; overflow-x: auto; }
  .site-shell { width: 1180px; max-width: none; }
  .mobile-note { display: block; }
  .menu { width: 270px; }

  .catalog, .site-footer { width: 100vw; }
  .catalog { padding: 32px 14px 56px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .product-media { height: 160px; padding: 12px; }
  .product-media img, .product-media .placeholder { height: 134px; max-width: 80%; }
  .product-body { padding: 12px 12px 16px; }
  .product-title { font-size: 14px; }
  .product-meta { font-size: 12px; flex-wrap: wrap; }
  .product-price { font-size: 15px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; padding-bottom: 60px; }
}

@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}

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