/* =========================================================
   Sujok Homeo Clinic — Order Online (design preview)
   Loaded after style-v3.css. The header, footer, buttons and eyebrow come from style-v3.css
   unchanged; this file styles the store's own sections, scoped to .sh-page, and the cart
   drawer and toast that sit outside <main>.
   ========================================================= */

.sh-page {
  --sh-tint: #eef5ec;          /* soft green panels (same as the topic pages) */
  --sh-radius: 18px;
}

/* ---------- Hero: full-width photo with the title in a label (as insurance.css) ---------- */
.sh-hero { position: relative; z-index: 1; }
.sh-hero-img {
  display: block; width: 100%; aspect-ratio: 2000 / 668; max-height: 600px;
  object-fit: cover; object-position: 50% 55%;
}
.sh-hero-title {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%);
  padding: 14px clamp(28px, 4vw, 48px); white-space: nowrap;
  background: #ffffff; border-radius: 999px; box-shadow: 0 12px 30px rgba(23, 61, 43, .14);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: 1.1; color: var(--ink-900);
}

.sh-section { padding-block: calc(var(--band-pad-y) + 24px) var(--band-pad-y); }

/* ---------- Store notes ---------- */
.sh-notes {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin: 0 0 clamp(28px, 3.4vw, 44px); padding: 0; list-style: none;
}
.sh-notes li {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--sh-tint); border-radius: 14px;
  font-size: .92rem; line-height: 1.4; color: var(--ink-700);
}
.sh-notes .icon { flex: none; width: 22px; height: 22px; color: var(--green-800); stroke-width: 1.6; }
.sh-notes a { font-weight: 600; color: var(--green-800); }

/* ---------- Layout: categories | products ---------- */
.sh-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); align-items: start; }

