/**
 * AITopUp — Single product layout v5 (compact media + even spacing).
 * Scope: body.aitopup-sp-layout-v1
 */

/* ===== Rhythm tokens ===== */
body.aitopup-sp-layout-v1 {
  --sp-gap: 0.75rem;
  --sp-pad: 1rem;
  --sp-pad-lg: 1.125rem;
}

/* ===== Canvas + card tokens (gray page, white surfaces) ===== */
body.aitopup-sp-layout-v1 .site-main {
  padding-top: 1.25rem;
  background: var(--sp-canvas) !important;
  padding-bottom: 2rem;
}
[data-theme="light"] body.aitopup-sp-layout-v1 .site-main {
  padding-top: 1.25rem;
  --sp-canvas: #f3f4f7;
  --sp-card-bg: #ffffff;
  --sp-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 20px rgba(15, 23, 42, 0.06);
}
[data-theme="dark"] body.aitopup-sp-layout-v1 .site-main,
:root:not([data-theme="light"]) body.aitopup-sp-layout-v1 .site-main {
  padding-top: 1.25rem;
  --sp-canvas: #070b14;
  --sp-card-bg: #111827;
  --sp-card-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
body.aitopup-sp-layout-v1 .aitopup-sp-card {
  background: var(--sp-card-bg);
  border-radius: 0.75rem;
  padding: var(--sp-pad);
  box-shadow: var(--sp-card-shadow);
  border: none;
}
@media (min-width: 768px) {
  body.aitopup-sp-layout-v1 .aitopup-sp-card {
    padding: var(--sp-pad) var(--sp-pad-lg);
    border-radius: 0.875rem;
  }
}
body.aitopup-sp-layout-v1 .aitopup-sp-card__title {
  margin: 0 0 var(--sp-gap);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg-bright);
  line-height: 1.35;
}

/* ===== Breadcrumb ===== */
.aitopup-sp-layout-v1 .aitopup-sp-breadcrumb {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 var(--sp-gap);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.aitopup-sp-layout-v1 .aitopup-sp-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.aitopup-sp-layout-v1 .aitopup-sp-breadcrumb a:hover { color: var(--accent-link); }
.aitopup-sp-layout-v1 .aitopup-sp-breadcrumb span[aria-current] { color: var(--fg-bright); font-weight: 500; }
.aitopup-sp-layout-v1 .aitopup-sp-breadcrumb .sep { opacity: 0.5; }

/* ===== Grid — smaller image, wider content ===== */
.aitopup-sp-layout-v1 div.product.aitopup-sp-product {
  display: block;
}
.aitopup-sp-layout-v1 .aitopup-sp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-gap);
}
@media (max-width: 767px) {
  .aitopup-sp-layout-v1 .aitopup-sp-grid {
    gap: var(--sp-gap);
  }
  .aitopup-sp-layout-v1 .aitopup-sp-summary {
    order: 1;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-aside {
    order: 2;
  }
}
.aitopup-sp-layout-v1 .aitopup-sp-aside {
  display: flex;
  flex-direction: column;
  gap: var(--sp-gap);
  min-width: 0;
}
@media (min-width: 1024px) {
  .aitopup-sp-layout-v1 .aitopup-sp-aside {
    position: sticky;
    top: calc(var(--viewport-header-offset, 4rem) + 0.75rem);
    align-self: start;
  }
}
@media (min-width: 768px) {
  .aitopup-sp-layout-v1 .aitopup-sp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-gap);
    align-items: start;
  }
}

