:root {
  color-scheme: light;
  --page: #f7f7f2;
  --paper: #fff;
  --ink: #1e2118;
  --muted: #5e6257;
  --line: #dfe1d8;
  --lime: #d4f26f;
  --lime-hover: #e2fa9e;
  --olive: #3f5324;
  --dark: #171a14;
  --width: 1160px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body { margin: 0; background: var(--page); color: var(--ink); line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-underline-offset: .2em; }
p, h1, h2, h3 { margin: 0; }
img { display: block; max-width: 100%; }
.icon-library { position: absolute; }
.icon {
  flex: none;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:focus-visible { outline: 2px solid #4e681b; outline-offset: 4px; }

.wrap { width: min(var(--width), calc(100% - 3rem)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 5; top: .5rem; left: .5rem; padding: .65rem 1rem; background: var(--lime); }

.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -.045em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-light { font-weight: 650; }
.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 36px;
  height: 36px;
  padding-bottom: 9px;
  background: var(--lime);
  border-radius: 9px;
}
.brand-mark i { width: 5px; height: 8px; border-radius: 1px; background: var(--ink); }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 18px; }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-size: .93rem; font-weight: 650; text-decoration: none; }
.main-nav .icon { color: var(--olive); }
.main-nav a:hover, .site-footer a:hover { text-decoration: underline; }
.cart-toggle {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: .55rem;
  min-height: 44px;
  padding: .45rem .65rem .45rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: .9rem;
  font-weight: 700;
}
.cart-toggle:hover, .btn-outline:hover { background: #eff0e7; }
.cart-toggle span {
  display: grid;
  place-items: center;
  min-width: 25px;
  min-height: 25px;
  padding-inline: .35rem;
  border-radius: 999px;
  background: var(--lime);
  font-size: .82rem;
}

.hero {
  display: grid;
  grid-template-columns: 41% 59%;
  overflow: hidden;
  margin-block: 1.25rem 3.75rem;
  border-radius: 24px;
  background: var(--dark);
  color: #fbfcf7;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  padding: clamp(2rem, 4.5vw, 4rem);
}
.eyebrow { margin-bottom: 1rem; color: var(--lime); font-size: .875rem; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
h1 { font-size: clamp(3rem, 5.2vw, 4.25rem); font-weight: 780; letter-spacing: -.06em; line-height: .99; }
.hero-copy h1 + p { max-width: 29ch; margin-block: 1.2rem 1.5rem; color: #d7dbcf; }
.hero-image { width: 100%; height: 100%; min-height: 385px; object-fit: cover; object-position: 54% 50%; }
.hero a:focus-visible { outline-color: var(--lime); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  padding: .62rem 1rem;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink);
  font-weight: 750;
  font-size: .93rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}
.btn-primary { background: var(--lime); }
.btn-primary:hover { background: var(--lime-hover); }
.btn-outline { background: var(--paper); border-color: var(--line); }

.section-head, .filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}
h2 { font-size: clamp(1.65rem, 3.2vw, 2.4rem); line-height: 1.15; letter-spacing: -.05em; }
.section-head p { margin-top: .45rem; color: var(--muted); }
.search-label { position: relative; display: block; width: min(100%, 17rem); }
.search-label .icon { position: absolute; top: 50%; left: .8rem; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.search-label input {
  width: 100%;
  min-height: 44px;
  padding: .55rem .85rem .55rem 2.2rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
}
.search-label input::placeholder { color: var(--muted); }
.filter-row { align-items: center; margin-block: 1.15rem .85rem; }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.filters button {
  min-height: 44px;
  padding: .45rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 650;
}
.filters button:hover { background: #eff0e7; }
.filters button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.result-count { color: var(--muted); font-size: .9rem; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}
.product-image, .detail-image { width: 100%; height: auto; aspect-ratio: 5 / 3; background: #c4c7b6; }
.product-content { display: flex; flex: 1; flex-direction: column; padding: .85rem 1.05rem; }
.product-card h3 { font-size: 1.05rem; line-height: 1.3; }
.product-type { margin-bottom: .35rem; color: var(--olive); font-size: .875rem; font-weight: 700; }
.product-name { padding: .2rem 0; border: 0; background: none; color: inherit; font-weight: 750; text-align: left; }
.product-name:hover { text-decoration: underline; text-underline-offset: .2em; }
.product-spec { flex: 1; margin-block: .28rem .65rem; color: var(--muted); font-size: .9rem; }
.product-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .3rem .65rem; }
.product-price { white-space: nowrap; }
.add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  min-width: 56px;
  min-height: 44px;
  padding: .38rem .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f5e9;
  color: var(--olive);
  font-weight: 750;
  font-size: .875rem;
}
.add-button .icon { width: .85rem; height: .85rem; }
.add-button:hover { border-color: #abbc84; background: #edf6d6; }
.more-row { margin-top: 1rem; text-align: center; }
.empty-message { padding: 1.15rem; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }

.company {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 2rem;
  margin-block: 3.5rem 2.75rem;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #eef1e7;
}
.company h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
.company h3 { font-size: 1.1rem; }
.company-registration { margin-block: .4rem .55rem; font-weight: 650; }
.company p, address { color: #4c5145; }
address { margin-top: .35rem; font-style: normal; }
.contact-links { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin-top: .4rem; font-weight: 650; }
.contact-links a { display: flex; align-items: center; gap: .42rem; min-height: 44px; overflow-wrap: anywhere; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .3rem 1rem; min-height: 60px; }
.footer-row a { display: inline-flex; align-items: center; min-height: 44px; }

dialog {
  width: min(37rem, calc(100% - 1.5rem));
  max-height: calc(100% - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop { background: rgb(20 23 17 / 64%); }
.dialog-head {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.dialog-head h2 { font-size: clamp(1.3rem, 4vw, 1.7rem); }
.dialog-head h2:focus { outline: none; }
.dialog-body { padding: 1.05rem 1.1rem 1.2rem; }
.icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}
.icon-button:hover { background: var(--page); }
.detail-image { max-width: 420px; margin: 0 auto .9rem; border-radius: 10px; }
.detail-price { margin-block: .85rem; font-size: 1.3rem; font-weight: 750; }
.cart-items, .checkout-items { margin: 0; padding: 0; list-style: none; }
.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .4rem 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-item:first-child { padding-top: 0; }
.cart-item-main strong, .line-unit-price { display: block; }
.line-unit-price { color: var(--muted); }
.line-controls { display: flex; flex-wrap: wrap; gap: .4rem .65rem; grid-column: span 2; }
.quantity-control { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.quantity-control button, .remove-button { min-width: 44px; min-height: 44px; padding: .3rem .45rem; border: 0; background: none; color: var(--ink); }
.quantity-control button { font-size: 1.1rem; }
.quantity-control button:not(:disabled):hover, .remove-button:hover { background: var(--page); }
.quantity { min-width: 2ch; text-align: center; }
.remove-button { color: var(--muted); font-size: .875rem; text-decoration: underline; }
.dialog-summary { margin-top: .9rem; }
.total-line, .checkout-item { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.total-line { margin-block: .9rem; font-size: 1.05rem; font-weight: 700; }
.line-price, .total-line strong, .checkout-item strong { white-space: nowrap; }
.checkout-item { padding-block: .6rem; border-bottom: 1px solid var(--line); }
.payment-status { display: flex; align-items: center; gap: .55rem; margin-bottom: .9rem; padding: .8rem; border-radius: 8px; background: #eef1e7; color: #3c4235; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 45% 55%; }
  .hero-copy { padding: 1.75rem; }
  .hero-image { min-height: 345px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 7rem; }
  .wrap { width: calc(100% - 1.5rem); }
  .header-row { grid-template-columns: 1fr auto; grid-template-rows: 56px auto; gap: 0 .75rem; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-around; gap: 0; border-top: 1px solid var(--line); }
  .main-nav a { flex: 1; justify-content: center; font-size: .875rem; }
  .hero { grid-template-columns: 1fr; margin-block: .75rem 2.15rem; border-radius: 16px; }
  .hero-copy { padding: 1.4rem 1.15rem 1.55rem; }
  .hero-copy h1 + p { margin-block: .85rem 1rem; }
  .hero-image { height: auto; min-height: 0; aspect-ratio: 1.95; object-position: 50% 50%; }
  .section-head { gap: .7rem; }
  .search-label { width: 100%; }
  .filter-row { gap: .35rem; margin-top: .75rem; }
  .filters { gap: .35rem; }
  .filters button { padding-inline: .64rem; }
  .company { grid-template-columns: 1fr; gap: 1rem; margin-block: 2.3rem 1.5rem; }
}

@media (max-width: 390px) {
  .product-content { padding-inline: .68rem; }
  .product-grid { gap: .5rem; }
  .product-price { font-size: .9rem; }
  .add-button { padding-inline: .48rem; }
  .filters button { padding-inline: .48rem; font-size: .875rem; }
}
