:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;
  --border: #E5E7EB;
  --text: #111827;
  --muted: #6B7280;
  --muted-2: #9CA3AF;
  --accent: #0E7490;
  --accent-soft: #ECFEFF;
  --accent-contrast: #FFFFFF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

h1, h2, .brand { font-family: 'Space Grotesk', system-ui, sans-serif; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #0B5A70; }

button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; }
.page { width: 100%; max-width: 1280px; margin: 0 auto; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 32px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted); flex-wrap: wrap;
}
.topbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-phone { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.topbar-phone:hover { color: var(--accent); }
.topbar-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.topbar-sep { color: var(--border); }
.topbar-right a { color: var(--muted); }
.topbar-right a:hover { color: var(--accent); }

.header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px 32px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
  background: var(--surface); position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 2px rgba(17,24,39,.03);
}
.header nav { display: flex; gap: 22px; flex-wrap: wrap; }
.header nav a { font-size: 14px; font-weight: 500; color: var(--muted); }
.header nav a.active { color: var(--text); font-weight: 600; }

.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px;
  flex: 1 1 auto; min-width: 220px; max-width: 560px;
}

.cart-link {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); flex-shrink: 0;
}
.cart-link:hover { border-color: var(--accent); color: var(--accent); }
.cart-badge {
  position: absolute; top: -6px; right: -6px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.search-box input {
  border: none; outline: none; font-size: 14px; width: 100%; background: transparent; color: var(--text);
}

.chips { display: flex; gap: 10px; padding: 18px 32px; overflow-x: auto; }
.chip {
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); color: #374151;
}
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chip:hover { border-color: #9CA3AF; }

.section { padding: 8px 32px 48px 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.section-head h1 { font-size: 21px; font-weight: 700; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 10px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  box-shadow: 0 1px 2px rgba(17,24,39,.03);
}
.card:hover { border-color: var(--accent); box-shadow: 0 10px 24px rgba(17,24,39,.08); transform: translateY(-2px); }

.card-thumb {
  background: var(--surface-2); border-radius: 10px; height: 150px;
  display: flex; align-items: center; justify-content: center; color: var(--muted-2);
  overflow: hidden;
}
.card-thumb img { mix-blend-mode: multiply; }
.card-cat { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.card h2 { font-size: 15px; font-weight: 600; margin: 0; line-height: 1.3; color: var(--text); }
.card p.spec { font-size: 13px; color: var(--muted); margin: 0; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.price { font-size: 18px; font-weight: 800; color: var(--text); }
.btn-buy {
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 9px 14px; font-size: 13px; font-weight: 600;
}
.btn-buy:hover { background: #0B5A70; }

.cat-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.cat-card .count { font-size: 13px; color: var(--muted); }

.product-page { display: grid; grid-template-columns: 420px 1fr; gap: 32px; padding: 32px; }
@media (max-width: 800px) { .product-page { grid-template-columns: 1fr; } }
.product-gallery { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; height: 360px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-gallery img { mix-blend-mode: multiply; }
.product-info h1 { font-size: 26px; margin: 0 0 12px 0; color: var(--text); }
.product-info .price { font-size: 30px; display: block; margin: 16px 0; color: var(--text); }
.product-info .desc { color: var(--muted); line-height: 1.6; }
.breadcrumbs { font-size: 13px; color: var(--muted); padding: 16px 32px 0 32px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

.empty-state { padding: 60px 32px; text-align: center; color: var(--muted); }

.cart-item { flex-direction: row; align-items: center; gap: 12px 16px; padding: 14px 16px; flex-wrap: wrap; }
.cart-item-thumb { width: 64px; height: 64px; flex-shrink: 0; }
.cart-item-info { flex: 1 1 160px; min-width: 160px; }
.cart-item-controls { display: flex; align-items: center; gap: 16px; flex-shrink: 0; margin-left: auto; }
@media (max-width: 560px) {
  .cart-item-controls { flex-basis: 100%; margin-left: 80px; justify-content: space-between; }
}
@media (max-width: 420px) {
  .cart-item-controls { margin-left: 0; }
}

.footer { margin-top: 56px; padding: 40px 32px 0 32px; border-top: 1px solid var(--border); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
@media (max-width: 700px) { .footer-top { grid-template-columns: 1fr; } }
.footer-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin-bottom: 14px; }
.footer-text { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-list a { color: var(--muted); font-size: 13px; }
.footer-list a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 18px 0 32px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted);
}
