/* ==========================================================================
   Merit Sutra — single stylesheet for the whole site.
   Replaces: Elementor frontend, 4 WooCommerce stylesheets, Select2, jQuery UI.
   ========================================================================== */

:root {
  --brand:        #444ce7;
  --brand-dark:   #3538cd;
  --brand-tint:   #eef2ff;
  --ink:          #0f172a;
  --body:         #3f4654;
  --muted:        #6b7280;
  --line:         #e5e7eb;
  --line-soft:    #f1f3f5;
  --bg:           #ffffff;
  --bg-alt:       #f7f8fa;
  --success:      #15803d;   /* 5.02:1 with white — #16a34a failed AA at 3.3:1 */
  --success-bg:   #f0fdf4;
  --success-line: #bbf7d0;
  --danger:       #dc2626;
  --warn-yellow:  #fff200;
  --sale:         #d12222;   /* 5.30:1 with white — #f65050 failed AA at 3.4:1 */

  --wrap:   1140px;
  --radius: 12px;
  --shadow:    0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.06);
  --shadow-lg: 0 8px 32px rgba(16,24,40,.10);

  --font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 { color: var(--ink); line-height: 1.22; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }

.h1, h1 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem); }
.h2, h2 { font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.25rem); }
.h3, h3 { font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem); }
h5      { font-size: 1.0625rem; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: .35rem; }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap   { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 760px; }
.section     { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-sm  { padding-block: clamp(1.75rem, 3vw, 2.75rem); }
.bg-alt      { background: var(--bg-alt); }
.center      { text-align: center; }
.muted       { color: var(--muted); }
.small       { font-size: .875rem; }
.nowrap      { white-space: nowrap; }
.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;
}

/* ---------- Header -------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--ink); font-size: 1.125rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
/* :not(.btn) matters — without it these rules out-specify .btn-primary and
   the header CTA renders grey-on-indigo. */
.nav a:not(.btn) {
  padding: 8px 12px; border-radius: 8px; color: var(--body);
  font-size: .9375rem; font-weight: 500;
}
.nav a:not(.btn):hover { background: var(--bg-alt); color: var(--ink); text-decoration: none; }
.nav a:not(.btn)[aria-current="page"] { color: var(--brand); font-weight: 600; }

.nav-toggle {
  margin-left: auto; display: none; width: 42px; height: 42px;
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  cursor: pointer; padding: 0; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative;
}
.nav-toggle span::before { content: ""; position: absolute; top: -6px; }
.nav-toggle span::after  { content: ""; position: absolute; top:  6px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 16px 14px; box-shadow: var(--shadow-lg);
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 11px 8px; border-radius: 6px; }
  .nav .btn { margin-top: 8px; }
}

