:root {
  color-scheme: light;
  --bg: #f7f1e8;
  --surface: #fffaf2;
  --surface-strong: #f0dfc8;
  --surface-soft: rgba(255, 250, 242, 0.72);
  --text: #241812;
  --muted: #765f4d;
  --accent: #bf6a2c;
  --accent-dark: #7d3f19;
  --available: #2f7d4d;
  --available-bg: #e7f5ec;
  --order: #93621b;
  --order-bg: #fff1cf;
  --prototype: #6e4aa8;
  --prototype-bg: #efe8ff;
  --border: rgba(36, 24, 18, 0.14);
  --shadow: 0 24px 60px rgba(64, 38, 20, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, #fff5d6 0, transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(191, 106, 44, 0.12) 0, transparent 26rem),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(191, 106, 44, 0.35);
  outline-offset: 3px;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.25rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff7ea;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.nav-actions a:hover,
.text-link:hover {
  color: var(--accent-dark);
}

.hero {
  display: grid;
  align-content: center;
  min-height: 60vh;
  padding: clamp(3rem, 9vw, 6.25rem) 0;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 910px;
  margin-bottom: 1.2rem;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

code {
  border-radius: 0.35rem;
  padding: 0.1rem 0.35rem;
  background: var(--surface-strong);
  color: var(--accent-dark);
}

.hero-copy,
.section-heading p,
.panel p {
  max-width: 670px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-warning {
  max-width: 690px;
  border-left: 4px solid var(--accent);
  border-radius: 0 1rem 1rem 0;
  margin: 1.2rem 0 0;
  padding: 0.95rem 1rem;
  background: rgba(255, 250, 242, 0.72);
  color: var(--accent-dark);
  font-weight: 750;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
}

.button,
.secondary-button,
.chip,
.reset-button,
.remove-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
  background: var(--text);
  color: var(--surface);
}

.text-link {
  color: var(--accent-dark);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

.panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  margin: 2rem 0;
  padding: clamp(1.2rem, 4vw, 2rem);
  background: rgba(255, 250, 242, 0.84);
  box-shadow: var(--shadow);
}

.filter-groups {
  display: grid;
  gap: 1rem;
  min-width: min(100%, 455px);
}

.filter-groups h3 {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.chip,
.reset-button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--muted);
}

.chip.active,
.chip:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf2;
}

.reset-button {
  justify-self: end;
  background: transparent;
}

.reset-button:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--surface);
}

.catalog-section {
  padding: 4rem 0;
}

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

#catalogStatus {
  font-weight: 800;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}

.catalog-empty {
  border: 1px dashed rgba(36, 24, 18, 0.28);
  border-radius: 1.5rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  background: var(--surface-soft);
}

.catalog-empty h3 {
  margin-bottom: 0.35rem;
  font-size: 1.35rem;
}

.catalog-empty p {
  margin-bottom: 0;
  color: var(--muted);
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(64, 38, 20, 0.1);
}

.product-card__mark {
  display: grid;
  place-items: center;
  min-height: 132px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.74), transparent 9rem),
    linear-gradient(135deg, #f8d49b, #ca6f31 55%, #492816);
  color: #fffaf2;
  font-size: 4rem;
  font-weight: 900;
  text-shadow: 0 8px 30px rgba(36, 24, 18, 0.35);
}

.product-card__body {
  display: grid;
  grid-template-rows: auto auto auto auto auto 1fr auto;
  gap: 0.9rem;
  padding: 1.15rem;
}

