:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #12151a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #cb11ab;
  --accent-2: #8b0f74;
  --accent-soft: rgba(203, 17, 171, 0.1);
  --ok: #059669;
  --warn: #b45309;
  --danger: #dc2626;
  --shadow: 0 10px 30px rgba(18, 21, 26, 0.08);
  --radius: 16px;
  --font: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(203, 17, 171, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(99, 102, 241, 0.1), transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
.hidden { display: none !important; }
a { color: var(--accent-2); text-decoration: none; }
button, input, select { font: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
}
.brand {
  display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; font-size: 1.15rem;
}
.brand.compact { font-size: 1rem; margin-bottom: 8px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; color: #fff; font-size: 0.75rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #6366f1);
}
.brand-accent { color: var(--accent); }
.search {
  display: flex; gap: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
}
.search input {
  flex: 1; border: 0; background: transparent; padding: 12px 16px; outline: none;
}
.search button {
  border: 0; background: var(--accent); color: #fff; padding: 0 18px; cursor: pointer; font-weight: 600;
}
.top-actions { display: flex; gap: 12px; align-items: center; font-size: 0.92rem; }
.top-actions a { color: var(--ink); }
.cart-link { position: relative; }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; padding: 11px 18px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 600;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #fff;
}
.btn-outline { background: transparent; border-color: #d1d5db; }
.btn-ghost { background: var(--accent-soft); border-color: transparent; color: var(--accent-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.hero, .section, .catalog-layout, .narrow, .auth-wrap, .product-page, .footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 28px 20px;
}
.hero {
  display: grid; grid-template-columns: 1.2fr 0.9fr; gap: 24px; padding-top: 36px;
}
.eyebrow {
  display: inline-block; margin-bottom: 12px; color: var(--accent-2);
  background: var(--accent-soft); padding: 6px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 14px; }
.lede { color: var(--muted); font-size: 1.05rem; line-height: 1.6; max-width: 40rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 26px; }
.hero-stats { display: flex; gap: 22px; list-style: none; flex-wrap: wrap; }
.hero-stats li { display: grid; gap: 2px; }
.hero-stats strong { font-size: 1.2rem; }
.hero-stats span { color: var(--muted); font-size: 0.85rem; }

.hero-panel { display: grid; gap: 14px; }
.deal-card, .info-card, .product-card, .auth-card, .cart-line, .cart-summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.deal-card { padding: 24px; background:
  linear-gradient(160deg, #fff, #faf5ff 55%, #fff);
}
.deal-card h2 { font-size: 1.8rem; margin: 10px 0; }
.deal-card p { color: var(--muted); margin-bottom: 18px; line-height: 1.5; }
.pill {
  display: inline-block; background: #111827; color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  display: grid; gap: 4px;
}
.mini span { font-weight: 800; }
.mini small { color: var(--muted); }

.section-head {
  display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px;
}
.section-head h2 { font-size: 1.45rem; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.tiny { font-size: 0.82rem; }

.cats { display: flex; flex-wrap: wrap; gap: 10px; }
.cat {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 10px 16px; cursor: pointer; font-weight: 600;
}
.cat:hover, .cat.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.product-card { padding: 14px; display: grid; gap: 10px; transition: transform .15s ease, box-shadow .15s ease; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(18,21,26,.12); }
.thumb {
  height: 150px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, #f3e8ff, #eef2ff); font-size: 2.4rem;
}
.product-card h3 { font-size: 1rem; line-height: 1.35; min-height: 2.7em; }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price { font-size: 1.2rem; font-weight: 800; }
.old { color: var(--muted); text-decoration: line-through; font-size: 0.9rem; }
.meta-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.82rem; }
.product-card .actions { display: flex; gap: 8px; }
.product-card .actions .btn { flex: 1; padding: 10px 8px; font-size: 0.88rem; }

.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-card { padding: 22px; }
.info-card h3 { margin-bottom: 10px; }
.info-card ul { margin: 0 0 16px 18px; color: var(--muted); line-height: 1.7; }
.info-card label { display: grid; gap: 6px; margin-bottom: 12px; font-size: 0.9rem; font-weight: 600; }
.info-card input {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; font-weight: 500;
}

.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.filters {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; height: fit-content; position: sticky; top: 86px; box-shadow: var(--shadow);
}
.filters h3 { margin-bottom: 14px; }
.filters label { display: grid; gap: 8px; margin-bottom: 14px; font-size: 0.9rem; font-weight: 600; }
.filters select, .filters input[type="range"] { width: 100%; }
.filters select {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff;
}
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.check input { width: auto; }

.product-page {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px;
}
.product-gallery {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 360px; display: grid; place-items: center; font-size: 5rem; box-shadow: var(--shadow);
}
.product-info h1 { font-size: 2rem; margin-bottom: 8px; letter-spacing: -0.02em; }
.product-info . bid { color: var(--muted); margin-bottom: 16px; }
.specs { margin: 18px 0; display: grid; gap: 8px; }
.specs div {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
}
.specs span:last-child { color: var(--muted); text-align: right; }

.narrow { max-width: 820px; }
.cart-list { display: grid; gap: 12px; margin: 18px 0; }
.cart-line {
  padding: 14px 16px; display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center;
}
.cart-line .thumb { height: 64px; font-size: 1.6rem; }
.cart-summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px;
}
.total { font-size: 1.6rem; font-weight: 800; }

.auth-wrap { display: grid; place-items: center; padding-top: 48px; padding-bottom: 64px; }
.auth-card { width: min(420px, 100%); padding: 28px; }
.auth-card h2 { margin-bottom: 8px; }
.auth-card form { display: grid; gap: 12px; margin: 18px 0; }
.auth-card label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
}

.seller-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }

.alert {
  margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  background: #fff7ed; color: var(--warn); border: 1px solid #fed7aa; font-size: 0.92rem;
}
.alert.danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.alert.ok { background: #ecfdf5; color: var(--ok); border-color: #a7f3d0; }

.toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  background: #111827; color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow); max-width: min(360px, calc(100vw - 24px));
}

.footer { border-top: 1px solid var(--line); margin-top: 40px; background: rgba(255,255,255,0.7); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 36px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .topbar-inner { grid-template-columns: 1fr; }
  .hero, .dual, .catalog-layout, .product-page, .seller-grid { grid-template-columns: 1fr; }
  .filters { position: static; }
  .top-actions { flex-wrap: wrap; }
}
