/* Healthy Longevity audiobook shop — light, high-contrast, large type. */

:root {
  --bg: #fff8e3;
  --card: rgba(255, 255, 255, .72);
  --card-solid: #fffdf6;
  --text: #000;
  --muted: #4a4a4a;
  --border: #d8cdaa;
  --line: #222;
  --teal: #06a4b4;
  --teal-dark: #058a98;
  --teal-deep: #04707c;
  --teal-tint: #e1f4f4;
  --link: #04707c;
  --info-bg: #dff2f3;
  --info-text: #04515a;
  --peach: #ffe3c7;
  --green: #0b6b3a;
  --error: #b3261e;
  --radius: 22px;
  --shadow: 0 4px 24px rgba(60, 50, 20, .08);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  /* soft teal and peach haze like the Healthy Longevity site */
  background-image:
    radial-gradient(900px 520px at 0% 0%, rgba(6, 164, 180, .22), transparent 70%),
    radial-gradient(800px 560px at 100% 8%, rgba(255, 190, 140, .32), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
a[href], button:not(:disabled), summary, label[for], [role='button'] { cursor: pointer; }
:focus-visible { outline: 3px solid #1a5fd0; outline-offset: 3px; border-radius: 6px; }
[x-cloak] { display: none !important; }

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 500; }
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 600; }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: #000; color: #fff; padding: 12px 18px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ——— header / footer ——— */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 248, 227, .96); }
.site-header-inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
}
.brand {
  display: inline-block; text-decoration: none; color: var(--text);
  font-weight: 500; font-size: 21px; letter-spacing: .01em; line-height: 1.1;
  padding: 3px 8px 5px; border: 2px solid var(--teal); background: rgba(255, 255, 255, .45);
}
.brand small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.brand:hover { color: var(--text); }
.nav-pill {
  display: flex; align-items: center; gap: 4px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 999px;
}
.nav-pill a {
  color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px;
}
.nav-pill a:hover { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 4px; }
.nav-pill a[aria-current='page'] { font-weight: 800; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--text); text-decoration: none; white-space: nowrap;
  font: 600 13px/1 var(--font); letter-spacing: .04em; text-transform: uppercase;
  transition: background-color 150ms ease, color 150ms ease;
}
.pill-btn:hover { background: var(--text); color: #fff; }
.pill-btn.is-teal { background: var(--teal); border-color: var(--teal); color: #000; }
.pill-btn.is-teal:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #000; }
.site-footer { margin-top: 80px; padding: 8px 0 56px; color: var(--text); font-size: 14px; text-align: center; }
.site-footer .container { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.footer-brand { font-weight: 500; font-size: 18px; letter-spacing: .02em; }
.footer-links { display: flex; gap: 4px 0; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text); padding: 8px 14px; }
.footer-links a + a { border-left: 1px solid var(--text); }
.site-footer .copy { font-size: 13px; color: var(--muted); }

main.container { display: block; padding-top: 48px; }

/* ——— buttons ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 14px 34px; border-radius: 999px; border: 1px solid transparent;
  font: 700 15px/1.2 var(--font); letter-spacing: .05em; text-transform: uppercase; text-decoration: none; text-align: center;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn svg { flex: none; }
.btn-block { display: flex; width: 100%; }
.btn-primary, .btn-cart { background: var(--teal); color: #000; }
.btn-primary:hover, .btn-cart:hover { background: var(--teal-dark); color: #000; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover { background: var(--text); color: #fff; }
.btn:disabled { opacity: .55; }

.text-link { color: var(--text); font-weight: 600; }
.text-link:hover { color: var(--teal-deep); }

/* ——— cards & notices ——— */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.panel {
  border-radius: 28px; padding: clamp(24px, 4vw, 56px);
  background: linear-gradient(120deg, rgba(255, 248, 227, .92) 0%, rgba(197, 228, 228, .85) 55%, rgba(255, 220, 190, .85) 100%);
  box-shadow: var(--shadow);
}
.notice { padding: 14px 18px; border-radius: 14px; font-weight: 600; }
.notice-info { background: var(--info-bg); color: var(--info-text); }
.notice-ok { background: #e2f4e8; color: #0b5a2d; }
.notice-error { background: #fdeceb; color: var(--error); }
.error-text { color: var(--error); font-weight: 600; }

/* ——— product page ——— */
.product-grid {
  display: grid; gap: 32px 40px; align-items: start;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  grid-template-areas: 'cover info buy';
}
.product-cover { grid-area: cover; }
.product-info { grid-area: info; display: flex; flex-direction: column; gap: 22px; }
.product-info h1 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.25; }
.product-buy { grid-area: buy; display: flex; flex-direction: column; gap: 22px; align-items: stretch; }

.cover-img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 16px; box-shadow: var(--shadow); background: #cfd8e8; }
.sample-btn {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 12px; padding: 6px 6px; min-height: 56px;
  background: none; border: 0; font: 600 16px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--text); text-decoration: none;
}
.sample-btn:hover { color: var(--teal-deep); }
.sample-btn .play-dot { width: 44px; height: 44px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; flex: none; }
.sample-note { margin-top: 4px; color: var(--muted); font-size: 15px; }
.format-line { margin: 2px 0 0 6px; color: var(--muted); font-size: 15px; }

.meta-table { border-collapse: collapse; }
.meta-table th { text-align: left; font-weight: 600; padding: 6px 18px 6px 0; vertical-align: top; white-space: nowrap; }
.meta-table td { padding: 6px 0; color: var(--muted); font-weight: 500; }


.summary { color: var(--text); max-width: 62ch; }
.more details > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 700; color: var(--text); }
.more details[open] > summary { margin-bottom: 8px; }
.more .more-text { display: flex; flex-direction: column; gap: 14px; max-width: 62ch; }

.buy-card { background: rgba(255, 253, 246, .9); text-align: center; display: flex; flex-direction: column; gap: 18px; padding: 32px 24px; }
.buy-label { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 600; color: var(--muted); }
.buy-price { font-size: 40px; font-weight: 600; line-height: 1; }
.instant { font-weight: 600; color: var(--teal-deep); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.instant details { position: relative; display: inline-block; }
.instant summary { list-style: none; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-deep); color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 800; }
.instant summary::-webkit-details-marker { display: none; }
.instant .tip { position: absolute; z-index: 5; top: 38px; left: 50%; transform: translateX(-50%); width: 260px; background: var(--text); color: #fff; padding: 12px 14px; border-radius: 10px; font-size: 15px; font-weight: 500; text-align: left; }
.how-link { align-self: center; font-weight: 600; color: var(--text); }

/* ——— steps (cart → order) ——— */
.steps { display: flex; align-items: center; gap: 18px; margin-bottom: 36px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 14px; font-size: clamp(24px, 3.6vw, 34px); font-weight: 500; color: var(--muted); }
.step-dot { width: 56px; height: 56px; border-radius: 50%; background: var(--card-solid); display: grid; place-items: center; flex: none; box-shadow: var(--shadow); }
.step.is-active { color: var(--text); }
.step.is-active .step-dot { background: var(--teal); color: #000; }
.steps .arrow { color: var(--muted); }

/* ——— cart ——— */
.cart-item {
  display: grid; gap: 10px 28px; align-items: center;
  grid-template-columns: 110px minmax(0, 1fr) auto auto auto;
  grid-template-areas: 'img title variant price remove' 'img info variant price remove';
}
.ci-img { grid-area: img; width: 110px; height: 110px; border-radius: 10px; object-fit: cover; box-shadow: var(--shadow); }
.ci-title { grid-area: title; font-size: 22px; align-self: end; }
.ci-info { grid-area: info; align-self: start; justify-self: start; font-size: 16px; padding: 10px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info-text); }
.ci-variant { grid-area: variant; }
.ci-price { grid-area: price; }
.ci-remove { grid-area: remove; }
.cart-variant { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.cart-price { font-weight: 700; font-size: 22px; white-space: nowrap; }
.icon-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); color: var(--text); }
.cart-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.discount { display: inline-flex; align-items: center; gap: 12px; padding: 16px 24px; background: #e6e6ea; border-radius: 14px; font-weight: 600; }
.totals { min-width: min(100%, 380px); display: flex; flex-direction: column; gap: 10px; }
.totals .row { display: flex; justify-content: space-between; gap: 24px; }
.totals .grand { font-size: 26px; font-weight: 700; margin-top: 4px; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px 28px; margin-top: 36px; flex-wrap: wrap; }
.empty { text-align: center; padding: 56px 24px; display: flex; flex-direction: column; gap: 20px; align-items: center; }

/* ——— order ——— */
.order-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px 56px; align-items: start; }
.order-col h2 { margin-bottom: 18px; }
.order-col section + section { margin-top: 36px; }
.option {
  display: grid; grid-template-columns: 28px 44px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  background: var(--card-solid); border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow); border: 2px solid transparent;
}
.option.is-selected { border-color: var(--teal); }
.option input[type=radio] { width: 24px; height: 24px; accent-color: var(--teal-deep); margin: 0; }
.option .opt-title { font-weight: 700; }
.option .opt-sub { color: var(--muted); font-size: 16px; }
.option .free { color: var(--green); font-weight: 700; }
.option .opt-icon { color: var(--teal); display: grid; place-items: center; }
.consents { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; font-size: 17px; }
.check input { width: 28px; height: 28px; flex: none; accent-color: var(--teal-deep); margin: 0; }
.summary-card { background: linear-gradient(135deg, rgba(255, 255, 255, .8), rgba(205, 232, 232, .8)); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.summary-line { display: flex; gap: 18px; align-items: flex-start; }
.summary-line img { width: 76px; height: 76px; border-radius: 8px; object-fit: cover; flex: none; }
.summary-line .name { font-weight: 700; }
.summary-line .price { margin-left: auto; font-weight: 700; white-space: nowrap; }
.summary-sub { color: var(--muted); font-size: 16px; }
.summary-section { border-top: 1px solid rgba(0, 0, 0, .15); margin-top: 20px; padding-top: 18px; }
.summary-section .label { color: var(--muted); font-size: 16px; }
.summary-section .row { display: flex; justify-content: space-between; gap: 18px; }
.summary-total { font-size: 26px; font-weight: 700; }
.pay-btn { margin-top: 28px; font-size: 17px; min-height: 68px; }
.back-link { display: block; text-align: center; margin-top: 22px; font-weight: 600; color: var(--text); }

/* ——— forms / auth ——— */
.form-narrow { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.form-narrow form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 700; }
.input {
  width: 100%; min-height: 56px; padding: 12px 16px; border: 1px solid #7d7a6c; border-radius: 14px;
  font: 500 17px var(--font); color: var(--text); background: #fff;
}
.input:focus { border-color: var(--text); outline: 3px solid #1a73e8; outline-offset: 2px; }
.muted { color: var(--muted); }

/* ——— my audiobook ——— */
.my-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: center; }
.my-actions { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; margin-top: 18px; }
audio { width: 100%; max-width: 560px; }

.prose { max-width: 68ch; display: flex; flex-direction: column; gap: 18px; }
.prose h2 { margin-top: 12px; }
.prose ul { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.placeholder-banner { border: 2px dashed #b08a00; background: #fff3c4; color: #5b4500; border-radius: 12px; padding: 14px 18px; font-weight: 600; }

/* ——— responsive ——— */
@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-areas: 'cover info' 'buy buy';
  }
  .product-buy { max-width: 440px; }
}
@media (max-width: 820px) {
  body { font-size: 17px; }
  main.container { padding-top: 32px; }
  .product-grid { grid-template-columns: 1fr; grid-template-areas: 'cover' 'info' 'buy'; }
  .product-cover { max-width: 340px; }
  .product-buy { max-width: none; }
  .cart-item {
    grid-template-columns: 72px minmax(0, 1fr) 56px;
    grid-template-areas: 'img title remove' 'info info info' 'variant variant variant' 'price price price';
    gap: 12px 16px;
  }
  .ci-img { width: 72px; height: 72px; }
  .ci-title { font-size: 19px; align-self: center; }
  .ci-info { justify-self: stretch; }
  .order-grid { grid-template-columns: 1fr; }
  .my-grid { grid-template-columns: 1fr; }
  .my-grid img { max-width: 220px; }
  .cart-actions .btn { width: 100%; }
  .cart-actions { flex-direction: column-reverse; align-items: stretch; }
  .cart-actions .text-link { text-align: center; padding: 12px 0; }
  .option { grid-template-columns: 28px 36px minmax(0, 1fr); }
  .option .free { grid-column: 3; }
}
@media (max-width: 760px) {
  .nav-pill { display: none; }
}
@media (max-width: 600px) {
  .site-header-inner { flex-wrap: nowrap; gap: 10px; }
  .header-actions { flex-wrap: nowrap; gap: 6px; }
  .pill-btn { padding: 8px 14px; font-size: 12px; }
  .brand { font-size: 15px; padding: 3px 7px 4px; }
  .brand small { font-size: 8px; }
}
@media (max-width: 480px) {
  .container, .site-header-inner { padding-left: 16px; padding-right: 16px; }
  .card { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
