:root{
  --bg: #eef4ff;
  --text: #0b1b45;
  --muted: rgba(11, 27, 69, 0.75);
  --card: rgba(255, 255, 255, 0.78);
  --stroke: rgba(43, 79, 170, 0.14);
  --blue: #1f66ff;
  --blue2: #3aa0ff;
  --shadow: 0 18px 45px rgba(10, 28, 80, 0.16);
  --radius: 22px;
}

*{ box-sizing: border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background: radial-gradient(1200px 650px at 18% 5%, rgba(58,160,255,0.25), transparent 55%),
              radial-gradient(1000px 600px at 78% 22%, rgba(31,102,255,0.16), transparent 60%),
              linear-gradient(180deg, #f6f9ff 0%, #eef4ff 35%, #f3f6ff 100%);
  overflow-x:hidden;
}

a{ color: inherit; text-decoration:none; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(246, 249, 255, 0.68);
  border-bottom: 1px solid rgba(43, 79, 170, 0.12);
}

.nav-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
}

.brand{
  display:flex;
  align-items:center;
  gap: 0.75rem;
  min-width: 220px;
}
.brand-logo{ width: 58px; height:auto; display:block; }
.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-title{ font-weight: 800; font-size: 1.02rem; letter-spacing: 0.2px;}
.brand-tagline{ font-size: 0.82rem; color: rgba(11, 27, 69, 0.70); margin-top: 0.18rem; }

.nav-links{
  display:flex;
  align-items:center;
  gap: 1.25rem;
  font-size: 0.92rem;
  color: rgba(11, 27, 69, 0.78);
}

.nav-link{
  padding: 0.35rem 0.35rem;
  border-bottom: 2px solid transparent;
}
.nav-link.is-active{
  color: var(--text);
  font-weight: 700;
  border-bottom-color: rgba(31,102,255,0.55);
}

.nav-cta{ margin-left: 0.35rem; }
.btn-cta{
  border: none;
  background: linear-gradient(90deg, rgba(31,102,255,0.95), rgba(58,160,255,0.95));
  color: white;
  padding: 0.62rem 1.05rem;
  border-radius: 999px;
  font-weight: 700;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(31,102,255,0.22);
}

.hero-shell{
  position: relative;
  overflow: hidden;
  padding-bottom: 0.8rem;
  background: linear-gradient(180deg, rgba(230,241,255,0.55) 0%, rgba(220,235,255,0.30) 52%, rgba(244,246,255,0.0) 100%);
}

.hero-shell::after{
  content:"";
  position:absolute;
  right:-120px;
  bottom:-170px;
  width: 520px;
  height: 520px;
  background: url("/images/SC_cornicopia.png") center/contain no-repeat;
  opacity: 0.35;
  pointer-events:none;
}

.hero{
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.0rem 1.1rem 1.4rem 1.1rem;
  display:grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2.4rem;
  align-items:center;
}

.hero-kicker{
  display:inline-block;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: rgba(11, 27, 69, 0.70);
  background: rgba(255,255,255,0.6);
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(31,102,255,0.16);
  border-radius: 999px;
}

