:root {
  --green: #03c75a;
  --green-dark: #009f47;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #d9e2ec;
  --soft: #f5f7f9;
  --white: #ffffff;
  --coral: #ff6b4a;
  --blue: #2563eb;
  --shadow: 0 18px 48px rgba(31, 41, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(220px, 680px) auto;
  gap: 18px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--white);
  background: var(--green);
  border-radius: 8px;
}

.search {
  display: grid;
  grid-template-columns: 1fr auto;
  min-width: 0;
  border: 2px solid var(--green);
  border-radius: 8px;
  overflow: hidden;
}

.search input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  outline: 0;
}

.search button,
.checkout-button,
.primary-link {
  border: 0;
  color: var(--white);
  background: var(--green);
  font-weight: 800;
  cursor: pointer;
}

.search button {
  padding: 0 22px;
}

.quick-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.icon-button,
.cart-toggle {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  cursor: pointer;
}

.icon-button {
  width: 42px;
  font-size: 22px;
}

.cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 700;
}

.cart-toggle strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  color: var(--white);
  background: var(--coral);
  border-radius: 999px;
  font-size: 13px;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  min-height: min(560px, calc(100vh - 86px));
  padding: 36px 0 42px;
}

.hero-copy h1 {
  max-width: 620px;
  margin: 8px 0 14px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
}

.hero-copy p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
}

.eyebrow {
  margin: 0;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 0 18px;
  border-radius: 8px;
  text-decoration: none;
}

.secondary-link {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--white);
  font-weight: 800;
}

.hero-media {
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img,
.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 18px;
}

.category {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.category.active {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.deal-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 10px 0 30px;
}

.deal-band article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.deal-band span {
  display: block;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.deal-band strong {
  display: block;
  margin-top: 4px;
}

.content-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
  padding-bottom: 80px;
}

.filters {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-group {
  display: grid;
  gap: 10px;
}

.filter-group h2 {
  margin: 0;
  font-size: 16px;
}

.filter-group p,
.filter-group label {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.filter-group select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 28px;
}

.section-heading span {
  color: var(--muted);
  font-weight: 700;
}

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

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--soft);
}

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 6px 8px;
  color: var(--white);
  background: var(--coral);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.product-info {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.store-name {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.product-info h3 {
  min-height: 48px;
  margin: 0;
  font-size: 17px;
  line-height: 1.42;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-size: 20px;
  font-weight: 900;
}

.discount {
  color: var(--coral);
  font-weight: 900;
}

.card-actions {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  margin-top: 4px;
}

.wish,
.add-cart {
  min-height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.wish {
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 20px;
}

.wish.active {
  color: var(--coral);
  border-color: #ffc3b7;
  background: #fff4f1;
}

.add-cart {
  border: 0;
  color: var(--white);
  background: var(--ink);
}

.empty-state {
  margin: 48px 0;
  padding: 30px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.comments-section {
  padding: 0 0 80px;
}

.comments-box {
  min-height: 280px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(420px, 100%);
  height: 100vh;
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform 0.2s ease;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-header,
.cart-summary {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h2 {
  margin: 0;
}

.cart-items {
  overflow: auto;
  padding: 10px 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.quantity button {
  width: 30px;
  height: 30px;
  border: 0;
  background: var(--soft);
  cursor: pointer;
}

.quantity span {
  min-width: 30px;
  text-align: center;
}

.cart-summary {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.cart-summary .total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.checkout-button {
  min-height: 48px;
  border-radius: 8px;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(17, 24, 39, 0.45);
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .search {
    grid-column: 1 / -1;
    order: 3;
  }

  .store-hero,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .store-hero {
    min-height: auto;
  }

  .hero-media {
    order: -1;
    max-height: 360px;
  }

  .filters {
    position: static;
  }

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

@media (max-width: 620px) {
  main {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    padding: 12px;
    gap: 10px;
  }

  .brand {
    font-size: 17px;
  }

  .quick-nav {
    gap: 6px;
  }

  .cart-toggle {
    padding: 0 10px;
  }

  .deal-band,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
  }
}
