:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #627069;
  --line: #d9e2dd;
  --paper: #f6f8f4;
  --white: #ffffff;
  --mint: #9fd8c0;
  --teal: #176b61;
  --red: #c44b4b;
  --yellow: #edc86d;
  --shadow: 0 20px 60px rgba(23, 32, 27, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 16px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgba(23, 32, 27, 0.1);
  background: rgba(246, 248, 244, 0.92);
  backdrop-filter: blur(14px);
}

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

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

.nav {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.nav-filter,
.cart-button,
.checkout,
.cart-header button {
  border: 0;
  cursor: pointer;
}

.nav-filter {
  min-width: 66px;
  padding: 9px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.nav-filter.is-active {
  background: var(--ink);
  color: white;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--ink);
}

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

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

.storefront {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(18px, 4vw, 44px);
  align-items: stretch;
  padding: clamp(28px, 6vw, 72px) 0 26px;
}

.intro {
  display: grid;
  align-content: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

.copy {
  max-width: 620px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.search-wrap input {
  width: min(100%, 560px);
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: white;
}

.search-wrap input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(23, 107, 97, 0.12);
}

.feature-card {
  display: grid;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.feature-card img {
  width: 100%;
  height: 290px;
  object-fit: cover;
  background: #dcece5;
}

.feature-card div {
  padding: 20px;
}

.feature-card span,
.toolbar small,
.product-card small,
.cart-header span {
  color: var(--muted);
  font-size: 13px;
}

.feature-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.feature-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.toolbar span {
  display: block;
  font-weight: 800;
}

.toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

select {
  padding: 9px 34px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

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

.product-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1.12;
  object-fit: cover;
  background: #dfe9e4;
}

.product-body {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.product-title {
  min-height: 44px;
  font-size: 16px;
  font-weight: 800;
}

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

.price-row strong {
  font-size: 18px;
}

.add-button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.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: white;
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

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

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

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

.cart-header strong {
  display: block;
}

.cart-header button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
}

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

.cart-item button {
  border: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
}

.cart-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 18px;
}

.checkout {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: none;
  background: rgba(23, 32, 27, 0.42);
}

.scrim.is-open {
  display: block;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

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

  .nav {
    grid-column: 1 / -1;
    overflow-x: auto;
  }

  .storefront,
  .products {
    grid-template-columns: 1fr 1fr;
  }

  .storefront {
    align-items: start;
  }

  .intro {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 12px;
  }

  .brand span:last-child {
    display: none;
  }

  .storefront,
  .products {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 0;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}
