:root {
  --ink: #101820;
  --ink-soft: #39434d;
  --paper: #fbfcfb;
  --panel: #ffffff;
  --line: #d9e1df;
  --teal: #10bfae;
  --teal-dark: #087d77;
  --gold: #b8842f;
  --coral: #e66d52;
  --charcoal: #11181f;
  --shadow: 0 18px 60px rgba(16, 24, 32, 0.18);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 72px;
  padding: 0 clamp(18px, 4vw, 42px);
  background: rgba(251, 252, 251, 0.9);
  border-bottom: 1px solid rgba(217, 225, 223, 0.8);
  backdrop-filter: blur(18px);
}

.brand,
.main-nav,
.cart-open {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--charcoal);
  border: 2px solid var(--teal);
  border-radius: 8px;
  font-size: 14px;
}

.main-nav {
  gap: 22px;
  color: var(--ink-soft);
  font-size: 14px;
}

.main-nav a {
  padding: 10px 0;
}

.main-nav a:hover {
  color: var(--teal-dark);
}

.cart-open,
.primary-btn,
.secondary-btn,
.stripe-btn,
.icon-btn {
  border: 0;
  cursor: pointer;
}

.cart-open {
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  color: #fff;
  background: var(--charcoal);
  border-radius: 8px;
}

.cart-open strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  color: var(--charcoal);
  background: var(--teal);
  border-radius: 999px;
  font-size: 13px;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 128px));
  max-height: 860px;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 11, 14, 0.88) 0%, rgba(8, 11, 14, 0.65) 37%, rgba(8, 11, 14, 0.08) 72%),
    linear-gradient(0deg, rgba(16, 24, 32, 0.42) 0%, rgba(16, 24, 32, 0) 44%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 36px));
  margin-left: clamp(18px, 7vw, 92px);
  padding: 62px 0;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.admin-header h1,
.download-card h1 {
  margin: 0;
  line-height: 1.08;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 900;
}

.hero-lead {
  max-width: 570px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-btn {
  color: #07201e;
  background: var(--teal);
  box-shadow: 0 10px 28px rgba(16, 191, 174, 0.28);
}

.primary-btn:hover {
  background: #20d5c3;
}

.stripe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  color: #fff;
  background: #635bff;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(99, 91, 255, 0.22);
  font-weight: 900;
}

.stripe-btn:hover {
  background: #5148ee;
}

.stripe-btn-card {
  background: #101820;
  box-shadow: 0 10px 28px rgba(16, 24, 32, 0.2);
}

.stripe-btn-card:hover {
  background: #26313b;
}

.stripe-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary-btn {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.hero .secondary-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.wide {
  width: 100%;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin-top: 34px;
}

.metric-row div {
  min-height: 84px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.metric-row strong,
.metric-row span {
  display: block;
}

.metric-row strong {
  font-size: 30px;
  line-height: 1;
}

.metric-row span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.section {
  padding: 72px clamp(18px, 4vw, 42px);
}

.section-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.intro-band {
  background: #eef8f5;
}

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 420px);
  gap: 34px;
  align-items: center;
}

.price-copy h2,
.section-heading h2,
.checkout-copy h2 {
  font-size: 38px;
}

.price-copy p,
.checkout-copy p {
  color: var(--ink-soft);
}

.full-pack-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-label {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.full-pack-panel h3,
.category-card h3,
.checkout-form h3 {
  margin: 0;
  line-height: 1.2;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 13px;
}

.price-stack {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: #fff7ec;
  border: 1px solid #edd7b2;
  border-radius: 8px;
}

.regular-price {
  color: #8a6c3c;
  text-decoration: line-through;
}

.price-stack strong {
  color: var(--charcoal);
  font-size: 34px;
}

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

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

.catalog-tools input,
.catalog-tools select,
.checkout-form input,
.checkout-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

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

.category-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  min-height: 365px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 191, 174, 0.6);
  box-shadow: 0 16px 38px rgba(16, 24, 32, 0.1);
}

.category-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.category-no {
  color: var(--gold);
  font-weight: 900;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 30px;
  color: var(--teal-dark);
  background: #e8faf6;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

.sample-list {
  display: grid;
  gap: 7px;
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
}

.sample-list li {
  overflow: hidden;
  color: #26333d;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.category-price {
  color: var(--charcoal);
  font-size: 24px;
  font-weight: 900;
}

.add-btn {
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  background: var(--charcoal);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.add-btn.is-added {
  color: var(--charcoal);
  background: var(--teal);
}

.checkout-band {
  color: #fff;
  background: var(--charcoal);
}

.checkout-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.checkout-copy p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.78);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(480px, 100vw);
  height: 100vh;
  transform: translateX(104%);
  transition: transform 180ms ease;
}

