:root {
  color-scheme: light;
  --ink: #19201f;
  --muted: #65706c;
  --line: #dfe6e2;
  --soft: #f5f8f6;
  --paper: #ffffff;
  --green: #128c7e;
  --green-dark: #075e54;
  --amber: #d89528;
  --red: #b84a4a;
  --shadow: 0 18px 45px rgba(24, 38, 35, .14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(238, 247, 250, .72), rgba(251, 252, 251, .86) 360px),
    #fbfcfb;
}

button, input, select, textarea { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand strong { display: block; font-size: 17px; }
.brand span:not(.mark) { display: block; color: var(--muted); font-size: 13px; }
.mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  background: var(--green-dark);
}

.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
}
.language { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.lang, .ghost, .cart-button, .primary, .secondary, .icon-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  min-height: 38px;
}
.lang { padding: 0 10px; color: var(--muted); background: transparent; }
.lang.active { color: white; background: var(--green-dark); }
.ghost { padding: 0 14px; background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  color: white;
  background: var(--green);
}
.cart-button b {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--green-dark);
  background: white;
  font-size: 12px;
}

main { padding: 28px clamp(18px, 4vw, 52px) 60px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 26px;
  align-items: stretch;
  min-height: 360px;
  padding: clamp(26px, 5vw, 54px);
  color: white;
  background:
    linear-gradient(90deg, rgba(4, 31, 55, .92) 0%, rgba(7, 50, 82, .72) 43%, rgba(7, 50, 82, .24) 100%),
    url("assets/peptide-vials-hero.png");
  background-size: cover;
  background-position: center center;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(7, 50, 82, .18);
}
.hero-copy { max-width: 760px; align-self: center; }
.eyebrow { margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0; font-size: 13px; font-weight: 800; }
h1 { margin: 0; max-width: 820px; font-size: clamp(34px, 5vw, 62px); line-height: 1; letter-spacing: 0; }
.hero-copy > p:not(.eyebrow) { max-width: 650px; margin: 20px 0 0; font-size: 18px; line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.primary, .secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 750;
}
.primary { color: white; background: var(--green); }
.secondary { color: var(--ink); background: white; border: 1px solid var(--line); }
.hero-panel {
  align-self: end;
  display: grid;
  gap: 12px;
  padding: 18px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
}
.hero-panel div { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero-panel span { color: rgba(255,255,255,.82); }
.hero-panel strong { font-size: 24px; }

.trust-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 430px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 22px;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(18, 140, 126, .11), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f4f9fb 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.trust-section::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -54px;
  width: 320px;
  height: 180px;
  opacity: .13;
  background:
    linear-gradient(90deg, transparent 0 16px, rgba(7, 94, 84, .9) 16px 20px, transparent 20px 64px),
    linear-gradient(0deg, rgba(7, 94, 84, .55) 0 16px, transparent 16px);
  border-radius: 90px 90px 12px 12px;
  transform: rotate(-8deg);
  pointer-events: none;
}
.trust-visual {
  position: relative;
  min-height: 420px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
}
.trust-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.trust-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
}
.trust-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
  color: #073252;
}
.trust-content > p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.qa-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.qa-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  overflow: hidden;
}
.qa-list summary {
  cursor: pointer;
  padding: 13px 14px;
  color: #073252;
  font-weight: 850;
  list-style: none;
}
.qa-list summary::-webkit-details-marker { display: none; }
.qa-list summary::after {
  content: "+";
  float: right;
  color: var(--green);
}
.qa-list details[open] summary::after { content: "-"; }
.qa-list details p {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--muted);
  line-height: 1.55;
}

.tools {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  align-items: end;
  margin-top: 24px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
}
textarea { resize: vertical; }

.catalog-shell {
  margin-top: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.catalog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.catalog-head h2 { margin: 0; font-size: 22px; }
.catalog-head span { color: var(--muted); font-size: 14px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; background: var(--soft); }
td { font-size: 14px; }
.code-cell { font-weight: 800; color: var(--green-dark); white-space: nowrap; }
.name-cell strong { display: block; margin-bottom: 4px; }
.name-cell span { color: var(--muted); font-size: 12px; }
.spec { color: var(--muted); }
.spec-select { min-width: 210px; padding-block: 8px; }
.price { font-weight: 800; white-space: nowrap; }
.qty-input { width: 76px; min-height: 36px; padding: 7px 8px; }
.add-button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; color: white; background: var(--green-dark); cursor: pointer; white-space: nowrap; }

