:root {
  --ink: #18201f;
  --muted: #687370;
  --line: #dce6e3;
  --bg: #f5f8f6;
  --panel: #ffffff;
  --mint: #dff5ee;
  --aqua: #21a994;
  --aqua-dark: #087b70;
  --blue: #315c86;
  --sun: #f1c75b;
  --coral: #dc6b55;
  --danger: #aa3f36;
  --shadow: 0 18px 46px rgba(20, 38, 34, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f9fbfa 0, var(--bg) 360px),
    var(--bg);
  line-height: 1.5;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 7px clamp(16px, 4vw, 56px);
  color: var(--muted);
  font-size: 13px;
  background: #f0f7f4;
}

.utility-bar nav {
  display: flex;
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 56px);
  background: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 188px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--aqua-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.brand strong { font-size: 18px; }
.brand small { display: block; color: var(--muted); font-size: 12px; }

.topbar nav, footer nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.topbar nav a:hover, footer nav a:hover { color: var(--aqua-dark); }

.search-box {
  flex: 1;
  max-width: 640px;
}

.search-box input {
  min-height: 46px;
  border: 2px solid var(--aqua);
  background: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--aqua-dark);
  font-weight: 800;
  white-space: nowrap;
}

.account-button:hover { background: var(--mint); }

.category-bar {
  display: flex;
  gap: 8px;
  padding: 0 clamp(16px, 4vw, 56px) 12px;
  overflow-x: auto;
  background: #fff;
}

.category-bar a {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.category-bar a.active,
.category-bar a:hover {
  background: var(--aqua-dark);
  color: #fff;
}

.cart-button, .primary-button, .primary-link, .secondary-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.cart-button, .primary-button, .primary-link {
  background: var(--aqua-dark);
  color: #fff;
}

.secondary-button {
  min-height: 46px;
  padding: 12px 18px;
  background: #fff;
  color: var(--aqua-dark);
  border: 1px solid var(--line);
}

.cart-button { padding: 10px 12px; white-space: nowrap; }
.cart-button span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--aqua-dark);
}

.primary-link, .primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 12px 18px;
}

.primary-button:hover, .primary-link:hover, .cart-button:hover { background: #055f57; }
.secondary-button:hover { border-color: var(--aqua); background: var(--mint); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .82fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: 480px;
  padding: clamp(34px, 6vw, 76px) clamp(16px, 4vw, 56px);
  background:
    url("img/hero-xl.svg") right 7% center / min(47vw, 570px) auto no-repeat,
    linear-gradient(128deg, #f7fbfa 0%, #e7f6ef 54%, #fff5da 100%);
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(44px, 8vw, 96px);
  line-height: .94;
  letter-spacing: 0;
}

.hero p { max-width: 580px; color: var(--muted); font-size: 18px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--aqua-dark);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.hero-panel {
  display: grid;
  gap: 12px;
  max-width: 360px;
  margin-left: auto;
}

.hero-panel div, .trust span, .product-card, .order-form, .admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
}

.hero-panel div {
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero-panel div:nth-child(2) { border-left: 5px solid var(--sun); }
.hero-panel div:nth-child(3) { border-left: 5px solid var(--coral); }
.hero-panel strong { display: block; font-size: 25px; }
.hero-panel span { color: var(--muted); }

.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 22px clamp(16px, 4vw, 56px);
}

.trust span {
  padding: 14px 16px;
  color: var(--muted);
  background: #fff;
}

.trust span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--aqua);
}

.shop-section, .order-section, .admin-main, .account-section {
  padding: clamp(34px, 6vw, 76px) clamp(16px, 4vw, 56px);
}

.section-head, .order-section, .account-section {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  align-items: flex-start;
}

.account-section {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.account-section > div:first-child { max-width: 420px; }

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 16px;
  width: min(100%, 860px);
}

.account-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.account-form h3 {
  margin: 0;
  font-size: 20px;
}

h2 { margin: 0; font-size: clamp(28px, 4vw, 44px); letter-spacing: 0; }

.filter {
  display: grid;
  gap: 6px;
  min-width: 230px;
  color: var(--muted);
  font-size: 14px;
}

select, input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

select:focus, input:focus, textarea:focus {
  outline: 3px solid rgba(33, 169, 148, .18);
  border-color: var(--aqua);
}

textarea { min-height: 96px; resize: vertical; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.product-card {
  display: grid;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(24, 32, 31, .06);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 18px;
  background: linear-gradient(180deg, #fff, #eef7f4);
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.product-body h3 {
  min-height: 48px;
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.product-body p {
  min-height: 66px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.product-meta:first-child span:first-child {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--aqua-dark);
  font-weight: 800;
}

.price { color: var(--blue); font-size: 22px; font-weight: 900; }
.stock.ok { color: var(--aqua-dark); }
.stock.low { color: var(--danger); }

.order-section {
  background: linear-gradient(120deg, #e7f6ef, #f9f0d7);
  align-items: stretch;
}

.order-section > div { max-width: 520px; }
.order-form { display: grid; gap: 12px; width: min(100%, 520px); padding: 18px; box-shadow: var(--shadow); }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.check input { width: auto; margin-top: 4px; }
.form-note { margin: 0; color: var(--muted); font-size: 14px; }

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 10;
  width: min(420px, 100%);
  padding: 18px;
  background: #fff;
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform .2s ease;
  box-shadow: -18px 0 50px rgba(0,0,0,.16);
}

.cart-drawer.open { transform: translateX(0); }
.cart-head, .cart-row, .cart-total { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.cart-head button, .qty button { border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; }
.cart-head button { width: 38px; height: 38px; font-size: 18px; }
.cart-items { display: grid; gap: 12px; margin: 18px 0; }
.cart-row { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button { width: 28px; height: 28px; }
.cart-total { margin: 18px 0; font-size: 18px; }
.full { width: 100%; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(16px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: #fff;
}

.legal {
  max-width: 880px;
  margin: 0 auto;
  padding: 44px 16px;
}

.legal p, .legal li { color: var(--muted); }

.admin-panel {
  display: grid;
  gap: 14px;
  max-width: 900px;
  padding: 18px;
}

.admin-panel textarea {
  min-height: 420px;
  font-family: Consolas, monospace;
}

@media (max-width: 860px) {
  .utility-bar { display: grid; }
  .utility-bar nav { overflow-x: auto; }
  .topbar { flex-wrap: wrap; gap: 12px; }
  .search-box { order: 3; max-width: none; width: 100%; flex-basis: 100%; }
  .header-actions { margin-left: auto; }
  .hero, .order-section, .section-head, .account-section { grid-template-columns: 1fr; display: grid; }
  .hero {
    min-height: 680px;
    background-size: min(92vw, 470px) auto;
    background-position: center bottom 28px;
    align-items: start;
  }
  .hero-panel { max-width: none; margin: 0 0 260px; }
  .trust, .product-grid, .account-grid { grid-template-columns: 1fr; }
  footer { display: grid; }
}

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