:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --text: #17202b;
  --muted: #667085;
  --line: #e5e9f0;
  --dark: #0d141d;
  --dark-2: #111c28;
  --orange: #f47b20;
  --orange-2: #d95f0b;
  --green: #079455;
  --blue: #2563eb;
  --danger: #c62828;
  --shadow: 0 18px 55px rgba(16, 24, 40, .12);
  --shadow-soft: 0 10px 28px rgba(16, 24, 40, .08);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.notice-bar {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 8px 16px;
  color: white;
  background: #080e15;
  font-size: 13px;
  font-weight: 750;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.header-main {
  display: grid;
  grid-template-columns: 210px 150px minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 5vw 10px;
}
.brand img {
  width: 205px;
  max-height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(16,24,40,.12));
}
.location-pill {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 8px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 9px 10px;
  text-align: left;
  box-shadow: var(--shadow-soft);
}
.location-pill span { grid-row: span 2; font-size: 21px; }
.location-pill strong { font-size: 12px; }
.location-pill small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 2px solid #e9eef5;
  background: white;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 12px 18px;
  border-radius: 999px;
}
.search button,
.btn.primary,
.file-button,
.account-nav button:hover,
.register-chip {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(244,123,32,.22);
}
.account-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}
.account-nav button {
  border: 0;
  background: #f8fafc;
  color: #344054;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 850;
}
.cart-trigger {
  color: #fff !important;
  background: #111827 !important;
}
.cart-trigger span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  background: var(--orange);
  border-radius: 999px;
}
.header-menu {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 0 5vw 12px;
  color: #344054;
  font-size: 14px;
  font-weight: 850;
}
.header-menu a { padding: 8px 0; }
.header-menu a:hover { color: var(--orange-2); }
.nav-button, .mega-trigger {
  border: 0;
  color: white;
  background: #111827;
  padding: 10px 15px;
  border-radius: 999px;
  font-weight: 950;
}