.media-section {
  margin-top: 22px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: 24px; }
.section-head > span { max-width: 420px; color: var(--muted); font-size: 14px; text-align: right; }
.small { margin-bottom: 7px; color: var(--green-dark); }
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.media-card {
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.media-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: white;
}
.media-card a {
  min-height: 132px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green-dark);
  background: white;
  text-decoration: none;
  font-weight: 800;
}
.media-card strong { font-size: 15px; }
.media-card span { color: var(--muted); font-size: 12px; }

.drawer, .admin-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  justify-content: flex-end;
  background: rgba(12, 23, 20, .42);
}
.drawer.open, .admin-panel.open { display: flex; }
.drawer-card, .admin-card {
  width: min(480px, 100%);
  height: 100%;
  overflow: auto;
  padding: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.drawer-head span { display: block; color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.drawer-head strong { display: block; margin-top: 4px; font-size: 26px; }
.icon-button { width: 38px; height: 38px; font-size: 26px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); }
.cart-items { display: grid; gap: 10px; margin-bottom: 18px; }
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.cart-line strong { display: block; }
.cart-line small { display: block; color: var(--muted); margin-top: 4px; }
.cart-line button { color: var(--red); background: transparent; border: 0; cursor: pointer; font-weight: 800; }
.empty { padding: 18px; color: var(--muted); text-align: center; background: var(--soft); border-radius: 8px; }
.customer { display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.drawer-actions { display: grid; gap: 10px; margin-top: 16px; }
.full { width: 100%; min-height: 44px; }

.admin-card { width: min(980px, 100%); }
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.tab {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--soft);
  cursor: pointer;
}
.tab.active { color: white; background: var(--green-dark); border-color: var(--green-dark); }
.admin-section { display: none; }
.admin-section.active { display: grid; gap: 16px; }
.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.admin-form button,
.admin-form .form-actions { align-self: end; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.admin-toolbar span { color: var(--muted); font-size: 13px; }
.compact { max-height: 360px; border: 1px solid var(--line); border-radius: 8px; }
.compact table { min-width: 760px; }
.admin-list { display: grid; gap: 12px; }
.admin-item { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.admin-item h3 { margin: 0 0 8px; font-size: 16px; }
.admin-item p { margin: 5px 0; color: var(--muted); }
.admin-item pre { white-space: pre-wrap; margin: 10px 0 0; padding: 10px; border-radius: 8px; background: white; border: 1px solid var(--line); font-size: 12px; }
.mini-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mini-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}
.mini-actions .danger { color: var(--red); }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #dcefeb;
  font-size: 12px;
  font-weight: 800;
}
.status.open { color: #8a5a00; background: #fff0cf; }

@media (max-width: 860px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .actions { width: 100%; justify-content: space-between; }
  .hero { grid-template-columns: 1fr; }
  .trust-section { grid-template-columns: 1fr; }
  .trust-visual { min-height: 300px; }
  .qa-list { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .section-head > span { text-align: left; }
  .admin-form { grid-template-columns: 1fr; }
  .admin-toolbar { align-items: start; flex-direction: column; }
}

@media (max-width: 560px) {
  main { padding-inline: 12px; }
  .hero { padding: 24px; min-height: 420px; }
  .actions { gap: 8px; }
  .nav-link { padding-inline: 6px; }
  .language { order: 3; width: 100%; }
  .lang { flex: 1; }
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(4, 31, 55, .88), rgba(7, 50, 82, .42)),
    url("assets/peptide-vials-hero.png");
  background-size: cover;
  background-position: center;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  padding: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.login-brand { margin-bottom: 22px; }
.login-card h1 { margin: 0; font-size: 34px; color: var(--ink); }
.login-card p { color: var(--muted); line-height: 1.5; }
.login-form { display: grid; gap: 14px; margin-top: 18px; }
.login-message { min-height: 24px; font-weight: 750; color: var(--red); }