/* ===== Gallery — compact thumbnail (text-first product) ===== */
.aitopup-sp-layout-v1 .aitopup-sp-gallery { position: relative; }
.aitopup-sp-layout-v1 .aitopup-sp-card--media {
  align-self: start;
}
.aitopup-sp-layout-v1 .aitopup-sp-gallery .onsale {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: 9999px;
  color: #fff;
  background: linear-gradient(135deg, #C2410C 0%, #B91C1C 100%);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}
.aitopup-sp-layout-v1 .woocommerce-product-gallery {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100%;
  float: none !important;
}
.aitopup-sp-layout-v1 .woocommerce-product-gallery__wrapper { margin: 0; }
.aitopup-sp-layout-v1 .woocommerce-product-gallery__image,
.aitopup-sp-layout-v1 .woocommerce-product-gallery__image--placeholder {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  border: none;
  background: var(--surface-muted, #f8fafc);
  aspect-ratio: 2 / 1;
  width: 100%;
  max-height: none;
}
.aitopup-sp-layout-v1 .woocommerce-product-gallery__image a,
.aitopup-sp-layout-v1 .woocommerce-product-gallery__image {
  display: block;
  height: 100%;
  pointer-events: none;
}
.aitopup-sp-layout-v1 .woocommerce-product-gallery__image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  border-radius: 0.75rem;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.aitopup-sp-layout-v1 .aitopup-sp-gallery--protected .woocommerce-product-gallery__image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  cursor: default;
}
.aitopup-sp-layout-v1 .woocommerce-product-gallery__trigger,
.aitopup-sp-layout-v1 .woocommerce-product-gallery__image .zoomImg {
  display: none !important;
}

/* ===== Summary column ===== */
.aitopup-sp-layout-v1 .aitopup-sp-summary {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: var(--sp-gap);
}
@media (min-width: 768px) {
  .aitopup-sp-layout-v1 .aitopup-sp-summary {
    position: sticky;
    top: calc(var(--viewport-header-offset, 4rem) + 0.75rem);
    align-self: start;
  }
}
.aitopup-sp-layout-v1 .aitopup-sp-card--head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-card--head .product_title,
.aitopup-sp-layout-v1 .aitopup-sp-card--head p.price,
.aitopup-sp-layout-v1 .aitopup-sp-card--head .price {
  margin: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-summary .product_title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3.6vw, 1.55rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg-bright);
  font-weight: 700;
}
.aitopup-sp-layout-v1 .aitopup-sp-social-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0.1rem 0 0.15rem;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--muted);
}
.aitopup-sp-layout-v1 .aitopup-sp-social-proof__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-social-proof__stars {
  display: inline-flex;
  align-items: center;
  gap: 0.05rem;
  line-height: 1;
}
.aitopup-sp-layout-v1 .aitopup-sp-social-proof__star {
  font-size: 0.82rem;
  color: #f59e0b;
}
.aitopup-sp-layout-v1 .aitopup-sp-social-proof__score {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fg-bright);
}
.aitopup-sp-layout-v1 .aitopup-sp-social-proof__sep {
  color: var(--muted-dim);
  font-weight: 600;
  user-select: none;
}
.aitopup-sp-layout-v1 .aitopup-sp-social-proof__reviews,
.aitopup-sp-layout-v1 .aitopup-sp-social-proof__sold {
  font-weight: 500;
  color: var(--muted);
}
.aitopup-sp-layout-v1 .aitopup-sp-social-proof__sold {
  color: var(--price);
  font-weight: 600;
}

