:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #d8dee7;
  --surface: #ffffff;
  --surface-soft: #f4f6f8;
  --accent: #16794c;
  --accent-dark: #0f5e3a;
  --accent-soft: #e9f7ef;
  --warning: #8b5a00;
  --warning-bg: #fff6dc;
  --danger: #a32626;
  --shadow: 0 16px 45px rgba(17, 24, 39, 0.09);
  --radius: 16px;
  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: var(--surface-soft);
  color: var(--ink);
  line-height: 1.45;
}

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

button {
  cursor: pointer;
}

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

.page-shell {
  width: min(1480px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  background: var(--ink);
  color: #fff;
  padding: 22px 0;
}

.site-header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

h1 {
  margin-bottom: 4px;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  letter-spacing: -0.02em;
}

h3 {
  margin: 22px 0 10px;
  font-size: 1.05rem;
}

.eyebrow {
  margin-bottom: 4px;
  color: #aeb8c6;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.catalog-meta {
  margin: 0;
  color: #c9d1dc;
  font-size: 0.92rem;
}

.notice {
  margin: 22px 0;
  padding: 14px 18px;
  border: 1px solid #efd491;
  border-radius: 12px;
  background: var(--warning-bg);
  color: var(--warning);
}

.notice p {
  margin: 0;
}

.notice p + p {
  margin-top: 8px;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  gap: 24px;
  align-items: start;
  padding-bottom: 48px;
}

.catalog-panel,
.cart-panel {
  min-width: 0;
}

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

.section-heading .eyebrow,
.cart-panel .eyebrow {
  color: var(--muted);
}

.result-count {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(17, 24, 39, 0.04);
}

.filters [hidden] {
  display: none;
}

.field--search {
  grid-column: span 2;
}

.filters .button {
  align-self: end;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #374151;
  font-size: 0.88rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #bbc4d0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(22, 121, 76, 0.25);
  outline-offset: 2px;
  border-color: var(--accent);
}

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

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 285px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 7px 24px rgba(17, 24, 39, 0.045);
}

.product-card__top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.product-price {
  color: var(--accent-dark);
  font-size: 1.08rem;
  font-weight: 850;
  white-space: nowrap;
}

.product-title {
  margin: 14px 0 10px;
  font-size: 1rem;
  line-height: 1.35;
}

.product-details,
.presentation {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.presentation {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #edf0f3;
  color: #344052;
}

.product-detail strong {
  color: #344052;
}

.product-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.quantity-label {
  display: block;
}

.quantity-input {
  width: 72px;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid #bbc4d0;
  border-radius: 9px;
  text-align: center;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 800;
}

.button--primary {
  background: var(--accent);
  color: #fff;
}

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

.button--secondary {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.button--ghost {
  border-color: #c6cfda;
  background: #fff;
  color: #344052;
}

.show-more {
  width: 100%;
  margin-top: 16px;
}

.cart-panel {
  position: sticky;
  top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cart-panel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.count-badge {
  display: inline-flex;
  min-width: 24px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.cart-empty {
  padding: 18px 0 8px;
  color: var(--muted);
}

.cart-items {
  max-height: 360px;
  overflow-y: auto;
}

.cart-item {
  padding: 12px 0;
  border-bottom: 1px solid #edf0f3;
}

.cart-item__heading,
.cart-item__controls,
.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-item__reference {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.cart-item__title {
  display: block;
  margin-top: 3px;
  font-size: 0.86rem;
  line-height: 1.3;
}

.cart-item__controls {
  margin-top: 9px;
}

.cart-item__subtotal {
  font-weight: 850;
}

.icon-button {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 800;
}

.cart-total-row {
  margin: 14px 0 18px;
  padding: 13px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}

.conditional-fields {
  padding: 12px;
  border-radius: 12px;
  background: #f6f8fa;
}

.privacy-note,
.request-condition {
  color: var(--muted);
  font-size: 0.78rem;
}

.request-condition {
  padding: 10px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: #244c38;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.status-message {
  min-height: 1.3em;
  margin: 10px 0;
  color: #364152;
  font-size: 0.86rem;
  font-weight: 650;
}

.empty-results,
.error-panel {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed #bac3ce;
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  padding: 22px 0;
  background: #e8ecf1;
  color: var(--muted);
  font-size: 0.84rem;
}

.mobile-cart-button {
  display: none;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript-message {
  position: fixed;
  inset: auto 12px 12px;
  z-index: 20;
  padding: 16px;
  border-radius: 10px;
  background: #7f1d1d;
  color: #fff;
}

@media (max-width: 1180px) {
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field--search {
    grid-column: 1 / -1;
  }

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

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 22px, 720px);
  }

  .site-header {
    padding: 16px 0;
  }

  .site-header__content {
    align-items: end;
  }

  .mobile-cart-button {
    display: inline-flex;
    gap: 8px;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .site-header__content,
  .section-heading {
    align-items: flex-start;
  }

  .site-header__content {
    flex-direction: column;
  }

  .filters,
  .product-grid,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .field--search {
    grid-column: auto;
  }

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

  .result-count {
    white-space: normal;
  }
}
