:root {
  --color-primary: #1e40af;
  --color-primary-dark: #1b3aa0;
  --color-accent: #ff7a00;
  --color-accent-dark: #e96d00;
  --color-success: #16a34a;
  --color-success-dark: #128a3e;
  --color-bg: #f5f7fb;
  --color-card: #ffffff;
  --color-text: #1f2430;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.08);
  --shadow-strong: 0 18px 50px rgba(17, 24, 39, 0.14);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 18px; }

/* ============ TOPBAR ============ */
.topbar {
  background: linear-gradient(90deg, var(--color-primary), #2657d6);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 9px 12px;
  letter-spacing: .2px;
}
.topbar span { opacity: .95; }

/* ============ HEADER ============ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.brand img { width: 34px; height: 34px; }
.brand b { color: var(--color-accent); }
.header-secure { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-muted); font-weight: 600; }
.header-secure svg { width: 16px; height: 16px; }

/* ============ PRODUCT: tarjeta blanca envolvente (igual al preview) ============ */
.product-wrap { padding: 22px 0 8px; }
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 26px;
}
.product-header-mobile {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}
.gallery { position: sticky; top: 84px; }
.gallery-main {
  background: #f3f4f6;
  border-radius: var(--radius-gallery, var(--radius-lg));
  border: none;
  overflow: hidden;
  box-shadow: none;
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  min-height: 400px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.gallery-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.7);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  opacity: 0.4; transition: opacity .2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.gallery-arrow:hover { opacity: 0.85; }
.gallery-arrow.left { left: 10px; }
.gallery-arrow.right { right: 10px; }
.gallery-arrow svg { width: 18px; height: 18px; stroke: #333; stroke-width: 2.5; fill: none; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  border: 1.5px solid var(--color-border);
  overflow: hidden; cursor: pointer;
  background: #fff;
  transition: border-color .2s ease, transform .15s ease;
  flex-shrink: 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { transform: translateY(-2px); }
.thumb.active { border-color: var(--color-primary); }

.product-info { min-width: 0; }
.badge-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.badge {
  font-size: 12px; font-weight: 700;
  padding: 4px 11px; border-radius: var(--radius-badge, 999px);
  background: color-mix(in srgb, var(--color-primary) 9%, transparent);
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.badge.hot { background: #fff1e6; color: var(--color-accent-dark); border-color: #ffe1c7; }
.badge.green { background: #e7f6ec; color: var(--color-success-dark); border-color: #cdebd8; }
.badge-custom { color: #fff !important; border: none !important; }

.product-title { font-size: var(--fs-title, 30px); font-weight: 800; line-height: 1.2; margin-bottom: 4px; }
.product-subtitle { color: var(--color-muted); font-size: 15px; margin-bottom: 6px; }
.product-subtitle:empty { display: none; }
.rating { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; color: var(--color-text); font-size: 14px; }
.rating strong { font-weight: 800; }
.rating-sales { color: var(--color-muted); }
.stars { color: #f59e0b; letter-spacing: 1px; font-size: 16px; }

.price-box { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.price { font-size: var(--fs-price, 38px); font-weight: 800; color: var(--color-accent); line-height: 1; }
.price-old { font-size: 19px; color: #9ca3af; text-decoration: line-through; }
.price-off { background: #e02424; color: #fff; font-weight: 800; font-size: 13px; padding: 4px 11px; border-radius: 999px; }
.price-note { color: #16a34a; font-weight: 600; font-size: 14px; margin-bottom: 18px; }

/* Dynamic Attributes */
.attr-group { margin-bottom: 18px; }
.attr-label { font-weight: 800; font-size: 13px; margin-bottom: 8px; text-transform: uppercase; color: #374151; }
.attr-label span { color: var(--color-muted); font-weight: 500; text-transform: none; }
.attr-options { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.attr-opt {
  border: 1.5px solid #d1d5db;
  border-radius: 9px;
  padding: 7px 13px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #374151;
  transition: all .2s ease;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.attr-opt:hover { border-color: #9ca3af; }
.attr-opt.active { border-color: var(--color-primary); color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
/* Swatch de color: círculo simple sin texto */
.attr-opt.swatch-only {
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  border: 2px solid #d1d5db; box-shadow: inset 0 0 0 2px #fff;
  justify-content: center;
}
.attr-opt.swatch-only.active { border-color: var(--color-primary); box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px color-mix(in srgb, var(--color-primary) 35%, transparent); }
.attr-swatch { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }
.attr-opt.swatch-only .attr-swatch { width: 100%; height: 100%; border: none; }

/* Qty & Bulk */
.qty-section { margin-bottom: 20px; }
.qty-promo { font-size: 13px; color: var(--color-muted); margin-bottom: 10px; line-height: 1.4; }
.bulk-discounts-box {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
  border: 1px dashed var(--color-accent);
  border-radius: 14px;
  padding: 10px 12px;
}
.bulk-tag { font-size: 13px; font-weight: 600; color: var(--color-text); display: flex; justify-content: space-between; align-items: baseline; }
.bulk-tag strong { color: var(--color-accent); font-weight: 800; }

/* ============ MINI CARRITO ACUMULATIVO ============ */
.mini-cart-box {
  background: #fafafa;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 14px 12px;
  margin-top: 12px;
  animation: slideInUp .35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
.mcb-head {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--color-muted);
  margin-bottom: 8px;
}
.mcb-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border);
}
.mcb-line:last-child { border-bottom: none; }
.mcb-item {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}
.mcb-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  box-shadow: inset 0 0 0 2px #fff;
  flex-shrink: 0;
}
.mcb-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mcb-ctrl {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 2px;
  flex-shrink: 0;
}
.mcb-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.mcb-btn:hover { background: #f3f4f6; }
.mcb-qty {
  min-width: 22px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 800;
}
.mcb-lineprice {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--color-text);
  min-width: 54px;
  text-align: right;
  flex-shrink: 0;
}
.mcb-del {
  width: 22px;
  height: 22px;
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.mcb-del:hover { background: #fecaca; }
.mcb-discount {
  background: #fff7ed;
  border: 1px dashed var(--color-accent);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #9a3412;
  margin-top: 10px;
  text-align: center;
}
.mcb-discount strong { color: var(--color-accent-dark); font-weight: 800; }
.mcb-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-muted);
}
.mcb-total strong {
  font-size: 19px;
  font-weight: 900;
  color: var(--color-accent);
}

/* Checkout Redirect */
.checkout-redirect-box {
  display: none;
  background: #fff;
  border: 2px solid var(--color-success);
  border-radius: 16px;
  padding: 16px;
  margin-top: 12px;
  text-align: center;
  animation: slideInUp .4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.checkout-redirect-box p { font-weight: 700; color: var(--color-success); margin-bottom: 10px; }
.btn-cart { background: var(--btn-bg, var(--color-primary)); color: var(--btn-text, #fff); border: none; box-shadow: var(--btn-shadow, none); }
.btn-cart:hover { background: var(--btn-bg-dark, var(--color-primary-dark)); }

/* Urgency Modules — countdown como pill oscuro (igual al preview del admin) */
.urgency-box {
  background: #111827;
  border: none;
  border-radius: 11px;
  padding: 10px 14px;
  margin: 0 0 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: #fff;
}
.ub-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}
.timer {
  display: flex;
  align-items: center;
  gap: 4px;
}
.timer-unit {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 3px;
  background: transparent;
  color: #fff;
  padding: 0;
  border-radius: 0;
  min-width: 0;
}
.timer-unit span {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.timer-unit label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  opacity: .7;
}
.timer-sep {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  opacity: .6;
}

.stock-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 9px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
.sa-icon { font-size: 16px; }
.sa-text { font-size: 13px; font-weight: 700; color: #c2410c; }
.sa-text span { color: #dc2626; font-size: 15px; }

.progress-container {
  margin-bottom: 18px;
}
.progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 5px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #e02424);
  border-radius: 999px;
  transition: width 1s ease-out;
}
.progress-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-muted);
  text-align: right;
}

.recent-purchase {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  transform: translateY(150%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 280px;
  border-left: 4px solid #16a34a;
}
.recent-purchase.show { transform: translateY(0); }
.recent-purchase { border-left: none; border: 1px solid var(--color-border); }
.rp-icon {
  width: 36px;
  height: 36px;
  background: #fef3e2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.rp-content { flex: 1; }
.rp-user { font-size: 13px; font-weight: 700; color: #1a202c; }
.rp-text { font-size: 12px; color: #718096; }

.option-group { margin-bottom: 22px; }
.option-label { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.option-label span { color: var(--color-muted); font-weight: 500; }

.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.qty-row .option-label { font-size: 13px; font-weight: 800; text-transform: uppercase; }
.qty-control { display: flex; align-items: center; border: 1.5px solid #d1d5db; border-radius: 10px; overflow: hidden; }
.qty-control button { width: 38px; height: 40px; border: none; background: #f3f4f6; font-size: 18px; cursor: pointer; color: var(--color-text); font-weight: 700; }
.qty-control button:hover { background: #e5e7eb; }
.qty-control input { width: 44px; height: 40px; text-align: center; border: none; font-size: 15px; font-weight: 700; }

.actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.btn {
  border: none; cursor: pointer;
  font-weight: 800; font-size: 15px;
  border-radius: var(--btn-radius, 50px);
  padding: 15px 22px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  font-family: var(--font);
}
.btn:active { transform: scale(.985); }
.btn-buy {
  background: var(--color-accent); color: #fff;
  box-shadow: var(--btn-shadow, none);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-buy:hover { background: var(--color-accent-dark); }

.btn-block { width: 100%; }

.trust-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.trust-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 4px; text-align: center;
  font-size: 11px; color: var(--color-muted); font-weight: 600; line-height: 1.25;
}
.trust-item .ico { font-size: 20px; line-height: 1; display: block; margin-bottom: 2px; }

/* ============ FEATURES ============ */
.section { padding: 36px 0; }
.section-title { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 26px; }
.features {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 20px 24px;
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 14px;
}
.feature {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 0; background: none; border: none; box-shadow: none;
  text-align: left;
}
.feature .ico {
  font-size: 24px; flex-shrink: 0; width: 36px; text-align: center;
  padding-top: 2px; line-height: 1;
}
.feature-text { flex: 1; }
.feature h4 {
  font-size: 14px; font-weight: 700; margin: 0 0 3px;
  color: var(--color-text);
}
.feature p {
  font-size: 13px; color: var(--color-muted); margin: 0;
  line-height: 1.4;
}

.desc-block { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--color-border); padding: 30px; box-shadow: var(--shadow-soft); }
.desc-block img { border-radius: var(--radius-md); margin: 18px 0; }
.desc-block h3 { font-size: 20px; margin-bottom: 12px; }
.desc-block p, .desc-block li { color: #374151; margin-bottom: 12px; font-size: var(--fs-desc, 15px); }
.desc-block ul { margin: 12px 0 12px 20px; color: #374151; }
.desc-block li { margin-bottom: 6px; }

/* ============ FOOTER ============ */
.site-footer { background: #111827; color: #cbd5e1; padding: 34px 0; margin-top: 40px; font-size: 13.5px; }
.footer-inner { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.footer-pay { display: flex; gap: 10px; align-items: center; opacity: .85; }
.footer-pay span { background: #1f2937; padding: 5px 10px; border-radius: 6px; font-weight: 600; font-size: 12px; }

/* ============ CHECKOUT DRAWER ============ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .5);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 100;
}
.overlay.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; right: 0;
  height: 100%; width: 100%; max-width: 460px;
  background: var(--color-bg);
  z-index: 110;
  transform: translateX(100%);
  transition: transform .38s cubic-bezier(.22,.61,.36,1);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-strong);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  background: #fff;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.drawer-head h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.drawer-close { background: #f3f4f6; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--color-text); line-height: 1; }
.drawer-close:hover { background: #e5e7eb; }

/* Progress steps */
.steps-bar { display: flex; padding: 16px 18px 6px; gap: 6px; background: #fff; flex-shrink: 0; }
.step-dot { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.step-dot .num {
  width: 28px; height: 28px; border-radius: 50%;
  background: #e5e7eb; color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  transition: background .3s ease, color .3s ease;
  z-index: 2;
}
.step-dot .lbl { font-size: 10.5px; color: #9ca3af; font-weight: 600; transition: color .3s ease; }
.step-dot.active .num { background: var(--color-primary); color: #fff; }
.step-dot.done .num { background: var(--color-success); color: #fff; }
.step-dot.active .lbl, .step-dot.done .lbl { color: var(--color-text); }
.step-dot::before {
  content: ''; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px;
  background: #e5e7eb; z-index: 1;
}
.step-dot:first-child::before { display: none; }
.step-dot.done::before, .step-dot.active::before { background: var(--color-success); }

.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }

/* Mini cart summary */
.mini-cart {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 14px; display: flex; gap: 12px; align-items: center; margin-bottom: 18px;
}
.mini-cart img { width: 58px; height: 58px; border-radius: 10px; object-fit: cover; border: 1px solid var(--color-border); }
.mini-cart .mc-info { flex: 1; }
.mini-cart .mc-title { font-weight: 700; font-size: 14px; }
.mini-cart .mc-meta { font-size: 12.5px; color: var(--color-muted); }
.mini-cart .mc-price { font-weight: 800; font-size: 16px; }

/* Steps panels */
.step-panel { display: none; animation: fadeSlide .4s ease both; }
.step-panel.active { display: block; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-head { margin-bottom: 16px; }
.step-head h4 { font-size: 18px; margin-bottom: 4px; }
.step-head p { font-size: 13.5px; color: var(--color-muted); }

.field { margin-bottom: 14px; animation: fadeUp .45s ease both; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px;
  border: 1.8px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 15px; font-family: var(--font);
  background: #fff; color: var(--color-text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,.12);
}
.field textarea { resize: vertical; min-height: 80px; }
.field .hint { font-size: 11.5px; color: var(--color-muted); margin-top: 5px; }
.field.error input, .field.error select { border-color: #dc2626; }
.field .err-msg { color: #dc2626; font-size: 12px; margin-top: 5px; display: none; }
.field.error .err-msg { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.field-stagger { animation-delay: calc(var(--i) * .06s); }

/* Payment-date pills */
.radio-group {
  display: flex; flex-direction: column; gap: 8px; margin-top: 8px;
}
.radio-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); cursor: pointer; background: #fff;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.radio-row:hover { border-color: #c7cdd6; }
.radio-row input[type=radio] {
  display: none;
}
.radio-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #c7cdd6;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s ease, background .2s ease;
}
.radio-dot::after {
  content: ''; width: 0; height: 0; border-radius: 50%;
  background: var(--color-primary);
  transition: width .2s ease, height .2s ease;
}
.radio-row input:checked + .radio-dot {
  border-color: var(--color-primary);
}
.radio-row input:checked + .radio-dot::after {
  width: 11px; height: 11px;
}
.radio-row:has(input:checked) {
  border-color: var(--color-primary);
  background: #f0f4ff;
}
.radio-label {
  font-weight: 700; font-size: 15px; color: var(--color-text);
  line-height: 1;
}

/* Selectable option card (shipping & payment) */
.opt-card {
  border: 2px solid var(--color-border); border-radius: var(--radius-md);
  padding: 16px; margin-bottom: 12px; cursor: pointer; background: #fff;
  display: flex; gap: 14px; position: relative;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.opt-card:hover { border-color: #c7cdd6; }
.opt-card.active { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(30,64,175,.1); }
.opt-card .radio {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #c7cdd6; flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s ease;
}
.opt-card.active .radio { border-color: var(--color-primary); }
.opt-card.active .radio::after { content: ''; width: 11px; height: 11px; border-radius: 50%; background: var(--color-primary); }
.opt-card .oc-body { flex: 1; }
.opt-card .oc-title { font-weight: 700; font-size: 14.5px; margin-bottom: 4px; line-height: 1.35; }
.opt-card .oc-desc { font-size: 12.8px; color: var(--color-muted); line-height: 1.45; }
.opt-card .oc-icon { width: 46px; height: 46px; border-radius: 10px; object-fit: contain; flex-shrink: 0; }
.tag {
  position: absolute; top: -10px; right: 14px;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.tag.free { background: var(--color-success); color: #fff; }
.tag.popular { background: var(--color-accent); color: #fff; }

/* Step footer button */
.step-foot { margin-top: 10px; }
.btn-continue {
  width: 100%; background: var(--color-primary); color: #fff;
  border: none; border-radius: var(--radius-md);
  padding: 16px; font-size: 16px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s ease, transform .12s ease;
  font-family: var(--font);
}
.btn-continue:hover { background: var(--color-primary-dark); }
.btn-continue:active { transform: scale(.99); }
.btn-continue:disabled { opacity: .6; cursor: not-allowed; }
.btn-order { background: var(--color-success); box-shadow: 0 8px 20px rgba(22,163,74,.28); }
.btn-order:hover { background: var(--color-success-dark); }

.btn-back {
  background: none; border: none; color: var(--color-muted);
  font-size: 13.5px; cursor: pointer; padding: 10px; margin-top: 4px;
  width: 100%; font-weight: 600; font-family: var(--font);
}
.btn-back:hover { color: var(--color-text); }

.spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.summary-line { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; }
.summary-line.total { font-weight: 800; font-size: 17px; border-top: 1px solid var(--color-border); margin-top: 6px; padding-top: 12px; }
.summary-cart-line { font-weight: 600; }
.summary-cart-line span:last-child { font-weight: 700; }
.summary-cart-unit { font-size: 12.5px; color: var(--color-muted); border-bottom: 1px dashed var(--color-border); padding-bottom: 8px; margin-bottom: 4px; }
.summary-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; }

/* ============ THANK YOU PAGE ============ */
.ty-wrap { max-width: 720px; margin: 0 auto; padding: 30px 18px 60px; }
.ty-hero {
  background: linear-gradient(135deg, var(--color-success), #0ea05a);
  color: #fff; border-radius: var(--radius-lg); padding: 36px 26px; text-align: center;
  box-shadow: var(--shadow-soft); margin-bottom: 24px;
}
.ty-check {
  width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
  animation: pop .5s cubic-bezier(.18,.89,.32,1.28) both;
}
.ty-check svg { width: 40px; height: 40px; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.ty-hero h1 { font-size: 26px; margin-bottom: 8px; }
.ty-hero p { opacity: .95; font-size: 15px; }
.ty-order-id { display: inline-block; margin-top: 14px; background: rgba(255,255,255,.18); padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; }

.ty-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-soft); }
.ty-card h2 { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.ty-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--color-border); font-size: 14.5px; }
.ty-row:last-child { border-bottom: none; }
.ty-row .k { color: var(--color-muted); }
.ty-row .v { font-weight: 700; text-align: right; }
.ty-row.total .v { color: var(--color-success-dark); font-size: 18px; }

/* Payment instruction templates */
.pay-method {
  border: 2px solid var(--color-border); border-radius: var(--radius-md);
  overflow: hidden; margin-bottom: 18px;
}
.pay-method.highlight { border-color: var(--color-accent); }
.pay-method-head {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: #fafbfc; border-bottom: 1px solid var(--color-border);
}
.pay-method-head img { width: 54px; height: 40px; object-fit: cover; border-radius: 8px; }
.pay-method-head .pm-t { font-weight: 800; font-size: 16px; }
.pay-method-head .pm-s { font-size: 12.5px; color: var(--color-muted); }
.pay-method-body { padding: 18px; }
.pay-data {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--color-bg); border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm); padding: 13px 15px; margin-bottom: 10px;
}
.pay-data .pd-label { font-size: 12px; color: var(--color-muted); font-weight: 600; }
.pay-data .pd-value { font-size: 17px; font-weight: 800; letter-spacing: .5px; font-family: 'Courier New', monospace; }
.copy-btn {
  background: var(--color-primary); color: #fff; border: none;
  padding: 8px 13px; border-radius: 8px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
  transition: background .2s ease;
}
.copy-btn:hover { background: var(--color-primary-dark); }
.copy-btn.copied { background: var(--color-success); }
.pay-amount {
  text-align: center; background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--radius-sm);
  padding: 14px; margin-top: 6px;
}
.pay-amount .pa-label { font-size: 12.5px; color: var(--color-accent-dark); font-weight: 600; }
.pay-amount .pa-value { font-size: 26px; font-weight: 800; color: var(--color-accent-dark); }
.pay-steps { margin: 14px 0 4px; padding-left: 20px; font-size: 13.5px; color: #374151; }
.pay-steps li { margin-bottom: 7px; }

.ty-help { text-align: center; color: var(--color-muted); font-size: 13.5px; margin-top: 10px; }
.ty-help a { color: var(--color-primary); font-weight: 700; }

.alert {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13.5px; margin-bottom: 18px;
  display: flex; gap: 10px; align-items: flex-start;
}
.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

/* Toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #111827; color: #fff; padding: 13px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600; z-index: 200; opacity: 0; visibility: hidden;
  transition: opacity .25s ease, transform .25s ease; box-shadow: var(--shadow-strong);
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 880px) {
  .product { display: flex; flex-direction: column; gap: 20px; padding: 20px; }
  .product-header-mobile { order: 1; }
  .gallery { order: 2; position: static; }
  .product-info { order: 3; }
  /* .features: ya es flex column, sin cambios */
  .product-title { font-size: calc(var(--fs-title, 30px) * 0.84); }
  .price { font-size: calc(var(--fs-price, 38px) * 0.86); }
}
/* (merged into single 520px block below) */

/* ============ MOBILE FIX (description & footer overflow) ============ */
html, body { overflow-x: hidden; width: 100%; }
.topbar { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.site-header { overflow: hidden; }
.header-inner { overflow: hidden; }
main.container { overflow-x: hidden; }
.gallery-thumbs { overflow-x: auto; flex-wrap: nowrap; }
.desc-block { overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; overflow: hidden; }
.desc-block img { max-width: 100%; height: auto; }
.section { overflow: hidden; }
.site-footer { overflow: hidden; }
.footer-pay { flex-wrap: wrap; justify-content: center; }

@media (max-width: 520px) {
  .container { padding: 0 14px; overflow-x: hidden; }
  .topbar { font-size: 11.5px; padding: 8px 10px; }
  .brand { font-size: 16px; gap: 7px; }
  .brand img { width: 28px; height: 28px; }
  .header-inner { height: 54px; padding: 0 12px; }
  .product-wrap { padding: 14px 0 6px; }
  .product { gap: 14px; padding: 16px; }
  .gallery-thumbs { gap: 7px; }
  .thumb { width: 52px; height: 52px; }
  .product-title { font-size: calc(var(--fs-title, 30px) * 0.74); }
  .price { font-size: calc(var(--fs-price, 38px) * 0.8); }
  .gallery-main { aspect-ratio: 1/1; min-height: 260px; }
  .desc-block { padding: 18px; }
  .desc-block h3 { font-size: 17px; }
  .desc-block p, .desc-block li { font-size: calc(var(--fs-desc, 15px) * 0.93); }
  .section-title { font-size: 20px; }
  .site-footer { padding: 24px 0; }
  .footer-inner { padding: 0 14px; }
  .footer-pay span { font-size: 11px; padding: 4px 8px; }
  .price-box { flex-wrap: wrap; gap: 8px; }
  .attr-options { flex-wrap: wrap; }
  .qty-section { overflow: hidden; }
  .actions { overflow: hidden; }
  .trust-row { display: flex; flex-direction: row; gap: 6px; }
  /* .features: ya es flex column, sin cambios */
  .drawer { max-width: 100%; }
  .header-secure span { display: none; }
  .recent-purchase { left: 10px; right: 10px; max-width: none; bottom: 10px; }
}