body.cart-visible .cart-drawer {
  transform: translateX(0);
}

.drawer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: 100%;
  background: #fff;
  box-shadow: -18px 0 60px rgba(16, 24, 32, 0.26);
}

.drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  margin: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  color: var(--ink);
  background: #eef3f2;
  border-radius: 8px;
  font-size: 28px;
  line-height: 1;
}

.cart-lines {
  overflow: auto;
  padding: 16px 22px;
}

.empty-cart {
  padding: 24px;
  color: var(--ink-soft);
  background: #f4f8f7;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

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

.cart-line h4 {
  margin: 0;
  line-height: 1.25;
}

.cart-line p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.remove-btn {
  align-self: start;
  min-height: 34px;
  padding: 0 10px;
  color: var(--coral);
  background: #fff4f1;
  border: 1px solid #f4c3b7;
  border-radius: 8px;
  cursor: pointer;
}

.quote-box {
  padding: 16px 22px;
  background: #f7fbfa;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 6px 0;
}

.quote-total {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 22px;
  font-weight: 900;
}

.auto-upgrade {
  margin: 10px 0 0;
  padding: 10px;
  color: #573d11;
  background: #fff3d8;
  border: 1px solid #e7c273;
  border-radius: 8px;
  font-size: 13px;
}

.checkout-form {
  display: grid;
  gap: 12px;
  max-height: 54vh;
  overflow: auto;
  padding: 18px 22px 24px;
}

.checkout-form label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.checkout-form textarea {
  resize: vertical;
}

.payment-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #101820;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
}

.payment-box strong {
  color: var(--teal);
}

.stripe-actions {
  display: grid;
  gap: 10px;
}

.manual-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.manual-divider::before,
.manual-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.form-message {
  margin: 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.form-message.is-error {
  color: var(--coral);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(16, 24, 32, 0.45);
}

body.cart-visible .drawer-backdrop {
  display: block;
}

.admin-page,
.download-page {
  min-height: 100vh;
  background: #f1f6f4;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 4vw, 42px);
  color: #fff;
  background: var(--charcoal);
}

.admin-shell {
  width: min(var(--max), calc(100vw - 36px));
  margin: 28px auto;
}

.admin-warning {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #fff7ec;
  border: 1px solid #e6c58b;
  border-radius: 8px;
}

.admin-warning:empty {
  display: none;
}

.orders-list {
  display: grid;
  gap: 14px;
}

.order-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-head,
.order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.status.pending {
  color: #684500;
  background: #fff1cc;
}

.status.pending_payment {
  color: #392ec8;
  background: #ebe9ff;
}

.status.paid {
  color: #064d45;
  background: #d7f8f2;
}

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

.admin-grid div {
  padding: 12px;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.download-card {
  width: min(720px, calc(100vw - 36px));
  margin: 7vh auto;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.download-list {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 0 16px;
  color: #fff;
  background: var(--charcoal);
  border-radius: 8px;
  font-weight: 900;
}

.download-btn span {
  color: var(--teal);
  font-size: 13px;
}

@media (max-width: 920px) {
  .main-nav {
    display: none;
  }

  .hero {
    min-height: min(700px, calc(100vh - 120px));
  }

  .hero-content {
    margin: 0 auto;
    padding-top: 78px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(8, 11, 14, 0.9), rgba(8, 11, 14, 0.58)),
      linear-gradient(0deg, rgba(16, 24, 32, 0.35), rgba(16, 24, 32, 0));
  }

  .pricing-grid,
  .section-heading,
  .checkout-copy {
    grid-template-columns: 1fr;
    display: grid;
    align-items: stretch;
  }

  .catalog-tools {
    display: grid;
  }

  .catalog-tools input {
    width: 100%;
  }

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

@media (max-width: 620px) {
  .site-header {
    height: 64px;
    padding: 0 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .hero {
    min-height: min(660px, calc(100vh - 108px));
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .metric-row,
  .category-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 54px 16px;
  }

  .price-copy h2,
  .section-heading h2,
  .checkout-copy h2 {
    font-size: 30px;
  }

  .category-card {
    min-height: 0;
  }

  .drawer-panel {
    grid-template-rows: auto minmax(0, 0.9fr) auto auto;
  }
}
