:root {
  --bg: #f6f8fb;
  --ink: #111827;
  --muted: #5d6878;
  --line: #dbe3ee;
  --panel: #ffffff;
  --panel-soft: #eef4f8;
  --blue: #155e75;
  --blue-dark: #0f3f53;
  --green: #0f766e;
  --gold: #c58127;
  --shadow: 0 20px 60px rgba(18, 38, 63, 0.12);
  --radius: 8px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(120deg, rgba(21, 94, 117, 0.08), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(15, 118, 110, 0.12), transparent 28%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 32px), var(--max));
  margin: 14px auto 0;
  padding: 14px 16px;
  border: 1px solid rgba(219, 227, 238, 0.85);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(18, 38, 63, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; }
.brand small { color: var(--muted); font-size: 0.78rem; }

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
}

.nav a:hover, .cart-link {
  color: var(--ink);
  background: var(--panel-soft);
}

.cart-link span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  color: white;
  border-radius: 999px;
  background: var(--blue);
  font-size: 0.78rem;
}

main, .footer {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
  gap: 42px;
  align-items: center;
  min-height: 640px;
  padding: 64px 0 40px;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.hero-actions, .card-actions, .checkout-actions, .admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--blue); box-shadow: 0 12px 30px rgba(21, 94, 117, 0.22); }
.button.secondary { color: var(--blue-dark); background: var(--panel-soft); border: 1px solid var(--line); }
.button.warn { color: white; background: #a43f3f; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 650px;
  margin-top: 34px;
}

.hero-stats article, .trust-band article, .product-card, .detail-panel, .cart-panel, .admin-panel, .process-list article, .review-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 34px rgba(18, 38, 63, 0.07);
}

.hero-stats article { padding: 16px; }
.hero-stats strong { display: block; font-size: 1.5rem; }
.hero-stats span { color: var(--muted); font-size: 0.9rem; }

.hero-visual {
  min-height: 500px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(15, 63, 83, 0.96), rgba(15, 118, 110, 0.74)),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.22), transparent 30%);
  box-shadow: var(--shadow);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.vial-stage {
  position: absolute;
  inset: 42px 34px 140px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 22px;
}

.vial {
  width: 86px;
  height: 260px;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 18px 18px 28px 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.2) 38%, rgba(107, 210, 199, .35));
  box-shadow: inset 0 0 24px rgba(255,255,255,.28), 0 22px 45px rgba(0,0,0,.2);
}

.vial::before {
  content: "";
  display: block;
  width: 58px;
  height: 36px;
  margin: -28px auto 0;
  border-radius: 8px 8px 2px 2px;
  background: #d7e5ef;
}

.vial-two { height: 310px; }
.vial-three { height: 228px; }

.lab-card {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  color: white;
  background: rgba(5, 25, 36, 0.72);
  backdrop-filter: blur(16px);
}

.lab-card span { color: rgba(255,255,255,.72); }
.lab-card strong { display: block; margin: 6px 0; font-size: 1.35rem; }
.lab-card p { margin: 0; color: rgba(255,255,255,.76); }

.trust-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px auto 70px;
}

.trust-band article, .process-list article { padding: 20px; }
.trust-band p, .process-list p, .section-heading p, .detail-panel p, .cart-panel p, .admin-panel p { color: var(--muted); line-height: 1.6; }

.section { padding: 38px 0 64px; }

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

.section-heading h2, .split-section h2, .product-title h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  letter-spacing: 0;
  line-height: 1;
}

.catalog-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: white;
}

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

.catalog-tools input { width: min(52vw, 330px); }

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

.product-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.product-open { display: block; }
.product-category {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.product-card h3 {
  min-height: 54px;
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.variant-picker span, .field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.product-meta {
  display: grid;
  gap: 5px;
  margin-top: auto;
}

.product-meta strong { font-size: 1.2rem; }
.product-meta span { color: var(--muted); font-size: 0.9rem; }
.card-actions .button { flex: 1; }

.split-section {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 34px;
  align-items: start;
}

.process-list {
  display: grid;
  gap: 12px;
}

.process-list span {
  color: var(--gold);
  font-weight: 900;
}

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

.review-card {
  padding: 20px;
}

.review-card h3 {
  margin: 10px 0;
  font-size: 1.15rem;
}

.review-card p {
  color: var(--muted);
  line-height: 1.6;
}

.review-card strong,
.review-card span {
  display: block;
}

.review-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: .9rem;
}

.stars {
  color: var(--gold);
  letter-spacing: .08em;
}

.detail-layout, .cart-layout, .admin-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(340px, .55fr);
  gap: 18px;
  align-items: start;
  padding: 46px 0 70px;
}

.product-title {
  padding: 48px 0 10px;
}

.breadcrumbs { color: var(--muted); margin-bottom: 16px; }

.detail-panel, .cart-panel, .admin-panel {
  padding: 22px;
}

.variant-table, .cart-list, .admin-list, .result-grid {
  display: grid;
  gap: 10px;
}

.variant-row, .cart-row, .admin-row, .crypto-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.variant-row.active { border-color: rgba(21, 94, 117, .5); background: #e6f3f5; }
.variant-row button { justify-self: end; }
.row-muted { color: var(--muted); font-size: .9rem; }
.price { font-weight: 900; font-size: 1.12rem; }

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

.result-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255,255,255,.6);
  text-align: center;
}

.checkout-summary {
  position: sticky;
  top: 96px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.summary-line.total {
  font-size: 1.25rem;
  font-weight: 900;
  border-bottom: 0;
}

.checkout-form {
  margin-top: 18px;
}

.payment-panel {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.payment-panel h3 {
  margin: 0 0 6px;
}

.crypto-row {
  grid-template-columns: auto 1fr;
  overflow-wrap: anywhere;
}

.crypto-row strong { display: block; }
.crypto-row span { color: var(--muted); font-size: .9rem; }

.admin-layout { grid-template-columns: 320px 1fr; }
.admin-nav { display: grid; gap: 8px; position: sticky; top: 96px; }
.admin-nav button { text-align: left; }
.admin-section { display: none; }
.admin-section.active { display: grid; gap: 16px; }
.admin-row { grid-template-columns: 1fr auto auto; }
.order-row { align-items: start; }
.order-row .row-muted { display: block; margin-top: 4px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-form-grid .full { grid-column: 1 / -1; }
.thumb-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.thumb-list img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 0 50px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .site-header, .section-heading, .footer { align-items: stretch; flex-direction: column; }
  .nav { flex-wrap: wrap; }
  .hero, .split-section, .detail-layout, .cart-layout, .admin-layout { grid-template-columns: 1fr; min-height: auto; }
  .hero { padding-top: 42px; }
  .hero-visual { min-height: 420px; }
  .trust-band, .catalog-grid, .review-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .catalog-tools { flex-direction: column; align-items: stretch; }
  .catalog-tools input { width: 100%; }
  .checkout-summary, .admin-nav { position: static; }
}

@media (max-width: 560px) {
  main, .footer, .site-header { width: min(calc(100% - 20px), var(--max)); }
  .hero h1 { font-size: 3rem; }
  .hero-visual { min-height: 360px; }
  .vial { width: 62px; height: 210px; }
  .vial-two { height: 250px; }
  .vial-three { height: 185px; }
  .admin-form-grid, .result-grid, .thumb-list { grid-template-columns: 1fr; }
  .variant-row, .cart-row, .admin-row { grid-template-columns: 1fr; }
}