.sh-side {
  position: sticky; top: calc(var(--header-h) + 24px);
  padding: 20px; background: #ffffff; border: 1px solid var(--line); border-radius: var(--sh-radius);
  box-shadow: 0 10px 30px rgba(23, 61, 43, .06);
}
.sh-side-title { margin: 0 0 12px 8px; font-family: var(--font-sans); font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-green); }
.sh-cats { margin: 0; padding: 0; list-style: none; }
.sh-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 12px 14px; background: none; border: 0; border-radius: 12px;
  font: inherit; font-weight: 500; color: var(--ink-700); text-align: left; cursor: pointer;
  transition: background .2s, color .2s;
}
.sh-cat:hover { background: var(--green-50); color: var(--green-800); }
.sh-cat[aria-pressed="true"] { background: var(--green-800); color: #ffffff; }
.sh-cat-num { padding: 2px 9px; border-radius: 999px; background: var(--green-50); font-size: .8rem; font-weight: 600; color: var(--green-800); }
.sh-cat[aria-pressed="true"] .sh-cat-num { background: rgba(255, 255, 255, .18); color: #ffffff; }
.sh-reorder {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 14px; border-top: 1px solid var(--line);
  font-weight: 600; color: var(--green-800);
}
.sh-reorder span { flex: 1; }

/* Category heading */
.sh-cat-head { margin-bottom: 22px; }
.sh-cat-head .eyebrow { margin-bottom: 10px; }
.sh-cat-title { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.15; color: var(--ink-900); }
.sh-cat-intro { margin-top: 12px; max-width: 72ch; font-size: .98rem; line-height: 1.7; color: var(--ink-500); }
.sh-cat-intro p + p { margin-top: 8px; }
.sh-more { margin-top: 6px; padding: 0; background: none; border: 0; font: inherit; font-weight: 600; color: var(--green-800); cursor: pointer; }
.sh-cat-intro.is-clamped .sh-intro-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Search + A-Z */
.sh-tools {
  position: sticky; top: var(--header-h); z-index: 5;
  display: grid; gap: 12px; margin: 0 -8px 8px; padding: 12px 8px;
  background: var(--page-bg, #fbfcfb);
}
.sh-search {
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: #ffffff; border: 1px solid #cfdccb; border-radius: 999px;
}
.sh-search:focus-within { border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(13, 90, 53, .12); }
.sh-search .icon { flex: none; color: var(--ink-500); }
.sh-search input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: none; font: inherit; color: var(--ink-900); }
.sh-letters { display: flex; flex-wrap: wrap; gap: 4px; }
.sh-letters[hidden] { display: none; }
.sh-letter {
  display: grid; place-items: center; min-width: 32px; height: 34px; padding: 0 4px;
  background: #ffffff; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink-700); cursor: pointer;
}
.sh-letter:hover:not(:disabled) { border-color: var(--green-800); color: var(--green-800); }
.sh-letter[aria-pressed="true"] { background: var(--green-800); border-color: var(--green-800); color: #ffffff; }
.sh-letter:disabled { opacity: .35; cursor: default; }

.sh-status { margin: 4px 0 14px; font-size: .9rem; color: var(--ink-500); }

/* ---------- Product rows ---------- */
.sh-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sh-item {
  display: grid; grid-template-columns: minmax(170px, 1fr) auto; gap: 14px 20px; align-items: center;
  padding: 18px 20px; background: #ffffff; border: 1px solid var(--line); border-radius: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.sh-item:hover { border-color: #cfdccb; box-shadow: 0 8px 24px rgba(23, 61, 43, .06); }
.sh-item-info { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sh-item-img { flex: none; width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: var(--sh-tint); }
.sh-item-mark {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--sh-tint); font-family: var(--font-serif); font-size: 1.15rem; color: var(--green-800);
}
.sh-item-name { font-family: var(--font-sans); font-size: 1.08rem; font-weight: 600; line-height: 1.3; color: var(--ink-900); }
.sh-item-abbr { display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 6px; background: var(--green-50); font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--green-800); }
.sh-item-cat { display: inline-block; margin: 4px 0 0 6px; font-size: .82rem; color: var(--ink-500); }
.sh-item-from { margin-top: 4px; font-size: .88rem; color: var(--ink-500); }
.sh-info-btn { margin-top: 6px; padding: 0; background: none; border: 0; font: inherit; font-size: .88rem; font-weight: 600; color: var(--green-800); cursor: pointer; }
.sh-item-desc { grid-column: 1 / -1; margin: 0; padding: 14px 16px; background: var(--sh-tint); border-radius: 12px; font-size: .92rem; line-height: 1.6; color: var(--ink-700); }
.sh-item-desc[hidden] { display: none; }

.sh-buy { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.sh-field { display: grid; gap: 4px; }
.sh-field-label { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }
.sh-select {
  height: 42px; min-width: 110px; padding: 0 34px 0 12px;
  border: 1px solid #cfdccb; border-radius: 10px; background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233c4757' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  font: inherit; font-size: .92rem; color: var(--ink-900); appearance: none; cursor: pointer;
}
.sh-select:focus { outline: 0; border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(13, 90, 53, .12); }

/* Globules / Drops toggle */
.sh-seg { display: inline-flex; padding: 3px; background: var(--green-50); border-radius: 10px; }
.sh-seg button {
  height: 36px; padding: 0 12px; background: none; border: 0; border-radius: 8px;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink-700); cursor: pointer;
}
.sh-seg button[aria-pressed="true"] { background: #ffffff; color: var(--green-800); box-shadow: 0 1px 3px rgba(20, 32, 58, .12); }

.sh-price { min-width: 72px; font-size: 1.15rem; font-weight: 700; color: var(--ink-900); text-align: right; }

.sh-qty { display: inline-flex; align-items: center; border: 1px solid #cfdccb; border-radius: 10px; background: #ffffff; }
.sh-qty button { width: 34px; height: 40px; background: none; border: 0; font-size: 1.1rem; color: var(--ink-700); cursor: pointer; }
.sh-qty button:hover { color: var(--green-800); }
.sh-qty input { width: 34px; height: 40px; border: 0; outline: 0; background: none; font: inherit; font-weight: 600; text-align: center; color: var(--ink-900); -moz-appearance: textfield; }
.sh-qty input::-webkit-outer-spin-button, .sh-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.sh-add { white-space: nowrap; }
.sh-add.is-added { background: var(--green-800); color: #ffffff; }

.sh-empty { padding: 40px 20px; text-align: center; background: #ffffff; border: 1px dashed #cfdccb; border-radius: 16px; color: var(--ink-500); }
.sh-empty a { font-weight: 600; color: var(--green-800); }

/* ---------- Cart drawer ---------- */
.sh-overlay { position: fixed; inset: 0; z-index: 190;   /* above the sticky header (z-index 100) */ background: rgba(20, 32, 58, .4); }
.sh-overlay[hidden] { display: none; }
.sh-cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
  display: flex; flex-direction: column; width: min(420px, 100%);
  background: #ffffff; box-shadow: -20px 0 48px rgba(20, 32, 58, .14);
  transform: translateX(100%); visibility: hidden; transition: transform .3s var(--ease-out, ease), visibility 0s .3s;
}
.sh-cart.is-open { transform: none; visibility: visible; transition: transform .3s var(--ease-out, ease); }
.sh-cart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.sh-cart-title { font-size: 1.5rem; color: var(--ink-900); }
.sh-cart-list { flex: 1; overflow-y: auto; margin: 0; padding: 8px 24px; list-style: none; }
.sh-cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sh-cart-name { font-weight: 600; color: var(--ink-900); }
.sh-cart-opt { font-size: .88rem; color: var(--ink-500); }
.sh-cart-line { font-weight: 700; color: var(--ink-900); text-align: right; }
.sh-cart-ctrl { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.sh-remove { padding: 0; background: none; border: 0; font: inherit; font-size: .88rem; color: #a23b2a; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sh-cart-empty { padding: 48px 0; text-align: center; color: var(--ink-500); }
.sh-cart-foot { display: grid; gap: 10px; padding: 20px 24px; border-top: 1px solid var(--line); background: #fafcf8; }
.sh-cart-row { display: flex; justify-content: space-between; font-size: 1.05rem; color: var(--ink-900); }
.sh-cart-min { margin: 0; font-size: .9rem; color: #8a5a00; }
.sh-cart-min:empty { display: none; }
.sh-cart-note { margin: 0; font-size: .88rem; color: var(--ink-500); }
.sh-checkout { justify-content: center; width: 100%; }
.sh-checkout:disabled { opacity: .5; cursor: not-allowed; }
.sh-continue {
  min-height: 48px; padding: 10px 16px; background: #ffffff; border: 1.5px solid var(--green-800); border-radius: 999px;
  font: inherit; font-weight: 600; color: var(--green-800); cursor: pointer; transition: background .2s, color .2s;
}
.sh-continue:hover { background: var(--green-50); }
/* when checkout isn't available yet (empty cart or under the minimum), continuing to shop is the next step */
.sh-continue.is-primary { background: var(--green-800); color: #ffffff; }
.sh-continue.is-primary:hover { background: var(--green-900); }

/* Toast */
.sh-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 210; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 999px; background: var(--ink-900); color: #ffffff; font-size: .95rem;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.sh-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .sh-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Below 1240px the choices no longer fit beside the name, so they move under it */
@media (max-width: 1240px) {
  .sh-item { grid-template-columns: minmax(0, 1fr); }
  .sh-buy { flex-wrap: wrap; justify-content: flex-start; }
  .sh-price { text-align: left; }
}
@media (max-width: 900px) {
  .sh-layout { grid-template-columns: minmax(0, 1fr); }
  .sh-side { position: static; padding: 12px; }
  .sh-side-title { display: none; }
  .sh-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .sh-cats::-webkit-scrollbar { display: none; }
  .sh-cat { width: auto; white-space: nowrap; }
  .sh-reorder { margin-top: 8px; padding: 10px 14px 4px; }
}
@media (max-width: 640px) {
  .sh-hero-img { aspect-ratio: 2.3 / 1; }
  .sh-hero-title { padding: 10px 24px; font-size: 1.5rem; }
  .sh-notes { grid-template-columns: minmax(0, 1fr); }
  .sh-item { padding: 16px; }
  .sh-letters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .sh-letters::-webkit-scrollbar { display: none; }
  .sh-letter { flex: none; }
  .sh-buy { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .sh-buy .sh-field, .sh-buy .sh-seg { grid-column: 1 / -1; }
  .sh-buy .sh-seg { justify-self: start; }
  .sh-select { width: 100%; }
  .sh-add { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 360px) {
  .sh-hero-title { padding: 8px 18px; font-size: 1.25rem; }
}
