:root {
  --bg: #f6f7f2;
  --surface: #ffffff;
  --ink: #18211f;
  --muted: #637069;
  --line: #dfe5dc;
  --accent: #006c67;
  --accent-dark: #004f4b;
  --gold: #d69b1e;
  --danger: #a83d32;
  --shadow: 0 10px 28px rgba(24, 33, 31, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 14px clamp(16px, 4vw, 42px);
  background: rgba(246, 247, 242, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand,
.top-actions,
.contact-link,
.hero-stats,
.toolbar,
.catalog-head,
.meta-row,
.price-row,
.product-actions,
.cart-header,
.total-row,
.category-tabs,
.category-strip {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  border-radius: 8px;
}

.brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.top-actions {
  gap: 10px;
}

.contact-link {
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  font-weight: 700;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-button span {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: #201500;
  font-size: 0.75rem;
  font-weight: 800;
}

.icon-button.ghost {
  background: transparent;
}

main {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

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

h1 {
  max-width: 840px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-stats {
  gap: 10px;
}

.hero-stats div {
  min-width: 118px;
  padding: 14px 16px;
  background: #eef4ed;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-stats strong {
  display: block;
  font-size: 1.45rem;
}

.hero-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.toolbar {
  gap: 12px;
  justify-content: space-between;
  margin-top: 16px;
}

.search-box,
.select-box {
  display: flex;
  align-items: center;
  min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-box {
  flex: 1 1 auto;
  gap: 10px;
  padding: 0 14px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.select-box {
  flex: 0 0 230px;
  gap: 10px;
  padding: 0 12px;
}

.select-box span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.select-box select {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.category-tabs {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(24, 33, 31, 0.05);
}

.category-strip {
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: thin;
}

.category-button {
  white-space: nowrap;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.category-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.category-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 108, 103, 0.28);
}

.catalog-head {
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 14px;
}

.catalog-head h2 {
  margin-bottom: 4px;
  font-size: 1.35rem;
}

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

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

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

.product-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(24, 33, 31, 0.06);
}

.image-wrap {
  display: block;
  aspect-ratio: 4 / 3;
  background: #eef0eb;
  border-bottom: 1px solid var(--line);
}

.image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 12px;
  mix-blend-mode: multiply;
}

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

.meta-row {
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 22px;
}

.brand-name,
.category-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 800;
}

.brand-name {
  color: var(--accent-dark);
}

.category-name {
  color: var(--muted);
}

.product-card h3 {
  min-height: 62px;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.38;
}

.price-row {
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.price-row strong {
  font-size: 1.28rem;
}

.price-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-actions {
  gap: 8px;
  min-width: 0;
}

.product-actions .primary-button {
  width: 100%;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  flex: 1;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

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

.secondary-button {
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  justify-content: flex-end;
  background: rgba(12, 18, 17, 0.38);
}

.cart-drawer.open {
  display: flex;
}

.cart-panel {
  width: min(440px, 100%);
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cart-header {
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.cart-header h2 {
  margin-bottom: 0;
}

.cart-items {
  overflow-y: auto;
  padding: 12px 20px;
}

.cart-empty {
  margin-top: 36px;
  color: var(--muted);
  text-align: center;
}

.cart-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  background: #eef0eb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.3;
}

.cart-item span {
  color: var(--muted);
  font-size: 0.85rem;
}

.qty-controls {
  display: grid;
  grid-template-columns: 30px 34px 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.qty-controls button {
  width: 30px;
  height: 32px;
  border: 0;
  background: #eef4ed;
  cursor: pointer;
}

.qty-controls b {
  text-align: center;
}

.cart-footer {
  display: grid;
  gap: 10px;
  padding: 18px 20px 22px;
  border-top: 1px solid var(--line);
}

.total-row {
  justify-content: space-between;
  font-size: 1.1rem;
}

.cart-footer .primary-button,
.cart-footer .secondary-button {
  width: 100%;
}

.no-results {
  grid-column: 1 / -1;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 2.2;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .contact-link {
    width: 100%;
  }

  .contact-link {
    justify-content: center;
  }

  .top-actions .icon-button {
    margin-left: auto;
  }

  main {
    width: min(100% - 20px, 1440px);
    padding-top: 12px;
  }

  .store-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  h1 {
    font-size: 2.2rem;
  }

  .hero-stats {
    align-items: stretch;
  }

  .hero-stats div {
    flex: 1;
    min-width: 0;
  }

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

  .select-box {
    flex-basis: auto;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 10px;
  }

  .product-card h3 {
    min-height: 78px;
    font-size: 0.88rem;
    -webkit-line-clamp: 4;
  }

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

  .secondary-button {
    width: 100%;
  }
}
