:root {
  color-scheme: light;
  --bg: #f4f6f2;
  --card: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --soft: #e8ece5;
  --line: rgba(0, 0, 0, 0.1);
  --accent: #3a6f51;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

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

h1 {
  margin: 0;
  font-size: 48px;
  line-height: 0.9;
  letter-spacing: 0;
}

.subtitle {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--line);
}

@media (min-width: 720px) {
  .search-box {
    grid-template-columns: 1fr 140px auto;
  }
}

input,
button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  font: inherit;
}

input {
  width: 100%;
  background: var(--soft);
  padding: 0 16px;
  outline: none;
}

input:focus {
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
}

button {
  cursor: pointer;
  background: var(--text);
  color: white;
  font-weight: 800;
  padding: 0 20px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button.secondary,
#demo-button {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.cart-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: end;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.cart-panel h2,
.cart-panel p {
  margin: 0;
}

.cart-panel h2 {
  font-size: 24px;
  line-height: 1.05;
}

#cart-summary {
  margin-top: 8px;
  color: var(--muted);
}

.checkout-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.checkout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  text-decoration: none;
}

@media (min-width: 820px) {
  h1 {
    font-size: 72px;
  }

  .cart-panel {
    grid-template-columns: 1fr minmax(360px, 0.8fr) auto;
  }

  .checkout-form {
    grid-template-columns: 1fr auto;
  }
}

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

@media (min-width: 620px) {
  .catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  color: inherit;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.product-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.image-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #e9e9e6;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 240ms ease;
}

.product-card:hover .product-image {
  transform: scale(1.04);
}

.image-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
}

.card-body {
  background: #efefed;
  padding: 18px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.product-title,
.product-price,
.product-brand {
  margin: 0;
}

.product-title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 900;
}

.product-brand {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
}

.card-actions.single {
  grid-template-columns: 1fr;
}

.view-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: white;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.add-cart-button {
  min-height: 44px;
  padding: 0 12px;
  font-size: 13px;
}

.empty {
  grid-column: 1 / -1;
  padding: 44px;
  border-radius: 8px;
  background: white;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(0, 0, 0, 0.14);
}
