/* ==========================================================================
   Shrine-style CRO components for LaunchMyStore
   Shared styles for: bundle deals, sticky CTA, icon bar, comparison table,
   countdown timer, section divider, scroll-to-top.
   Per-section colour/spacing overrides are emitted inline by each section.
   ========================================================================== */

.sh-section { position: relative; }
.sh-section__inner { position: relative; z-index: 1; }
.sh-heading { text-wrap: balance; }
.sh-subtext { margin: 10px auto 0; opacity: .85; }
.sh-subtext > *:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Bundle deals
   -------------------------------------------------------------------------- */
.sh-bundle { display: flex; flex-direction: column; gap: 12px; }
.sh-bundle--grid { display: grid; gap: 12px; }
@media (min-width: 750px) {
  .sh-bundle--grid { grid-template-columns: repeat(var(--sh-bundle-cols, 3), minmax(0, 1fr)); }
}

.sh-tier {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 16px;
  border: 2px solid var(--sh-tier-border, #e6e6e6);
  border-radius: var(--sh-tier-radius, 14px);
  background: var(--sh-tier-bg, #fff);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  font: inherit;
  color: inherit;
}
.sh-tier:hover { border-color: var(--sh-tier-border-hover, #111); }
.sh-tier[aria-checked="true"] {
  border-color: var(--sh-tier-border-active, #111);
  background: var(--sh-tier-bg-active, #fffbea);
  box-shadow: 0 0 0 1px var(--sh-tier-border-active, #111) inset;
}
.sh-tier__radio {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #bbb;
  display: flex; align-items: center; justify-content: center;
}
.sh-tier[aria-checked="true"] .sh-tier__radio { border-color: var(--sh-tier-border-active, #111); }
.sh-tier[aria-checked="true"] .sh-tier__radio::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--sh-tier-border-active, #111);
}
.sh-tier__main { flex: 1 1 auto; line-height: 1.3; min-width: 0; }
.sh-tier__title { display: block; font-weight: 700; }
.sh-tier__sub { display: block; font-size: .82em; opacity: .7; }
.sh-tier__save {
  display: inline-block; margin-top: 4px;
  font-size: .72em; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  background: var(--sh-save-bg, #ffd400); color: var(--sh-save-text, #111);
}
.sh-tier__price { flex: 0 0 auto; text-align: right; line-height: 1.25; }
.sh-tier__now { display: block; font-weight: 700; }
.sh-tier__was { display: block; font-size: .82em; opacity: .55; text-decoration: line-through; }
.sh-tier__badge {
  position: absolute; top: -10px; right: 14px;
  font-size: .66em; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  background: var(--sh-badge-bg, #111); color: var(--sh-badge-text, #ffd400);
}
.sh-tier__variants { display: none; width: 100%; margin-top: 12px; }
.sh-tier[aria-checked="true"] .sh-tier__variants { display: block; }

.sh-bundle__total {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-top: 18px; font-weight: 700;
}
.sh-bundle__total-value { font-size: 1.25em; }
.sh-bundle__atc { width: 100%; margin-top: 12px; }
.sh-bundle__atc[disabled] { opacity: .6; cursor: not-allowed; }

.sh-unit { border: 1px solid rgba(0,0,0,.12); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.sh-unit:last-child { margin-bottom: 0; }
.sh-unit__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sh-unit__num {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72em; font-weight: 700;
  background: var(--sh-save-bg, #ffd400); color: var(--sh-save-text, #111);
}
.sh-unit__summary { margin-left: auto; font-size: .78em; opacity: .7; }
.sh-optgroup { margin-bottom: 10px; }
.sh-optgroup:last-child { margin-bottom: 0; }
.sh-optgroup__label { display: block; font-size: .78em; font-weight: 600; margin-bottom: 6px; opacity: .8; }
.sh-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-opt {
  padding: 6px 14px; border: 2px solid rgba(0,0,0,.12); border-radius: 999px;
  background: #fff; font: inherit; font-size: .82em; font-weight: 600;
  cursor: pointer; transition: all .12s ease;
}
.sh-opt:hover { border-color: #111; }
.sh-opt[aria-pressed="true"] { background: #111; color: #fff; border-color: #111; }
.sh-opt[disabled] { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

/* --------------------------------------------------------------------------
   Sticky CTA / sticky add-to-cart
   -------------------------------------------------------------------------- */
.sh-sticky {
  position: fixed;
  left: 0; right: 0;
  z-index: 60;
  padding: 10px 16px;
  background: var(--sh-sticky-bg, #fff);
  color: var(--sh-sticky-text, #111);
  box-shadow: 0 -2px 18px rgba(0,0,0,.13);
  transform: translateY(110%);
  transition: transform .28s cubic-bezier(.2,.7,.3,1);
  will-change: transform;
}
.sh-sticky--top { top: 0; bottom: auto; transform: translateY(-110%); box-shadow: 0 2px 18px rgba(0,0,0,.13); }
.sh-sticky--bottom { bottom: 0; top: auto; }
.sh-sticky.is-visible { transform: translateY(0); }
.sh-sticky--transparent { background: transparent; box-shadow: none; }
.sh-sticky--floating {
  left: 50%; right: auto;
  transform: translate(-50%, 140%);
  width: min(var(--sh-sticky-max, 900px), calc(100% - 32px));
  border-radius: 16px;
  margin-bottom: 16px;
}
.sh-sticky--floating.is-visible { transform: translate(-50%, 0); }

.sh-sticky__inner {
  display: flex; align-items: center; gap: 12px;
  max-width: var(--sh-sticky-max, 1200px); margin: 0 auto;
}
.sh-sticky__image {
  flex: 0 0 auto; width: 46px; height: 46px;
  object-fit: cover; border-radius: 8px;
}
.sh-sticky__text { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.sh-sticky__title {
  display: block; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sh-sticky__subtitle { display: block; font-size: .8em; opacity: .75; }
.sh-sticky__price { flex: 0 0 auto; font-weight: 700; white-space: nowrap; }
.sh-sticky__compare { opacity: .5; text-decoration: line-through; font-weight: 400; margin-right: 6px; }
.sh-sticky__select { flex: 0 0 auto; max-width: 40vw; }
.sh-sticky__btn { flex: 0 0 auto; white-space: nowrap; text-decoration: none; display: inline-block; text-align: center; }

@media (max-width: 749px) {
  .sh-sticky__inner { gap: 8px; }
  .sh-sticky--stacked .sh-sticky__inner { flex-wrap: wrap; }
  .sh-sticky--stacked .sh-sticky__btn { width: 100%; }
}

.sh-stars { display: inline-flex; align-items: center; gap: 2px; vertical-align: -.1em; }
.sh-stars svg { width: 1em; height: 1em; display: block; }
.sh-stars__label { font-size: .78em; opacity: .75; margin-left: 4px; }

/* --------------------------------------------------------------------------
   Icon bar
   -------------------------------------------------------------------------- */
.sh-iconbar { display: grid; gap: var(--sh-iconbar-gap, 16px); }
.sh-iconbar__item {
  display: flex; align-items: center; gap: 12px;
  padding: var(--sh-iconbar-pad, 0);
  border-radius: var(--sh-card-radius, 12px);
  background: var(--sh-card-bg, transparent);
  color: var(--sh-card-text, inherit);
}
.sh-iconbar--stacked .sh-iconbar__item { flex-direction: column; text-align: center; gap: 8px; }
.sh-iconbar__icon { flex: 0 0 auto; display: grid; place-items: center; }
.sh-iconbar__icon svg,
.sh-iconbar__icon img { width: var(--sh-icon-size, 32px); height: var(--sh-icon-size, 32px); object-fit: contain; }
.sh-iconbar__title { font-weight: 700; display: block; }
.sh-iconbar__text { font-size: .88em; opacity: .8; }
.sh-iconbar__text > *:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Comparison table
   -------------------------------------------------------------------------- */
.sh-compare { width: 100%; overflow-x: auto; }
.sh-compare__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--sh-compare-radius, 14px);
}
.sh-compare__table th,
.sh-compare__table td {
  padding: 14px 12px;
  text-align: center;
  vertical-align: middle;
}
.sh-compare__table th:first-child,
.sh-compare__table td:first-child { text-align: left; min-width: 150px; }
.sh-compare__us {
  background: var(--sh-compare-hl-bg, #111);
  color: var(--sh-compare-hl-text, #fff);
}
.sh-compare__other {
  background: var(--sh-compare-other-bg, #f4f4f4);
  color: var(--sh-compare-other-text, #111);
}
.sh-compare__table tbody td { border-top: 1px solid rgba(128,128,128,var(--sh-compare-sep, .18)); }
.sh-compare__logo { max-width: 100%; height: auto; display: inline-block; }
.sh-compare--minimal .sh-compare__us,
.sh-compare--minimal .sh-compare__other { background: transparent; color: inherit; }
.sh-compare--minimal .sh-compare__table tbody td { border-top: 1px solid rgba(128,128,128,var(--sh-compare-minimal-sep, .2)); }

.sh-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; }
.sh-mark--solid { border-radius: 50%; }
.sh-mark svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   Countdown timer
   -------------------------------------------------------------------------- */
.sh-countdown { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.sh-countdown__unit {
  display: grid; place-items: center;
  min-width: 62px; padding: 10px 8px;
  border-radius: var(--sh-count-radius, 10px);
  background: var(--sh-count-bg, rgba(0,0,0,.06));
  color: var(--sh-count-text, inherit);
}
.sh-countdown__value { font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.sh-countdown__label { font-size: .68em; text-transform: uppercase; letter-spacing: .06em; opacity: .7; margin-top: 4px; }
.sh-countdown--inline .sh-countdown__unit { min-width: 0; padding: 0; background: none; }
.sh-countdown.is-expired { display: none; }
.sh-countdown__sep { font-weight: 700; opacity: .4; }

/* --------------------------------------------------------------------------
   Section divider
   -------------------------------------------------------------------------- */
.sh-divider { display: block; width: 100%; line-height: 0; }
.sh-divider svg { display: block; width: 100%; height: auto; }
.sh-divider--flip-h svg { transform: scaleX(-1); }
.sh-divider--flip-v svg { transform: scaleY(-1); }
.sh-divider--flip-h.sh-divider--flip-v svg { transform: scale(-1, -1); }

/* --------------------------------------------------------------------------
   Scroll to top
   -------------------------------------------------------------------------- */
.sh-totop {
  position: fixed; z-index: 55;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: var(--sh-totop-bg, #111); color: var(--sh-totop-text, #fff);
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}
.sh-totop.is-visible { opacity: 1; visibility: visible; }
.sh-totop:hover { transform: translateY(-2px); }
.sh-totop svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Visibility helpers (used by every section's "Display on" setting)
   -------------------------------------------------------------------------- */
@media (max-width: 749px) { .sh-hide-mobile { display: none !important; } }
@media (min-width: 750px) { .sh-hide-desktop { display: none !important; } }

.sh-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .sh-sticky, .sh-totop, .sh-tier, .sh-opt { transition: none; }
}