.hero-title{
  margin: 0.85rem 0 0.7rem 0;
  font-size: clamp(2.0rem, 3.4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.highlight{
  background: linear-gradient(90deg, rgba(31,102,255,0.25), rgba(58,160,255,0.22));
  border-radius: 12px;
  padding: 0 0.24em;
}

.hero-copy{
  margin: 0 0 1.15rem 0;
  color: rgba(11, 27, 69, 0.75);
  font-size: 1.02rem;
  max-width: 54ch;
}

.hero-actions{
  display:flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn-primary, .btn-outline{
  display:inline-flex;
  align-items:center;
  gap: 0.6rem;
  padding: 0.78rem 1.1rem;
  border-radius: 999px;
  font-weight: 800;
  cursor:pointer;
  border: 1px solid rgba(31,102,255,0.18);
  box-shadow: 0 10px 24px rgba(10, 28, 80, 0.10);
}

.btn-primary{
  background: linear-gradient(90deg, rgba(31,102,255,0.95), rgba(58,160,255,0.95));
  color: white;
}

.btn-outline{
  background: rgba(255,255,255,0.78);
  color: rgba(11, 27, 69, 0.90);
}

.arrow{ font-size: 1.15rem; margin-top: -1px; }

.category-row{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.7rem 1.1rem 0.9rem 1.1rem;
  display:flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.category-chip{
  display:inline-flex;
  align-items:center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(43, 79, 170, 0.12);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(10, 28, 80, 0.08);
  cursor:pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: rgba(11, 27, 69, 0.85);
}

.category-chip-dot{
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(31,102,255,0.75);
  box-shadow: 0 0 0 3px rgba(31,102,255,0.14);
}

.ecg-divider{
  position: relative;
  height: clamp(16px, 2.6vw, 26px);
  margin-top: -10px;
  background-image: url("/images/ecg-tile-lead2.svg");
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: 0 50%;
  opacity: 0.60;
  filter: drop-shadow(0 8px 18px rgba(10, 28, 80, 0.22));
  animation: ecgScroll 15s linear infinite; /* slowed down */
}

.ecg-divider::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(90deg,
    rgba(244,246,255,1) 0%,
    rgba(244,246,255,0) 12%,
    rgba(244,246,255,0) 88%,
    rgba(244,246,255,1) 100%
  );
}

@keyframes ecgScroll{
  from { background-position-x: 1800px; }
  to   { background-position-x: 0; }
}

.section-shell{
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.1rem 1.1rem 2.4rem 1.1rem;
}

.section-header{
  display:flex;
  flex-direction:column;
  gap: 0.55rem;
  margin-bottom: 1.2rem;
}

.section-title{
  margin:0;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
}

.section-sub{
  margin:0;
  color: rgba(11, 27, 69, 0.72);
  max-width: 82ch;
  line-height: 1.45;
}

.featured-note{
  font-size: 0.9rem;
  color: rgba(11, 27, 69, 0.62);
}

.featured-fallback{
  display:none;
  padding: 0.95rem 1.0rem;
  background: rgba(255,255,255,0.72);
  border: 1px dashed rgba(31,102,255,0.25);
  border-radius: 16px;
  color: rgba(11, 27, 69, 0.70);
}

.card-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

.product-card{
  position: relative;
  background: var(--card);
  border: 1px solid rgba(43, 79, 170, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.95rem;
  overflow:hidden;
}

.product-tag{
  position:absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.32rem 0.66rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: rgba(255, 179, 71, 0.95);
  color: rgba(24, 24, 24, 0.92);
  border: 1px solid rgba(0,0,0,0.06);
}

.product-tag.combo{ background: rgba(255, 111, 168, 0.95); }
.product-tag.book{ background: rgba(74, 176, 255, 0.95); }
.product-tag.cards{ background: rgba(75, 212, 106, 0.95); }
.product-tag.sale{ background: rgba(255, 80, 80, 0.95); color: white; }

.product-image-placeholder{
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(223,237,255,0.85), rgba(241,246,255,0.55));
  border: 1px solid rgba(43, 79, 170, 0.10);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 0.9rem;
  color: rgba(11, 27, 69, 0.55);
  font-size: 0.92rem;
  line-height: 1.25;
  overflow:hidden;
}

.product-image-placeholder.has-img{ padding: 0; }
.product-image-placeholder img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
}

.product-title{
  margin: 0.85rem 0 0.45rem 0;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.product-blurb{
  margin: 0 0 0.9rem 0;
  color: rgba(11, 27, 69, 0.72);
  font-size: 0.92rem;
  line-height: 1.35;
  min-height: 2.6em;
}

.product-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 0.8rem;
}

.product-price{
  font-weight: 900;
  font-size: 0.98rem;
  white-space: nowrap;
}

.price-was{
  text-decoration: line-through;
  opacity: 0.55;
  font-weight: 800;
  margin-right: 0.35rem;
}
.price-now{
  font-weight: 950;
}

.btn-mini{
  border:none;
  cursor:pointer;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(31,102,255,0.95), rgba(58,160,255,0.95));
  color: white;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(31,102,255,0.18);
}

.page-toolbar{
  display:flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items:center;
  margin: 0.6rem 0 1.2rem 0;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap: 0.55rem;
  padding: 0.52rem 0.9rem;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(43, 79, 170, 0.12);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(10, 28, 80, 0.08);
  cursor:pointer;
  font-weight: 800;
  font-size: 0.92rem;
  color: rgba(11, 27, 69, 0.85);
}

.chip.is-active{
  border-color: rgba(31,102,255,0.38);
  box-shadow: 0 14px 26px rgba(31,102,255,0.10);
}

.product-page{
  display:grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1.3rem;
  align-items:start;
}

.panel{
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(43, 79, 170, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.05rem;
}

.kv{
  display:grid;
  grid-template-columns: 140px 1fr;
  gap: 0.45rem 0.75rem;
  margin-top: 0.8rem;
  color: rgba(11,27,69,0.78);
  font-size: 0.94rem;
}

.kv div:nth-child(odd){ font-weight: 900; color: rgba(11,27,69,0.86); }

footer{
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.6rem 1.1rem 2.2rem 1.1rem;
  color: rgba(11, 27, 69, 0.60);
  font-size: 0.9rem;
}

/* RESPONSIVE ---------------------------------------------------- */
@media (max-width: 880px) {
  .nav-inner { flex-wrap: wrap; row-gap: 0.4rem; }
  .brand-tagline { display: none; }
  .nav-links { gap: 1rem; font-size: 0.86rem; }
  .nav-cta { margin-left: 0.25rem; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; padding-top: 2.6rem; padding-bottom: 2.6rem; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-page{ grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 520px) {
  .nav-links { width: 100%; justify-content: space-between; }
  .nav-cta { width: 100%; display: flex; justify-content: flex-end; }
  .btn-cta { padding-inline: 1.2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
}


/* ----------------------------------------------------------
   SAFE OVERRIDES (stable ECG + sale price layout)
   - Keeps homepage + shop/product ECG independent
   - Keeps sale price stacked so "View details" stays inside cards
----------------------------------------------------------- */

/* ECG: default (used on shop + product pages inside .page-ecg) */
.ecg-divider{
  width: 100%;
  height: 12px;
  opacity: 0.60;
  pointer-events: none;

  background-image: url("/images/ecg-tile-lead2.svg");
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: 0 50%;

  filter: drop-shadow(0 8px 18px rgba(10, 28, 80, 0.22));
  animation: ecgScroll 15s linear infinite;
}

/* Soften edges so the tile loop doesn't “hard cut” */
.ecg-divider{
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

/* Shop + product pages: contained ECG line */
.page-ecg{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.1rem;
  position: relative;
  height: 12px;
  margin-top: 0.8rem;
  margin-bottom: 1.1rem;
}

.page-ecg .ecg-divider.ecg-divider--page{
  position: absolute;
  inset: 0;
  height: 12px;
}

/* (Optional) Homepage can use a taller divider if it keeps its own inline CSS.
   If you ever switch homepage to use site.css, add class="ecg-divider ecg-divider--home"
   and uncomment the block below.
*/
/*
.ecg-divider--home{
  height: 26px;
  opacity: 0.82;
  margin-top: -10px;
}
*/

/* ---------- Price: stack sale prices cleanly ---------- */
.product-footer{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 0.8rem;
}

.product-footer .btn-mini{
  flex-shrink:0;
  white-space:nowrap;
}

/* Supports BOTH homepage (price-wrap) and shop cards (product-price) markup */
.product-footer .price-wrap,
.product-footer .product-price{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap: 0.12rem;
  min-width: 0;
  line-height: 1.05;
}

.price-prefix{
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.60;
  text-transform: lowercase;
  font-style: italic;
}

.price-was{
  font-size: 0.92rem;
  font-weight: 800;
  opacity: 0.55;
  text-decoration: line-through;
  line-height: 1.05;
}

.price-now,
.price-value{
  font-size: 1.10rem;
  font-weight: 900;
  line-height: 1.05;
}

/* Legacy shop markup support: <span class="was"> / <span class="now"> */
.product-price .was{
  font-size: 0.92rem;
  font-weight: 800;
  opacity: 0.55;
  text-decoration: line-through;
  line-height: 1.05;
}
.product-price .now{
  font-size: 1.10rem;
  font-weight: 900;
  line-height: 1.05;
}

/* keep the animation keyframes */
@keyframes ecgScroll{
  from { background-position-x: 1800px; }
  to   { background-position-x: 0; }
}


/* ==========================================================
   FIX: Shop/Product ECG tiling (does not affect homepage ECG)
   Paste-safe override — keep at VERY END of site.css
   ========================================================== */

.page-ecg .ecg-divider--page{
  position: relative;           /* not absolute; avoids odd stretching */
  width: 100%;
  height: 12px;                 /* slim line like the divider */
  opacity: 0.60;
  pointer-events: none;

  background-image: url("/images/ecg-tile-lead2.svg");
  background-repeat: repeat-x;

  /* Force consistent tiling: one “tile” is 1000px wide */
  background-size: 1000px 12px;
  background-position: 0 50%;

  filter: drop-shadow(0 4px 10px rgba(10, 28, 80, 0.18));

  animation: ecgScrollPage 15s linear infinite;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

@keyframes ecgScrollPage{
  from { background-position: 1000px 50%; }
  to   { background-position: 0 50%; }
}

/* Slightly taller on larger screens (optional, keeps it neat) */
@media (min-width: 900px){
  .page-ecg .ecg-divider--page{
    height: 14px;
    background-size: 1000px 14px;
  }
}
/* ---- CLICK SAFETY: decorative layers must never block links ---- */
.ecg-divider,
.ecg-divider::before,
.ecg-divider::after,
.hero-shell::after {
  pointer-events: none !important;
}

/* Keep interactive hero content above any decorative layers */
.hero-shell { position: relative; }
.hero,
.category-row {
  position: relative;
  z-index: 5;
}