/* ---------- Buttons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  cursor: pointer; text-align: center; transition: transform .12s ease, background .16s ease, box-shadow .16s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary  { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.btn-primary:hover  { background: var(--brand-dark); color: #fff; }
.btn-success  { background: var(--success); color: #fff; }
.btn-success:hover  { background: #166534; color: #fff; }
.btn-outline  { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover  { background: var(--bg-alt); }
.btn-lg   { padding: 16px 34px; font-size: 1.0625rem; border-radius: 11px; }
.btn-block{ width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .62; pointer-events: none; }

/* ---------- Cards / surfaces ---------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.pad     { padding: 20px; }
.pad-lg  { padding: clamp(20px, 3vw, 30px); }
.card + .card { margin-top: 18px; }

.notice { border-radius: 10px; padding: 14px 17px; margin: 0 0 20px; font-size: .9375rem; }
.notice-info    { background: var(--brand-tint); border: 1px solid #c7d2fe; color: #312e81; }
.notice-success { background: var(--success-bg); border: 1px solid var(--success-line); color: #14532d; }
.notice-error   { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }

.pill { display: inline-block; padding: 5px 13px; border-radius: 99px; font-size: .8125rem; font-weight: 600; }
.pill-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-line); }
.pill-sale    { background: var(--sale); color: #fff; }

/* ---------- Hero ----------------------------------------------------- */
.hero { background: linear-gradient(170deg, #f8faff 0%, #eef2ff 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  padding: 6px 14px; border-radius: 99px; background: #fff;
  border: 1px solid var(--line); font-size: .8125rem; font-weight: 600; color: var(--body);
}
.hero h1 { margin-bottom: .45em; }
.hero-lead { font-size: 1.0625rem; color: var(--body); margin-bottom: 1.4rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.6rem; padding: 0; list-style: none; }
.hero-badges li {
  margin: 0; padding: 6px 13px; border-radius: 8px; background: #fff;
  border: 1px solid var(--line); font-size: .8125rem; font-weight: 600; color: var(--ink);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-art img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { order: -1; } }

/* ---------- Price ---------------------------------------------------- */
.price       { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-now   { font-size: 1.75rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.price-was   { font-size: 1.05rem; color: var(--muted); text-decoration: line-through; }
.price-save  { font-size: .8125rem; font-weight: 700; color: var(--success); }

/* ---------- Countdown ------------------------------------------------ */
.countdown { display: flex; gap: 10px; margin: 18px 0; }
.countdown div {
  min-width: 62px; padding: 9px 6px; border-radius: 10px;
  background: var(--ink); color: #fff; text-align: center;
}
.countdown b     { display: block; font-size: 1.35rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown span  { font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; opacity: .72; }

/* ---------- Feature grid --------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.feature { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; height: 100%; }
.feature :is(h2, h3) { font-size: 1.0625rem; margin-bottom: .4em; }
.feature p  { margin: 0; font-size: .9375rem; color: var(--body); }
.feature ul { margin: .55rem 0 0; font-size: .9375rem; }
.feature-ico {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 13px;
  background: var(--brand-tint); color: var(--brand);
  display: grid; place-items: center; font-size: 1.15rem; font-weight: 700;
}

/* ---------- Product cards -------------------------------------------- */
.product-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.product-card .thumb { position: relative; background: var(--bg-alt); aspect-ratio: 1/1; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .pill-sale { position: absolute; top: 12px; left: 12px; }
.product-card .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card :is(h2, h3) { font-size: 1.0625rem; margin: 0; }
.product-card .excerpt { font-size: .875rem; color: var(--muted); margin: 0; flex: 1; }
.product-card .price-now { font-size: 1.35rem; }

/* ---------- Gallery / marquee ---------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery img { border-radius: 9px; border: 1px solid var(--line); aspect-ratio: 4/3; object-fit: cover; }

.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--ink); }
.marquee-track { display: flex; gap: 40px; padding: 11px 0; width: max-content; animation: marquee 26s linear infinite; }
.marquee-track span { color: #fff; font-weight: 600; font-size: .9375rem; white-space: nowrap; opacity: .9; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- FAQ (native disclosure, no JS) ---------------------------- */
.faq { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 17px 20px; font-weight: 600; color: var(--ink);
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--muted); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { background: var(--bg-alt); }
.faq .answer { padding: 0 20px 18px; color: var(--body); font-size: .9375rem; }

/* ---------- Forms ----------------------------------------------------- */
.field { margin-bottom: 17px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9375rem; color: var(--ink); }
.field .req { color: var(--danger); }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid #d5d9e0; border-radius: 9px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #9aa1ad; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(68,76,231,.14);
}
.field .error { display: none; margin-top: 6px; font-size: .8125rem; color: var(--danger); font-weight: 500; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field.has-error .error { display: block; }
.hp { position: absolute; left: -9999px; opacity: 0; }

/* ---------- Checkout -------------------------------------------------- */
.checkout-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } .checkout-aside { order: -1; } }

.order-table { width: 100%; border-collapse: collapse; }
.order-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 0 9px; border-bottom: 1px solid var(--line); }
.order-table th:last-child, .order-table td:last-child { text-align: right; }
.order-table td { padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: .9375rem; color: var(--ink); vertical-align: top; }
.order-table tfoot td { border-bottom: 0; padding-top: 14px; font-weight: 700; font-size: 1.125rem; }
.order-table .qty { color: var(--muted); font-weight: 400; }

.pay-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; margin-top: 18px; }
.pay-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; font-weight: 700; color: var(--ink); }
.pay-head img { height: 19px; width: auto; }
.pay-note { margin: 11px 0 0; padding: 11px 14px; background: var(--bg-alt); border-radius: 8px; font-size: .875rem; color: var(--body); }