/* ===== Price block ===== */
.aitopup-sp-layout-v1 .aitopup-sp-summary p.price,
.aitopup-sp-layout-v1 .aitopup-sp-summary .price {
  margin: 0;
  color: var(--price) !important;
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.1;
}
.aitopup-sp-layout-v1 .aitopup-sp-summary p.price ins,
.aitopup-sp-layout-v1 .aitopup-sp-summary .price ins,
.aitopup-sp-layout-v1 .aitopup-sp-summary p.price .woocommerce-Price-amount,
.aitopup-sp-layout-v1 .aitopup-sp-summary .price .woocommerce-Price-amount,
.aitopup-sp-layout-v1 .aitopup-sp-summary p.price .price-sale,
.aitopup-sp-layout-v1 .aitopup-sp-summary .price .price-sale {
  color: inherit !important;
}
.aitopup-sp-layout-v1 .aitopup-sp-price-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.aitopup-sp-layout-v1 .aitopup-sp-price-from {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.aitopup-sp-layout-v1 .aitopup-sp-summary del {
  color: var(--muted-dim);
  font-size: 0.55em;
  font-weight: 500;
}
.aitopup-sp-layout-v1 .aitopup-sp-summary ins { text-decoration: none; }
/* Variation prices use the theme's own sale markup (inc/woocommerce.php); shop.css isn't loaded here. */
.aitopup-sp-layout-v1 .aitopup-sp-summary .price .price-regular {
  margin-left: 0.4rem;
  color: var(--muted-dim) !important;
  font-size: 0.55em;
  font-weight: 500;
  text-decoration: line-through;
}

/* Attribute headings when a product has several choices, and single-value attributes shown as a fact. */
.aitopup-sp-layout-v1 .aitopup-sp-attr-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.aitopup-sp-layout-v1 td.value + td.value .aitopup-sp-attr-heading,
.aitopup-sp-layout-v1 tr + tr .aitopup-sp-attr-heading {
  margin-top: 1rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-fixed-attr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  font-size: 0.9375rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-fixed-attr span { color: var(--muted); }
.aitopup-sp-layout-v1 .aitopup-sp-fixed-attr strong { color: var(--fg-bright); }

/* Short description hidden on single product (trust facts + swatches cover essentials) */
.aitopup-sp-layout-v1 .woocommerce-product-details__short-description {
  display: none !important;
}

/* ===== Checkout card — full width of summary column ===== */
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout,
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout form.variations_form,
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout form.variations_form.cart,
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout form.cart,
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout table.variations,
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout table.variations td,
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout .aitopup-sp-swatches,
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout .aitopup-sp-swatch-group,
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout .aitopup-sp-swatch-group__list {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ===== Purchase card (nested inside checkout card) ===== */
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout .aitopup-sp-purchase-card {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  width: 100%;
}
.aitopup-sp-layout-v1 .aitopup-sp-purchase-card {
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: var(--sp-gap);
}
.aitopup-sp-layout-v1 .aitopup-sp-purchase-label {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-bright);
}
/* ===== Variations — card grid ===== */
.aitopup-sp-layout-v1 table.variations {
  margin: 0;
  border: none;
}
.aitopup-sp-layout-v1 table.variations,
.aitopup-sp-layout-v1 table.variations tbody,
.aitopup-sp-layout-v1 table.variations tr,
.aitopup-sp-layout-v1 table.variations td,
.aitopup-sp-layout-v1 table.variations th {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
}
.aitopup-sp-layout-v1 table.variations th.label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Hide native Woo select until JS swatches render (prevents F5 flash) */
.aitopup-sp-layout-v1 table.variations select[name^="attribute_"],
.aitopup-sp-layout-v1 .aitopup-sp-select-hidden {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0);
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.aitopup-sp-layout-v1:not(.aitopup-sp-packages-ready) table.variations td.value {
  position: relative;
  min-height: 9.5rem;
}
.aitopup-sp-layout-v1:not(.aitopup-sp-packages-ready) table.variations td.value::before {
  content: "";
  display: block;
  width: 100%;
  height: 9rem;
  border-radius: 0.625rem;
  background: linear-gradient(
    90deg,
    var(--surface-muted) 0%,
    rgba(148, 163, 184, 0.12) 50%,
    var(--surface-muted) 100%
  );
  background-size: 200% 100%;
  animation: aitopup-sp-skeleton 1.1s ease-in-out infinite;
}
.aitopup-sp-layout-v1.aitopup-sp-packages-ready table.variations td.value {
  min-height: 0;
}
.aitopup-sp-layout-v1.aitopup-sp-packages-ready table.variations td.value::before {
  display: none;
}
@keyframes aitopup-sp-skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
/* Package picker — radio rows, grouped when mixed types */
.aitopup-sp-layout-v1 .aitopup-sp-swatches {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch-group__title {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fg-bright);
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch-group__hint {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch-group__list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch--row {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem 0.75rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 3.25rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.625rem;
  border: 1.5px solid var(--border);
  background: var(--sp-card-bg);
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch--row:hover {
  border-color: var(--accent-border);
  background: var(--surface-muted);
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch--row.is-active {
  border-color: var(--accent-link);
  background: rgba(14, 165, 233, 0.06);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.15);
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch__radio {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--sp-card-bg);
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch--row.is-active .aitopup-sp-swatch__radio {
  border-color: var(--accent-link);
  background: var(--accent-link);
  box-shadow: inset 0 0 0 3px var(--sp-card-bg);
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch__main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch__name {
  color: var(--fg-bright);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch__unit {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.3;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-self: end;
  gap: 0.25rem;
  flex-shrink: 0;
  min-width: 5.5rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch__price {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--price);
  white-space: nowrap;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch__badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.2rem;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch__badge.is-recommended {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.aitopup-sp-layout-v1 .aitopup-sp-swatch__badge.is-owner {
  color: #c2410c;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.24);
}
/* On dark cards the light-theme greens and oranges fell to 2.7–3.0:1. */
:root:not([data-theme="light"]) .aitopup-sp-layout-v1 .aitopup-sp-swatch__badge.is-recommended { color: #34d399; }
:root:not([data-theme="light"]) .aitopup-sp-layout-v1 .aitopup-sp-swatch__badge.is-owner { color: #fdba74; }
.aitopup-sp-layout-v1 .woocommerce-variation.single_variation {
  display: none !important;
}
.aitopup-sp-layout-v1 .reset_variations {
  display: none !important;
}

/* ===== Add to cart — quantity stepper + CTA stack (v2) ===== */
.aitopup-sp-layout-v1 form.cart,
.aitopup-sp-layout-v1 form.variations_form.cart {
  width: 100%;
  max-width: 100%;
}
.aitopup-sp-layout-v1 .aitopup-sp-card--checkout .aitopup-sp-cart-actions {
  margin-top: var(--sp-gap);
  padding-top: var(--sp-gap);
  border-top: 1px solid var(--border);
}
.aitopup-sp-layout-v1 .aitopup-sp-cart-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

/* Quantity row — subtle card background */
.aitopup-sp-layout-v1 .aitopup-sp-qty-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: rgba(0, 45, 132, 0.04);
  border-radius: 0.875rem;
  border: 1px solid rgba(0, 45, 132, 0.08);
}
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-sp-qty-block {
  background: var(--surface-muted);
  border-color: var(--border);
}
.aitopup-sp-layout-v1 .aitopup-sp-qty-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fg-bright);
  flex-shrink: 0;
}

/* Pill stepper */
.aitopup-sp-layout-v1 .aitopup-sp-qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid rgba(0, 45, 132, 0.15);
  border-radius: 9999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 45, 132, 0.08);
}
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-sp-qty-stepper {
  background: var(--card);
  border-color: var(--border);
  box-shadow: none;
}
.aitopup-sp-layout-v1 .aitopup-sp-qty-stepper .quantity {
  display: contents;
}
.aitopup-sp-layout-v1 .aitopup-sp-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-height: 2.75rem;
  border: none;
  background: transparent;
  color: #002d84;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease;
}
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-sp-qty-btn {
  color: var(--accent-link);
}
.aitopup-sp-layout-v1 .aitopup-sp-qty-btn:hover:not(:disabled) {
  background: rgba(0, 45, 132, 0.08);
  color: #001a5c;
}
.aitopup-sp-layout-v1 .aitopup-sp-qty-btn:active:not(:disabled) {
  background: rgba(0, 45, 132, 0.15);
}
.aitopup-sp-layout-v1 .aitopup-sp-qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.aitopup-sp-layout-v1 .aitopup-sp-qty-stepper input.qty {
  width: 3rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0;
  border: none;
  border-left: 1.5px solid rgba(0, 45, 132, 0.1);
  border-right: 1.5px solid rgba(0, 45, 132, 0.1);
  border-radius: 0;
  background: transparent;
  color: var(--fg-bright);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-sp-qty-stepper input.qty {
  border-color: var(--border);
}
.aitopup-sp-layout-v1 .aitopup-sp-qty-stepper input.qty::-webkit-outer-spin-button,
.aitopup-sp-layout-v1 .aitopup-sp-qty-stepper input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Button stack — full-width stacked */
.aitopup-sp-layout-v1 .aitopup-sp-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 100%;
}

/* Common base */
.aitopup-sp-layout-v1 form.cart .single_add_to_cart_button,
.aitopup-sp-layout-v1 .single_add_to_cart_button,
.aitopup-sp-layout-v1 .aitopup-buy-now-button {
  width: 100%;
  min-width: 0;
  min-height: 3.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.015em;
  border-radius: 0.875rem !important;
  transition: transform 0.14s ease, box-shadow 0.18s ease, opacity 0.14s ease !important;
  position: relative;
  overflow: hidden;
}

/* "Buy now" — red gradient, larger, PRIMARY */
.aitopup-sp-layout-v1 .aitopup-buy-now-button,
.aitopup-sp-layout-v1.woocommerce button.button.aitopup-buy-now-button,
.aitopup-sp-layout-v1 form.cart .button.aitopup-buy-now-button {
  order: -1;
  min-height: 3.375rem !important;
  font-size: 1.0625rem !important;
  background: linear-gradient(135deg, #ff6b35 0%, #f5290a 45%, #c41a10 100%) !important;
  color: #fff !important;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  box-shadow:
    0 4px 16px rgba(220, 38, 16, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}
/* Shine sweep pseudo-element */
.aitopup-sp-layout-v1 .aitopup-buy-now-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
@media (hover: hover) {
  .aitopup-sp-layout-v1 .aitopup-buy-now-button:hover:not(:disabled):not(.disabled)::after {
    animation: sp-shine-sweep 0.6s ease forwards;
  }
}
@keyframes sp-shine-sweep {
  to { left: 120%; }
}
.aitopup-sp-layout-v1 .aitopup-buy-now-button:hover:not(:disabled):not(.disabled),
.aitopup-sp-layout-v1.woocommerce button.button.aitopup-buy-now-button:hover:not(:disabled):not(.disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 8px 24px rgba(220, 38, 16, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.30) !important;
}
.aitopup-sp-layout-v1 .aitopup-buy-now-button:active:not(:disabled):not(.disabled) {
  transform: translateY(0) scale(0.988);
  box-shadow: 0 2px 8px rgba(220, 38, 16, 0.28) !important;
}
.aitopup-sp-layout-v1 .aitopup-buy-now-button.disabled,
.aitopup-sp-layout-v1 .aitopup-buy-now-button:disabled,
.aitopup-sp-layout-v1.woocommerce button.button.aitopup-buy-now-button:disabled {
  background: #e8edf3 !important;
  color: #94a3b8 !important;
  text-shadow: none;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-buy-now-button.disabled,
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-buy-now-button:disabled {
  background: var(--surface-muted) !important;
  color: var(--muted-dim) !important;
}

/* "Add to cart" — brand blue gradient, SECONDARY */
.aitopup-sp-layout-v1 form.cart .single_add_to_cart_button,
.aitopup-sp-layout-v1 .single_add_to_cart_button {
  background: var(--gradient-cta) !important;
  background-size: 200% auto !important;
  color: #fff !important;
  border: none !important;
  box-shadow:
    0 4px 14px rgba(0, 45, 132, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
[data-theme="dark"] .aitopup-sp-layout-v1 form.cart .single_add_to_cart_button,
[data-theme="dark"] .aitopup-sp-layout-v1 .single_add_to_cart_button {
  background: var(--gradient-cta) !important;
  background-size: 200% auto !important;
  color: #fff !important;
  border: none !important;
}
.aitopup-sp-layout-v1 form.cart .single_add_to_cart_button:hover:not(:disabled),
.aitopup-sp-layout-v1 .single_add_to_cart_button:hover:not(:disabled) {
  background-position: right center !important;
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px rgba(0, 45, 132, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.26) !important;
}
.aitopup-sp-layout-v1 form.cart .single_add_to_cart_button:active:not(:disabled),
.aitopup-sp-layout-v1 .single_add_to_cart_button:active:not(:disabled) {
  transform: translateY(0) scale(0.988);
  box-shadow: 0 2px 8px rgba(0, 45, 132, 0.20) !important;
}
.aitopup-sp-layout-v1 form.cart .single_add_to_cart_button:disabled,
.aitopup-sp-layout-v1 .single_add_to_cart_button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
@media (max-width: 479px) {
  .aitopup-sp-layout-v1 .aitopup-sp-btn-stack {
    flex-direction: column;
  }
}

/* ===== Mobile sticky buy bar ===== */
.aitopup-sp-mobile-buy {
  display: none;
}
@media (max-width: 767px) {
  body.aitopup-sp-layout-v1 {
    padding-bottom: calc(5.5rem + var(--safe-bottom, 0px));
  }
  .aitopup-sp-layout-v1 .woocommerce-product-gallery__image,
  .aitopup-sp-layout-v1 .woocommerce-product-gallery__image--placeholder {
    aspect-ratio: 2 / 1;
    max-height: none;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-purchase-card {
    padding: 0.9rem;
    scroll-margin-top: calc(var(--viewport-header-offset, 3.5rem) + 0.75rem);
  }
  .aitopup-sp-layout-v1 .aitopup-sp-purchase-label {
    font-size: 0.78rem;
    flex: 0 0 auto;
    letter-spacing: 0.03em;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-swatches {
    gap: 0.45rem;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-swatch {
    gap: 0.36rem;
    padding: 0.8rem;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-swatch__name {
    font-size: 0.86rem;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-swatch__price {
    font-size: 1rem;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-swatch__desc {
    font-size: 0.72rem;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-swatch__bullets {
    gap: 0.18rem;
    font-size: 0.75rem;
  }
  .aitopup-sp-mobile-buy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 1rem calc(0.75rem + var(--safe-bottom, 0px));
    border-top: 1px solid rgba(14, 165, 233, 0.22);
    background: rgba(248, 250, 252, 0.96);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  [data-theme="dark"] .aitopup-sp-mobile-buy,
  :root:not([data-theme="light"]) .aitopup-sp-mobile-buy {
    background: rgba(10, 14, 26, 0.96);
  }
  .aitopup-sp-mobile-buy__meta {
    min-width: 0;
    display: grid;
    gap: 0.08rem;
  }
  .aitopup-sp-mobile-buy__label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .aitopup-sp-mobile-buy__name {
    color: var(--fg-bright);
    font-size: 0.84rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aitopup-sp-mobile-buy__price {
    color: var(--price);
    font-size: 0.95rem;
    font-weight: 900;
  }
  .aitopup-sp-mobile-buy__button {
    min-height: 2.75rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 0.75rem;
    color: #fff;
    background: linear-gradient(135deg, #ff7043 0%, #f44336 42%, #cb1c22 100%);
    box-shadow: 0 8px 22px rgba(203, 28, 34, 0.32);
    font-size: 0.92rem;
    font-weight: 900;
    white-space: nowrap;
  }
  .aitopup-sp-mobile-buy__button:disabled {
    opacity: 0.48;
    box-shadow: none;
  }
}

/* ===== Trust commitments — fixed 4 items, 2×2 under gallery ===== */
.aitopup-sp-layout-v1 .aitopup-sp-commitments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 479px) {
  .aitopup-sp-layout-v1 .aitopup-sp-commitments {
    grid-template-columns: 1fr;
  }
}
.aitopup-sp-layout-v1 .aitopup-sp-commitment {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  min-width: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-commitment__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  color: var(--accent-link);
  background: rgba(14, 165, 233, 0.08);
}
.aitopup-sp-layout-v1 .aitopup-sp-commitment__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-commitment__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fg-bright);
  line-height: 1.3;
}
.aitopup-sp-layout-v1 .aitopup-sp-commitment__desc {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ===== Recently viewed — compact secondary block under trust card ===== */
.aitopup-sp-layout-v1 .aitopup-sp-card--recent {
  padding: 0.65rem 0.7rem;
  box-shadow: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-sp-card--recent {
  background: rgba(17, 24, 39, 0.45);
}
.aitopup-sp-layout-v1 .aitopup-sp-card--recent,
.aitopup-sp-layout-v1 .aitopup-recent-viewed {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed {
  display: grid;
  gap: 0.45rem;
  width: 100%;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed[hidden] {
  display: none !important;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fg);
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__clear {
  border: 0;
  padding: 0;
  background: none;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__clear:hover {
  color: var(--fg);
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__viewport {
  position: relative;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 4.35rem;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__item {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 4.35rem;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__item--empty {
  visibility: hidden;
  pointer-events: none;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.38rem;
  width: 100%;
  height: 100%;
  min-height: 4.35rem;
  padding: 0.32rem 0.38rem;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-recent-viewed__link {
  background: var(--surface-muted);
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__link:hover {
  border-color: rgba(14, 165, 233, 0.28);
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__thumb {
  flex: 0 0 3.35rem;
  width: 3.35rem;
  height: 1.68rem;
  min-width: 3.35rem;
  border-radius: 0.32rem;
  overflow: hidden;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__placeholder {
  width: 60%;
  height: 42%;
  border-radius: 0.25rem;
  background: var(--border);
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  padding-right: 0.85rem;
  overflow: hidden;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.67rem;
  font-weight: 600;
  line-height: 1.32;
  color: var(--fg-bright);
  word-break: break-word;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__price {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--price);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__remove {
  position: absolute;
  top: 0.18rem;
  right: 0.18rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 0;
  border-radius: 9999px;
  padding: 0;
  background: rgba(148, 163, 184, 0.22);
  color: var(--muted);
  cursor: pointer;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__remove svg {
  width: 0.58rem;
  height: 0.58rem;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__remove:hover {
  background: rgba(148, 163, 184, 0.35);
  color: var(--fg);
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.3rem;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__nav[hidden] {
  display: none !important;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__prev,
.aitopup-sp-layout-v1 .aitopup-recent-viewed__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0;
  background: #fff;
  color: var(--muted);
  box-shadow: none;
  cursor: pointer;
}
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-recent-viewed__prev,
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-recent-viewed__next {
  background: var(--surface-muted);
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__prev[hidden],
.aitopup-sp-layout-v1 .aitopup-recent-viewed__next[hidden] {
  visibility: hidden;
  pointer-events: none;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__prev svg,
.aitopup-sp-layout-v1 .aitopup-recent-viewed__next svg {
  width: 0.78rem;
  height: 0.78rem;
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__prev:hover,
.aitopup-sp-layout-v1 .aitopup-recent-viewed__next:hover {
  border-color: rgba(14, 165, 233, 0.28);
  color: var(--fg);
}
.aitopup-sp-layout-v1 .aitopup-recent-viewed__pager {
  min-width: 2rem;
  text-align: center;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
}

/* Hide SKU + product meta */
.aitopup-sp-layout-v1 .product_meta {
  display: none !important;
}

/* ===== Info sections ===== */
.aitopup-sp-layout-v1 .aitopup-sp-sections {
  margin-top: var(--sp-gap);
  display: grid;
  gap: var(--sp-gap);
  width: 100%;
  max-width: none;
}
.aitopup-sp-layout-v1 .aitopup-sp-section {
  border: none;
  border-radius: 0.875rem;
  background: var(--sp-card-bg);
  box-shadow: var(--sp-card-shadow);
  padding: var(--sp-pad) var(--sp-pad-lg);
}
.aitopup-sp-layout-v1 .aitopup-sp-section > h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin: 0 0 var(--sp-gap);
  color: var(--fg-bright);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-section__kicker {
  margin: 0 0 var(--sp-gap);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-section--desc {
  padding-top: var(--sp-pad);
}
.aitopup-sp-layout-v1 .aitopup-sp-section__icon { color: var(--accent-link); }
/* ===== Product description prose ===== */
.aitopup-sp-layout-v1 .aitopup-sp-prose {
  color: var(--fg);
  font-size: 0.9375rem;
  line-height: 1.72;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose > * + * {
  margin-top: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose :where(p, ul, ol, table, .aitopup-sp-callout) {
  margin: 0 0 1.25rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose :where(p, ul, ol, table, .aitopup-sp-callout):last-child {
  margin-bottom: 0;
}

/* Lead title — first H2 inside prose */
.aitopup-sp-layout-v1 .aitopup-sp-prose > h2:first-child,
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-prose-lead {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--fg-bright);
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--accent-border);
}
.aitopup-sp-layout-v1 .aitopup-sp-prose > h2:first-child::after,
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-prose-lead::after {
  content: none;
}

/* Section headings */
.aitopup-sp-layout-v1 .aitopup-sp-prose h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--fg-bright);
  margin: 2rem 0 0.75rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--color-accent-primary);
}
.aitopup-sp-layout-v1 .aitopup-sp-prose h3:first-of-type {
  margin-top: 1.5rem;
}

/* Intro paragraph */
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-intro {
  font-size: 1.02rem;
  color: var(--fg);
  line-height: 1.8;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-intro strong {
  color: var(--fg-bright);
  font-weight: 600;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-highlight {
  color: var(--accent-link);
  font-weight: 700;
}

/* Feature grid */
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-features {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
}
@media (min-width: 1024px) {
  .aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--fg);
  margin: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-features li::before {
  content: "";
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  background: var(--gradient-brand);
  opacity: 0.9;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  mask-size: 65% 65%;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  -webkit-mask-size: 65% 65%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-features strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fg-bright);
  margin-bottom: 0.1rem;
}

/* Pricing table */
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-pricing-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-pricing-table thead {
  background: var(--accent-surface-strong);
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-pricing-table th {
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-link);
  border-bottom: 1px solid var(--accent-border);
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-pricing-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  vertical-align: top;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-pricing-table tbody tr:last-child td {
  border-bottom: none;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-pricing-table tbody tr:hover td {
  background: var(--accent-surface);
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-pricing-table .aitopup-sp-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-link);
  white-space: nowrap;
}

/* Comparison callout */
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-callout {
  padding: 0.85rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--callout-info-border);
  background: var(--callout-info-bg);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--fg);
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-callout strong {
  color: var(--accent-link);
  font-weight: 700;
}

/* Bullet lists (non-feature) */
.aitopup-sp-layout-v1 .aitopup-sp-prose ul:not(.aitopup-sp-features):not(.aitopup-sp-commitments) {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose ul:not(.aitopup-sp-features):not(.aitopup-sp-commitments) li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--fg);
}
.aitopup-sp-layout-v1 .aitopup-sp-prose ul:not(.aitopup-sp-features):not(.aitopup-sp-commitments) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent-primary);
}
.aitopup-sp-layout-v1 .aitopup-sp-prose ul:not(.aitopup-sp-features):not(.aitopup-sp-commitments) strong {
  color: var(--fg-bright);
  font-weight: 600;
}

/* Steps */
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  counter-reset: sp-step;
  display: grid;
  gap: 0.65rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-steps li {
  counter-increment: sp-step;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--fg);
  margin: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-steps li::before {
  content: counter(sp-step);
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-cta);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-steps strong {
  color: var(--fg-bright);
  font-weight: 600;
}

/* Commitments */
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-commitments {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-commitments {
    grid-template-columns: repeat(2, 1fr);
  }
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-commitments li {
  padding: 0.75rem 0.9rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--fg);
  margin: 0;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-commitments strong {
  color: var(--fg-bright);
  font-weight: 600;
}

/* CTA closing */
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-cta {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: 0.75rem;
  background: var(--accent-surface);
  border: 1px solid var(--accent-border);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--fg);
  text-align: center;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose .aitopup-sp-cta strong {
  color: var(--accent-link);
  font-weight: 700;
}

/* Generic prose fallbacks (products without custom classes) */
.aitopup-sp-layout-v1 .aitopup-sp-prose h2:not(:first-child) {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fg-bright);
  margin: 1.75rem 0 0.65rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose table:not(.aitopup-sp-pricing-table) {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose table:not(.aitopup-sp-pricing-table) th,
.aitopup-sp-layout-v1 .aitopup-sp-prose table:not(.aitopup-sp-pricing-table) td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose table:not(.aitopup-sp-pricing-table) thead th {
  background: var(--accent-surface-strong);
  color: var(--accent-link);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.aitopup-sp-layout-v1 .aitopup-sp-prose strong {
  font-weight: 600;
  color: var(--fg-bright);
}

/* ===== FAQ ===== */
.aitopup-sp-layout-v1 .aitopup-sp-faq__item {
  border-bottom: 1px solid var(--border);
}
.aitopup-sp-layout-v1 .aitopup-sp-faq__item:last-child { border-bottom: none; }
.aitopup-sp-layout-v1 .aitopup-sp-faq__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.9rem 0;
  min-height: var(--touch-min, 44px);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-bright);
}
.aitopup-sp-layout-v1 .aitopup-sp-faq__icon {
  flex-shrink: 0;
  transition: transform 0.25s;
  color: var(--muted);
}
.aitopup-sp-layout-v1 .aitopup-sp-faq__item[open] .aitopup-sp-faq__icon { transform: rotate(180deg); }
.aitopup-sp-layout-v1 .aitopup-sp-faq__a {
  padding: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}
.aitopup-sp-layout-v1 .aitopup-sp-faq__q::-webkit-details-marker { display: none; }

/* ===== Related products — compact 2-up pager ===== */
.aitopup-sp-layout-v1 .aitopup-sp-card--related {
  margin-top: var(--sp-gap);
  overflow: hidden;
}
.aitopup-sp-layout-v1 .related.products,
.aitopup-sp-layout-v1 .aitopup-sp-related-section {
  margin: 0;
  width: 100%;
  max-width: none;
  min-width: 0;
}
/* Override global Woo grid (content.css catalog rules) */
.aitopup-sp-layout-v1 .related.products ul.products,
.aitopup-sp-layout-v1 .related.products ul.products.columns-2,
.aitopup-sp-layout-v1 .related.products ul.products.columns-4,
.aitopup-sp-layout-v1 .aitopup-sp-related-section ul.products {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.65rem !important;
}
.aitopup-sp-layout-v1 .related.products ul.products > li.product {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  float: none !important;
}
.aitopup-sp-layout-v1 .related.products > h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--fg-bright);
}
.aitopup-sp-layout-v1 .related.products ul.aitopup-sp-related__track {
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
  min-height: 5.5rem;
}
.aitopup-sp-layout-v1 .related.products ul.products > li.product {
  min-width: 0;
  display: flex;
}
.aitopup-sp-layout-v1 .related.products ul.products > li.product[hidden] {
  display: none !important;
}
.aitopup-sp-layout-v1 .related.products ul.products > li.aitopup-sp-related__placeholder {
  visibility: hidden;
  pointer-events: none;
  min-height: 5.5rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card {
  width: 100%;
  min-height: 5.25rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-sp-related-card {
  background: var(--surface-muted);
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card:hover {
  border-color: rgba(14, 165, 233, 0.28);
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card__link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  height: 100%;
  min-height: 5.25rem;
  padding: 0.42rem 0.5rem;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card__thumb {
  flex: 0 0 4.85rem;
  width: 4.85rem;
  height: 2.42rem;
  border-radius: 0.38rem;
  overflow: hidden;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card__meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  overflow: hidden;
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card__cat {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.32;
  color: var(--fg-bright);
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card__link:hover .aitopup-sp-related-card__name {
  color: var(--accent-link);
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card__price {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--price);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aitopup-sp-layout-v1 .aitopup-sp-related-card__price .price,
.aitopup-sp-layout-v1 .aitopup-sp-related-card__price ins,
.aitopup-sp-layout-v1 .aitopup-sp-related-card__price .woocommerce-Price-amount,
.aitopup-sp-layout-v1 .aitopup-sp-related-card__price .price-sale {
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}
.aitopup-sp-layout-v1 .aitopup-sp-related__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-related__nav[hidden] {
  display: none !important;
}
.aitopup-sp-layout-v1 .aitopup-sp-related__prev,
.aitopup-sp-layout-v1 .aitopup-sp-related__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-sp-related__prev,
[data-theme="dark"] .aitopup-sp-layout-v1 .aitopup-sp-related__next {
  background: var(--surface-muted);
}
.aitopup-sp-layout-v1 .aitopup-sp-related__prev[hidden],
.aitopup-sp-layout-v1 .aitopup-sp-related__next[hidden] {
  visibility: hidden;
  pointer-events: none;
}
.aitopup-sp-layout-v1 .aitopup-sp-related__prev svg,
.aitopup-sp-layout-v1 .aitopup-sp-related__next svg {
  width: 0.8rem;
  height: 0.8rem;
}
.aitopup-sp-layout-v1 .aitopup-sp-related__pager {
  min-width: 2rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}
@media (max-width: 639px) {
  .aitopup-sp-layout-v1 .related.products ul.products,
  .aitopup-sp-layout-v1 .related.products ul.aitopup-sp-related__track {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-related-card,
  .aitopup-sp-layout-v1 .related.products ul.products > li.aitopup-sp-related__placeholder {
    min-height: 0;
  }
}

.aitopup-sp-layout-v1 .woocommerce-tabs.wc-tabs-wrapper,
.aitopup-sp-layout-v1 .woocommerce-Reviews { display: none; }

@media (max-width: 1023px) {
  .aitopup-sp-layout-v1 .aitopup-sp-gallery { position: static; }
  .aitopup-sp-layout-v1 .woocommerce-product-gallery { max-width: 100%; }
  .aitopup-sp-layout-v1 .woocommerce-product-gallery__image,
  .aitopup-sp-layout-v1 .woocommerce-product-gallery__image--placeholder {
    max-height: none;
  }
}
@media (max-width: 767px) {
  .aitopup-sp-layout-v1 .aitopup-sp-swatches { grid-template-columns: 1fr; }
  .aitopup-sp-layout-v1 .aitopup-sp-section {
    padding: 1.15rem 1rem;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-prose {
    font-size: 0.9rem;
    line-height: 1.68;
  }
  .aitopup-sp-layout-v1 .aitopup-sp-prose h3 {
    margin-top: 1.5rem;
    font-size: 1rem;
  }
}

/* ===== Sold out (inc/product-page/template-hooks.php → aitopup_single_product_out_of_stock_notice) ===== */
.aitopup-sp-layout-v1 .aitopup-sp-oos {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 1rem 1.125rem;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 1rem;
  background: rgba(251, 191, 36, 0.08);
}
.aitopup-sp-layout-v1 .aitopup-sp-oos__title {
  margin: 0;
  font-weight: 700;
  color: var(--warning-text);
}
.aitopup-sp-layout-v1 .aitopup-sp-oos__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--fg);
}
.aitopup-sp-layout-v1 .aitopup-sp-oos__alts {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.aitopup-sp-layout-v1 .aitopup-sp-oos__alts a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--fg-bright);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.aitopup-sp-layout-v1 .aitopup-sp-oos__alts a:hover { border-color: var(--accent-link); }
.aitopup-sp-layout-v1 .aitopup-sp-oos__price { flex-shrink: 0; font-weight: 700; }
.aitopup-sp-layout-v1 .aitopup-sp-oos__price .price-regular {
  margin-left: 0.35rem;
  font-size: 0.8em;
  font-weight: 500;
  color: var(--muted-dim);
  text-decoration: line-through;
}
.aitopup-sp-layout-v1 .aitopup-sp-oos__cta { justify-self: start; }

/* Nothing to buy: hide quantity, buy buttons and the sticky buy bar. */
.aitopup-sp-is-oos .aitopup-sp-cart-actions,
.aitopup-sp-is-oos .aitopup-sp-mobile-buy {
  display: none !important;
}
@media (max-width: 767px) {
  body.aitopup-sp-is-oos.aitopup-sp-layout-v1 { padding-bottom: 0; }
}

/* ===== Before you buy (inc/product-page/sections.php → aitopup_single_product_buying_notes) ===== */
.aitopup-sp-layout-v1 .aitopup-sp-notes {
  margin: 1rem 0 0;
  padding: 1rem 1.125rem;
  border: 1px solid var(--accent-border);
  border-radius: 1rem;
  background: var(--accent-surface);
}
.aitopup-sp-layout-v1 .aitopup-sp-notes__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg-bright);
}
.aitopup-sp-layout-v1 .aitopup-sp-notes__title .icon { color: var(--accent-link); }
.aitopup-sp-layout-v1 .aitopup-sp-notes__list {
  display: grid;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.aitopup-sp-layout-v1 .aitopup-sp-notes__list li {
  position: relative;
  padding-left: 1.125rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--fg);
}
.aitopup-sp-layout-v1 .aitopup-sp-notes__list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.6em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--accent-link);
}
.aitopup-sp-layout-v1 .aitopup-sp-notes__list strong { color: var(--fg-bright); }
