:root {
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --page: #f6f8fb;
  --panel: #ffffff;
  --brand: #2563eb;
  --brand-dark: #111827;
  --brand-soft: #eaf1ff;
  --accent: #14b8a6;
  --accent-warm: #f59e0b;
  --success: #12805c;
  --danger: #d92d20;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34rem),
    linear-gradient(180deg, #fbfcff 0%, var(--page) 46rem);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  text-decoration: none;
}

.top-strip {
  background: #0b1120;
  color: #dbeafe;
  font-size: 0.82rem;
}

.market-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(228, 231, 236, 0.85);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
  backdrop-filter: blur(16px);
}

.market-header .container.py-3 {
  padding-top: 0.85rem !important;
  padding-bottom: 0.85rem !important;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 58px;
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}

.brand-mark:hover {
  color: var(--ink);
}

.brand-mark img {
  width: clamp(142px, 14vw, 190px);
  height: auto;
  max-height: 42px;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.brand-copy {
  display: flex;
  align-items: center;
  line-height: 1.05;
  padding-left: 0.65rem;
  border-left: 1px solid var(--line);
}

.brand-copy small {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.search-shell {
  display: flex;
  width: min(720px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}

.search-shell:focus-within {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

.search-shell input,
.search-shell select {
  border: 0;
  min-height: 48px;
  box-shadow: none !important;
}

.search-shell select {
  max-width: 176px;
  background-color: #f8fafc;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-weight: 650;
}

.search-shell button {
  width: 58px;
  border: 0;
  border-radius: 0;
  background: var(--brand);
  color: #fff;
}

.header-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.78rem;
  color: var(--ink);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 750;
}

.header-action:hover {
  color: var(--brand);
  border-color: rgba(37, 99, 235, 0.35);
}

.cart-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
}

.category-bar {
  background: #fff;
  border-top: 1px solid rgba(228, 231, 236, 0.65);
}

.category-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #475467;
  padding: 0.72rem 0.9rem;
  font-weight: 750;
  font-size: 0.9rem;
  flex: 0 0 auto;
  border-bottom: 2px solid transparent;
}

.category-link:hover,
.category-link.active {
  color: var(--brand);
  border-color: var(--brand);
}

.hero-band {
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.38), transparent 22rem),
    radial-gradient(circle at 82% 20%, rgba(20, 184, 166, 0.22), transparent 18rem),
    linear-gradient(135deg, #0b1120 0%, #172554 52%, #1e3a8a 100%);
}

.hero-inner {
  min-height: 390px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.2rem 0 4.6rem;
  text-align: center;
}

.hero-content {
  max-width: 880px;
  margin: 0 auto;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: #dbeafe;
  font-weight: 800;
  font-size: 0.82rem;
}

.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  max-width: 880px;
  margin: 0;
  font-size: clamp(2.45rem, 5.2vw, 4.8rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-text {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #dbeafe;
  font-size: 1.12rem;
  line-height: 1.65;
}

.btn-accent {
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-weight: 850;
  box-shadow: 0 16px 36px rgba(0,0,0,0.18);
}

.btn-accent:hover {
  background: #f8fafc;
  color: var(--brand);
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 800;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.category-showcase {
  margin-top: -2.4rem;
  position: relative;
  z-index: 3;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 0.85rem;
}

.category-card {
  display: grid;
  min-height: 118px;
  align-content: space-between;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.08);
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.38);
  color: var(--brand);
}

.category-card i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.25rem;
}

.category-card span {
  margin-top: 0.65rem;
  font-weight: 850;
  line-height: 1.15;
  font-size: 0.94rem;
}

.category-card small {
  margin-top: 0.3rem;
  color: var(--muted);
}

.trust-row {
  background: transparent;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 74px;
  color: var(--muted);
  font-size: 0.92rem;
}

.trust-item i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.07);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

#products {
  scroll-margin-top: 150px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
}

.filter-panel {
  position: sticky;
  top: 142px;
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.06);
}

.filter-heading {
  padding: 1rem 1.1rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}

.filter-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.86rem 1rem;
  color: var(--ink);
  border-bottom: 1px solid #f0f2f5;
  font-weight: 720;
}

.filter-link:hover,
.filter-link.active {
  color: var(--brand);
  background: #f8fbff;
}

.filter-link.subcategory {
  padding-left: 2.05rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.product-card {
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: var(--shadow);
}

.product-media {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.76;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  border-bottom: 1px solid #edf2f7;
}

.product-media img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  padding: 0.7rem;
  transition: transform 160ms ease;
}

.product-card:hover .product-media img {
  transform: scale(1.035);
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 250px;
  padding: 1rem;
}

.product-name {
  color: var(--ink);
  font-weight: 850;
  line-height: 1.25;
  min-height: 2.5em;
}

.product-description {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  min-height: 2.6em;
}

.price {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 950;
}

.stock-pill {
  width: fit-content;
  border-radius: 999px;
  padding: 0.24rem 0.56rem;
  background: #ecfdf3;
  color: var(--success);
  font-size: 0.76rem;
  font-weight: 850;
}

.stock-pill.low {
  background: #fffaeb;
  color: #b54708;
}

.stock-pill.out {
  background: #fef3f2;
  color: var(--danger);
}

.btn-buy {
  margin-top: auto;
  border: 0;
  border-radius: 999px;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 850;
  min-height: 44px;
}

.btn-buy:hover {
  background: var(--brand);
  color: #fff;
}

.empty-state {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 3rem 1.5rem;
  text-align: center;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.06);
}

.modal-content {
  border: 0;
  border-radius: 24px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-product {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.cart-thumb {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  padding: 0.45rem;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #eef4ff);
}

.cart-total {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
}

.support-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1040;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

.support-panel {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 1040;
  display: none;
  width: min(360px, calc(100vw - 32px));
  height: 430px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.support-panel.open {
  display: flex;
}

.footer {
  background: #0b1120;
  color: #dbe7f2;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.footer-brand img {
  width: 158px;
  height: auto;
  max-height: 38px;
  object-fit: contain;
  padding: 0.35rem 0.5rem;
  border-radius: 12px;
  background: #fff;
}

.footer-brand span {
  color: #cbd5e1;
  font-size: 0.92rem;
}

@media (max-width: 1199.98px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 991.98px) {
  .market-header {
    position: static;
  }

  .search-shell {
    order: 3;
    width: 100%;
    border-radius: 18px;
  }

  .search-shell select {
    display: none;
  }

  .filter-panel {
    position: static;
  }
}

@media (max-width: 575.98px) {
  .brand-mark {
    width: 100%;
    justify-content: space-between;
  }

  .brand-mark img {
    width: 152px;
  }

  .brand-copy {
    display: none;
  }

  .header-action span:not(.cart-badge) {
    display: none;
  }

  .hero-inner {
    padding: 2.2rem 0 3.4rem;
  }

  .hero-title {
    font-size: 2.55rem;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-body {
    min-height: auto;
  }

  .footer-brand {
    align-items: flex-start;
    flex-direction: column;
  }
}