.trust h3 { font-size: 1.0625rem; margin-bottom: .6em; }
.trust p { margin: 0 0 7px; font-size: .9375rem; color: var(--body); }

/* ---------- Order bumps (ported from the WordPress child theme) ------- */
.ms-cross-sells { margin: 22px 0 20px; font-size: 15px; }
.ms-cross-sell-title { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 19px; font-weight: 700; color: var(--ink); }
.ms-cross-sell-arrow { display: inline-block; font-size: 28px; line-height: 1; font-weight: 900; color: var(--sale); animation: msCrossSellBlink .8s infinite alternate; }
@keyframes msCrossSellBlink { from { transform: translateX(0); opacity: 1; } to { transform: translateX(7px); opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ms-cross-sell-arrow { animation: none; } }

.ms-cross-sell-item { border: 2px dashed #222; border-radius: 7px; overflow: hidden; margin-bottom: 13px; background: #fff; }
.ms-cross-sell-offer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; background: var(--warn-yellow); }
.ms-cross-sell-check-label { display: flex; align-items: center; gap: 9px; margin: 0; cursor: pointer; font-size: 15px; font-weight: 400; }
.ms-cross-sell-checkbox { width: 19px; height: 19px; min-width: 19px; margin: 0; accent-color: var(--success); cursor: pointer; }
.ms-cross-sell-offer-text { color: #0a7a32; line-height: 1.25; font-weight: 700; }
.ms-cross-sell-price { white-space: nowrap; font-weight: 700; text-align: right; }
.ms-cross-sell-price del { opacity: .65; margin-right: 5px; font-weight: 400; }
.ms-cross-sell-product { display: flex; align-items: center; gap: 14px; padding: 13px; }
.ms-cross-sell-product img { width: 78px; height: 78px; object-fit: cover; border-radius: 5px; flex: 0 0 78px; }
.ms-cross-sell-name { display: block; margin-bottom: 5px; font-size: 16px; color: var(--ink); }
.ms-cross-sell-description { font-size: 13px; line-height: 1.45; color: var(--body); opacity: .85; }

@media (max-width: 767px) {
  .ms-cross-sells { margin: 18px 0 16px; }
  .ms-cross-sell-title { font-size: 17px; }
  .ms-cross-sell-offer { padding: 9px 10px; }
  .ms-cross-sell-product { padding: 10px; gap: 10px; }
  .ms-cross-sell-product img { width: 64px; height: 64px; flex-basis: 64px; }
}

/* ---------- Access / delivery page ------------------------------------ */
.access-head { margin-bottom: 24px; }
.access-head .pill { margin-bottom: 12px; }
.access-block + .access-block { margin-top: 18px; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li + li { margin-top: 9px; }
.link-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 14px 17px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-alt); font-weight: 600; color: var(--ink);
}
.link-list a:hover { border-color: var(--brand); background: var(--brand-tint); text-decoration: none; }
.link-go { color: var(--brand); font-size: .875rem; white-space: nowrap; }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .5rem; }

/* ---------- Legal / long-form ----------------------------------------- */
.prose h2 { margin-top: 2rem; font-size: 1.35rem; }
.prose h3 { margin-top: 1.5rem; font-size: 1.1rem; }
.prose li { margin-bottom: .45rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; font-size: .9375rem; }
.prose th { background: var(--bg-alt); }

/* ---------- Footer ----------------------------------------------------- */
.site-footer { background: var(--ink); color: #cbd5e1; padding-block: 42px 26px; margin-top: 56px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; margin-bottom: 30px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer h2 { color: #fff; font-size: .8125rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 13px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; font-size: .9375rem; }
.site-footer .brand { color: #fff; margin-bottom: 11px; }
.footer-note { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; font-size: .8125rem; color: #94a3b8; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-note p { margin: 0; }

/* ---------- Sticky mobile buy bar -------------------------------------- */
.buybar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: none;
  gap: 13px; align-items: center; justify-content: space-between;
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(16,24,40,.09);
}
.buybar .price-now { font-size: 1.2rem; }
@media (max-width: 760px) { .buybar.is-on { display: flex; } body.has-buybar { padding-bottom: 76px; } }

.page-plain { background: var(--bg-alt); }
.page-plain .site-footer { margin-top: 40px; }