/* Mega menu */
.mega-wrapper { position: relative; }
.mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: min(1180px, 94vw);
  min-height: 470px;
  max-height: 78vh;
  display: grid;
  grid-template-columns: 245px 1fr;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: .18s ease;
  border: 1px solid var(--line);
  background: white;
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(16,24,40,.22);
  overflow: hidden;
}
.mega-wrapper:hover .mega-menu,
.mega-wrapper:focus-within .mega-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mega-left, .sell-left {
  padding: 18px;
  background: #101820;
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 78vh;
  overflow: auto;
}
.mega-tab, .sell-tab, .dash-tab {
  border: 0;
  text-align: left;
  border-radius: 14px;
  padding: 13px 14px;
  background: transparent;
  color: #d7dee7;
  font-weight: 950;
}
.mega-tab:hover, .mega-tab.active, .sell-tab:hover, .sell-tab.active {
  color: #fff;
  background: rgba(244,123,32,.22);
}
.mega-right, .sell-right {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 24px;
  align-content: start;
  overflow: auto;
}
.mega-column h3 {
  margin: 0 0 13px;
  font-size: 18px;
}
.mega-button, .sell-button {
  display: block;
  width: 100%;
  margin: 7px 0;
  padding: 10px 12px;
  border-radius: 13px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #384250;
  text-align: left;
  font-weight: 820;
  transition: .18s ease;
}
.mega-button:hover, .sell-button:hover {
  color: white;
  background: var(--orange);
  border-color: var(--orange);
  transform: translateX(4px);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 500px;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 92px 5vw 88px;
  background: #0a1119;
}
.hero-video {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(10,17,25,.86), rgba(10,17,25,.38) 58%, rgba(10,17,25,.72)),
    radial-gradient(circle at 50% 35%, rgba(244,123,32,.13), transparent 36%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 150px;
  z-index: -1;
  background: linear-gradient(transparent, rgba(243,245,248,.98));
}
.hero-content {
  width: min(870px, 92vw);
  color: white;
}
.kicker {
  margin: 0 0 10px;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
  font-weight: 980;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6.3vw, 78px);
  line-height: .94;
  letter-spacing: -3px;
}
.hero p:not(.kicker) {
  color: #e5e7eb;
  max-width: 720px;
  font-size: 19px;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 0;
  font-weight: 950;
}
.btn.ghost { color: white; border: 1px solid rgba(255,255,255,.42); background: rgba(255,255,255,.10); }
.btn.dark { color: white; background: #111827; }
.btn.full { width: 100%; }

.benefits {
  position: relative;
  z-index: 5;
  width: min(1220px, 92vw);
  margin: -55px auto 38px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.benefits article { padding: 22px; border-right: 1px solid var(--line); }
.benefits article:last-child { border-right: 0; }
.benefits strong { display: block; font-size: 18px; }
.benefits span { color: var(--muted); font-size: 14px; }

.card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(229,233,240,.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
h2, h3, p { margin-top: 0; }
h2 { margin-bottom: 12px; font-size: clamp(30px, 4vw, 48px); line-height: 1.04; letter-spacing: -2px; }
h3 { margin-bottom: 14px; }
.muted { color: var(--muted); }

.layout {
  width: min(1220px, 92vw);
  margin: 36px auto;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 24px;
  align-items: start;
}
.filters { position: sticky; top: 145px; padding: 24px; }
.side-title h2 { font-size: 32px; }
.filter-label { display: grid; gap: 8px; margin: 16px 0; color: #344054; font-weight: 850; }
.filter-label select, .filter-label input, .form-grid input, .form-grid select, textarea, .checkout-box input, .checkout-box select, .modal-card input {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  border-radius: 15px;
  padding: 13px 14px;
  outline: 0;
}
.filter-check { display: flex; align-items: center; gap: 10px; margin: 12px 0; font-weight: 820; color: #344054; }
.results-head, .section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}
.section-head.compact { align-items: center; }
.sort-box { display: grid; gap: 6px; min-width: 210px; color: var(--muted); font-weight: 850; }
.sort-box select { border: 1px solid var(--line); border-radius: 999px; padding: 12px 16px; background: white; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.product-card {
  position: relative;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  transition: .18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-image {
  height: 188px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #131d29, #253448);
  color: white;
  font-size: 64px;
}
.product-body { padding: 18px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 5px 9px; border-radius: 999px; background: #fff3eb; color: #9a4a0a; font-size: 12px; font-weight: 950; }
.product-title { min-height: 48px; margin: 0 0 8px; font-weight: 850; line-height: 1.28; }
.price { font-size: 28px; font-weight: 950; letter-spacing: -1px; }
.installments, .shipping { color: var(--green); font-weight: 850; font-size: 14px; }
.seller { color: var(--muted); font-size: 13px; margin: 7px 0 14px; }
.product-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.product-actions button {
  border: 0;
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 950;
}
.add-cart { color: white; background: var(--orange); }
.view-detail { color: #111827; background: #eef2f6; }
.favorite { color: #c02626; background: #fff1f2; }

.section, .seller-center { width: min(1220px, 92vw); margin: 52px auto; }
.section.card { padding: 32px; }
.promo-grid, .store-grid, .stats, .info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.promo-grid article, .store-card, .stats article, .info-grid article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.promo-grid span { display: block; font-size: 36px; margin-bottom: 12px; }
.promo-grid strong, .store-card strong, .stats strong { display: block; font-size: 20px; }
.promo-grid small, .store-card small, .stats span { color: var(--muted); }
.store-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  margin-bottom: 14px;
  color: white;
  background: linear-gradient(135deg, var(--dark), var(--orange));
  font-size: 28px;
}

.seller-hero { padding: 34px; margin-bottom: 24px; }
.seller-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: start; }
.seller-card { padding: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
textarea { min-height: 105px; resize: vertical; margin: 12px 0; }
.sell-trigger {
  width: 100%;
  border: 0;
  color: white;
  background: #111827;
  border-radius: 18px;
  padding: 16px 18px;
  font-weight: 950;
  text-align: left;
}
.sell-menu {
  display: none;
  margin-top: 14px;
  min-height: 430px;
  max-height: 70vh;
  grid-template-columns: 235px 1fr;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: white;
  box-shadow: 0 24px 70px rgba(16,24,40,.18);
}
.sell-menu.open { display: grid; }
.selected-box {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfd;
  padding: 18px;
}
.selected-box span, .selected-box small { display: block; color: var(--muted); }
.selected-box strong { display: block; font-size: 24px; margin: 6px 0; color: var(--orange-2); }
.upload-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.file-button { display: inline-flex; align-items: center; min-height: 50px; }
.file-button input { display: none; }
.status-box {
  margin-top: 16px;
  border-radius: 16px;
  background: #fff3eb;
  color: #8a3b07;
  padding: 14px 16px;
  font-weight: 850;
}
.preview-card { padding: 28px; margin-top: 24px; }
.table-wrap, .dash-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 820px; background: white; }
th, td { border-bottom: 1px solid var(--line); padding: 14px 16px; text-align: left; vertical-align: top; }
th { background: #f7f9fb; font-weight: 950; }
tr:last-child td { border-bottom: 0; }
.empty { text-align: center !important; color: var(--muted); padding: 34px !important; }

#seller-dashboard { padding: 32px; }
.seller-tabs { display: flex; gap: 10px; margin: 22px 0; }
.dash-tab { color: #344054; background: #eef2f6; }
.dash-tab.active { color: white; background: #111827; }
.info-grid { grid-template-columns: 1fr 1fr 1fr; }
.info-grid .card { padding: 30px; }
#historyList { padding-left: 20px; color: var(--muted); }

.footer {
  width: min(1220px, 92vw);
  margin: 60px auto 0;
  padding: 34px 0 58px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 26px;
  color: var(--muted);
}
.footer img { width: 180px; margin-bottom: 8px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; color: #344054; font-weight: 850; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 120;
  width: min(440px, 94vw);
  height: 100vh;
  background: #fff;
  box-shadow: -22px 0 80px rgba(16,24,40,.24);
  transform: translateX(110%);
  transition: .24s ease;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}
.cart-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 34px; }
.drawer-head button, .modal-close {
  width: 42px; height: 42px; border: 0; border-radius: 999px; background: #eef2f6; font-size: 24px;
}
.cart-items { overflow: auto; padding: 18px; }
.cart-line { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 0; }
.cart-thumb { width: 52px; height: 52px; display: grid; place-items: center; color: white; border-radius: 14px; background: linear-gradient(135deg, #131d29, #253448); font-size: 27px; }
.cart-line strong { display: block; }
.cart-line small { color: var(--muted); }
.qty { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.qty button { border: 0; border-radius: 10px; background: #eef2f6; width: 28px; height: 28px; font-weight: 950; }
.remove-item { border: 0; color: var(--danger); background: #fff1f2; border-radius: 999px; width: 32px; height: 32px; }
.cart-summary { padding: 18px 22px; border-top: 1px solid var(--line); }
.summary-row { display: flex; justify-content: space-between; margin: 8px 0; }
.summary-row.total { font-size: 22px; font-weight: 950; padding-top: 10px; border-top: 1px solid var(--line); }
.checkout-box { padding: 0 22px 22px; display: grid; gap: 10px; }
.backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(3,7,18,.45); opacity: 0; pointer-events: none; transition: .24s ease; }
.backdrop.show { opacity: 1; pointer-events: auto; }

.modal { border: 0; border-radius: 28px; padding: 0; box-shadow: 0 32px 90px rgba(16,24,40,.26); max-width: min(560px, 92vw); width: 560px; }
.modal::backdrop { background: rgba(3,7,18,.48); }
.modal-card { padding: 30px; display: grid; gap: 12px; }
.modal-close { justify-self: end; }
.product-modal { width: min(860px, 94vw); max-width: 860px; }
.product-detail { grid-template-columns: 280px 1fr; gap: 24px; }
.detail-visual { min-height: 260px; border-radius: 24px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, #131d29, #253448); font-size: 92px; }
.detail-info h2 { font-size: 34px; }
.detail-info .price { margin: 12px 0; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  max-width: 360px;
  padding: 14px 18px;
  color: white;
  background: #111827;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transform: translateY(120px);
  opacity: 0;
  transition: .25s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1180px) {
  .header-main { grid-template-columns: 1fr; }
  .brand { display: flex; justify-content: center; }
  .location-pill { width: fit-content; justify-self: center; }
  .account-nav, .header-menu { justify-content: center; flex-wrap: wrap; }
  .mega-menu { left: 50%; transform: translate(-50%, 12px); }
  .mega-wrapper:hover .mega-menu, .mega-wrapper:focus-within .mega-menu { transform: translate(-50%, 0); }
  .layout, .seller-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benefits, .promo-grid, .store-grid, .stats { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .notice-bar { justify-content: flex-start; gap: 10px; }
  .search { flex-direction: column; border-radius: 22px; }
  .header-menu { align-items: flex-start; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .hero { min-height: 520px; padding: 70px 5vw 82px; }
  .hero h1 { letter-spacing: -2px; }
  .benefits, .product-grid, .promo-grid, .store-grid, .stats, .form-grid { grid-template-columns: 1fr; }
  .benefits article { border-right: 0; border-bottom: 1px solid var(--line); }
  .benefits article:last-child { border-bottom: 0; }
  .results-head, .section-head, .footer { display: block; }
  .mega-menu, .sell-menu { width: 92vw; grid-template-columns: 1fr; max-height: 72vh; overflow: auto; }
  .mega-right, .sell-right { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .footer nav { margin-top: 18px; }
}