.product-card__meta,
.request-summary,
.request-total,
.request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.product-card__meta {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.badge {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  background: var(--surface-strong);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
}

.category-badge {
  border-color: rgba(125, 63, 25, 0.16);
}

.status-badge {
  position: relative;
  padding-left: 1.55rem;
}

.status-badge::before {
  position: absolute;
  top: 50%;
  left: 0.65rem;
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

.status-badge--available {
  background: var(--available-bg);
  color: var(--available);
}

.status-badge--available::before {
  background: var(--available);
}

.status-badge--made-to-order {
  background: var(--order-bg);
  color: var(--order);
}

.status-badge--made-to-order::before {
  background: var(--order);
}

.status-badge--prototype {
  background: var(--prototype-bg);
  color: var(--prototype);
}

.status-badge--prototype::before {
  background: var(--prototype);
}

.product-card h3 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.product-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.product-facts dt,
.detail-meta dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-facts dd,
.detail-meta dd {
  margin: 0.16rem 0 0;
  color: var(--text);
  font-weight: 900;
}

.product-facts div {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.75rem;
  background: rgba(240, 223, 200, 0.32);
}

.spec-list,
.product-details ul,
.request-list {
  margin: 0;
  padding-left: 1.2rem;
}

.spec-list {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.spec-list__more {
  color: var(--accent-dark);
  font-weight: 800;
}

.product-details {
  align-self: end;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.product-details summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 900;
}

.product-details__content {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.85rem;
}

.product-details__content section,
.detail-meta {
  border: 1px solid rgba(36, 24, 18, 0.1);
  border-radius: 1rem;
  padding: 0.85rem;
  background: rgba(247, 241, 232, 0.62);
}

.product-details h4 {
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 0.88rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.product-details li {
  margin-bottom: 0.3rem;
  color: var(--muted);
  line-height: 1.45;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
}

.product-actions {
  display: flex;
}

.secondary-button {
  width: 100%;
  border-radius: 0.95rem;
  padding: 0.85rem 1rem;
  background: var(--text);
  color: var(--surface);
}

.secondary-button:hover,
.button:hover {
  background: var(--accent-dark);
}

.request-draft {
  margin-bottom: 4rem;
}

.request-box {
  display: grid;
  gap: 1rem;
  min-width: min(100%, 390px);
  border-radius: 1.25rem;
  padding: 1.25rem;
  background: var(--text);
  color: var(--surface);
  font-weight: 800;
}

.cart-count {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent);
  font-size: 1.3rem;
}

.request-list {
  display: grid;
  gap: 0.75rem;
  padding-left: 0;
  list-style: none;
}

.request-empty {
  border: 1px dashed rgba(255, 250, 242, 0.28);
  border-radius: 1rem;
  margin: 0;
  padding: 0.95rem;
  color: rgba(255, 250, 242, 0.72) !important;
  font-weight: 700;
}

.request-item {
  align-items: flex-start;
  border-top: 1px solid rgba(255, 250, 242, 0.16);
  padding-top: 0.75rem;
  color: rgba(255, 250, 242, 0.9);
  font-size: 0.95rem;
}

.remove-button {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 250, 242, 0.12);
  color: var(--surface);
}

.remove-button:hover {
  background: var(--accent);
}

.request-total {
  border-top: 1px solid rgba(255, 250, 242, 0.2);
  padding-top: 0.9rem;
  font-size: 1.05rem;
}

.site-footer {
  padding: 2rem 0 3rem;
  color: var(--muted);
}

@media (max-width: 920px) {
  .panel,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-controls,
  .reset-button {
    justify-content: flex-start;
    justify-self: start;
  }

  .catalog-section {
    padding: 3rem 0;
  }
}

@media (max-width: 720px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

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

  .nav-actions {
    flex-wrap: wrap;
  }

  .hero {
    min-height: auto;
    padding: 2.6rem 0 3.2rem;
  }

  .hero-warning {
    border-left-width: 3px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .product-facts,
  .detail-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .nav-actions,
  .hero-actions,
  .filter-controls {
    gap: 0.55rem;
  }

  .chip,
  .reset-button {
    width: 100%;
  }

  .product-card__body,
  .request-box {
    padding: 1rem;
  }

  .request-item,
  .request-summary,
  .request-total {
    align-items: flex-start;
    flex-direction: column;
  }
}
