/*
 * REDISEÑO — PDP, drawer del carrito y footer compacto · Reina Margarita
 * ─────────────────────────────────────────────────────────────
 * Se carga desde layouts/layout.tpl DESPUÉS de los overrides inline para ganar en cascada.
 * Solo presentación: el markup conserva los ganchos nativos (store.js.tpl + componentes).
 *
 * Paleta (base BLANCA, bandas puntuales de color):
 *   rosa #F5E3EC · celeste #E4F3F5 · ciruela #753C59 · petróleo #2B6C75
 * Contrastes WCAG: blanco/ciruela 8.25 · petróleo/blanco 5.99 · ciruela/rosa 6.71 ·
 * petróleo/celeste 5.26 · #6B5A63/blanco 6.43.
 * Los !important solo donde capas existentes ya usan !important (precio, CTA, footer).
 */

:root {
  --rm-rosa: #f5e3ec;
  --rm-rosa-2: #fbf1f5;
  --rm-celeste: #e4f3f5;
  --rm-crema: #f5f3e4;
  --rm-ciruela: #753c59;
  --rm-ciruela-dark: #5e2f47;
  --rm-petroleo: #2b6c75;
  --rm-ink: #2a1c24;
  --rm-muted: #6b5a63;
  --rm-line: #ece4e8;
  --rm-line-strong: #d9ccd3;
  --rm-radius: 14px;
  --rm-ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  /* Alto aproximado del header fijo: la galería sticky de desktop queda debajo */
  --rm-sticky-top: 140px;
}

/* ═════════════════════════════════════════════════════════════
   BASE PDP
   ═════════════════════════════════════════════════════════════ */
body.template-product { background: #fff; }
.rm-pdp { color: var(--rm-ink); }
.rm-pdp .rm-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.rm-pdp .rm-ico { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }
/* Íconos de trazo (fill="none" en el SVG): no rellenar */
.rm-pdp svg.rm-ico[fill="none"] { fill: none; }
.rm-pdp button { font: inherit; }
.rm-pdp :focus-visible,
.rm-modal :focus-visible,
.rm-sticky-buy :focus-visible {
  outline: 2px solid var(--rm-petroleo);
  outline-offset: 2px;
}
html.rm-scroll-lock { overflow: hidden; }

/* Layout: contenedor de 1120px (como Somos Nala) */
.rm-pdp .rm-pdp-top,
.rm-pdp .rm-section-inner { max-width: 1120px; }
.rm-pdp-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding-top: 12px;
  padding-bottom: 8px;
}
@media (min-width: 768px) {
  .rm-pdp-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    padding-top: 28px;
    padding-bottom: 56px;
    align-items: start;
  }
}
@media (min-width: 1024px) {
  .rm-pdp-top { grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 44px; }
  .rm-buy { max-width: 560px; }
}
@media (min-width: 1024px) and (min-height: 820px) {
  .rm-pdp-media { position: sticky; top: var(--rm-sticky-top); }
}
.rm-pdp-media,
.rm-pdp-info { min-width: 0; padding: 0; }

/* ═════════════════════════════════════════════════════════════
   GALERÍA — Swiper/Fancybox nativos, marco cuadrado + miniaturas debajo
   ═════════════════════════════════════════════════════════════ */
.rm-gallery { position: relative; min-width: 0; }
.rm-gallery-main {
  position: relative;
  border: 1px solid var(--rm-line);
  border-radius: var(--rm-radius);
  background: #fff;
  overflow: hidden;
}
.rm-gallery .rm-gallery-swiper { width: 100%; overflow: hidden; visibility: visible !important; }
.rm-gallery .rm-gallery-slide { width: 100%; }
/* El link nativo trae padding-bottom inline con la proporción de la foto: se fija en 1:1 */
.rm-gallery .rm-gallery-link {
  position: relative;
  display: block;
  height: 0;
  padding-bottom: 100% !important;
  cursor: zoom-in;
}
.rm-gallery .rm-gallery-img {
  position: absolute;
  inset: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none !important;
  object-fit: contain; /* imagen completa, sin recortes */
  transform: none;
  user-select: none;
  transition: transform 0.5s var(--rm-ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .rm-gallery .rm-gallery-link:hover .rm-gallery-img { transform: scale(1.02); }
}
.rm-gallery .product-video-container,
.rm-gallery .js-product-video-slide { aspect-ratio: 1 / 1; height: auto; }

.rm-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  padding: 0;
  border: 1px solid var(--rm-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--rm-ink);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s var(--rm-ease-out);
}
.rm-gallery-nav .icon-inline { width: 14px; height: 14px; fill: currentColor; }
.rm-gallery-prev { left: 12px; transform: translateX(-6px); }
.rm-gallery-next { right: 12px; transform: translateX(6px); }
.rm-gallery-main:hover .rm-gallery-nav,
.rm-gallery-nav:focus-visible { opacity: 1; transform: none; }
.rm-gallery-nav.swiper-button-disabled { opacity: 0 !important; pointer-events: none; }
.rm-gallery-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(42, 28, 36, 0.6);
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* Miniaturas (Swiper nativo .js-swiper-product-thumbs, dirección horizontal) */
.rm-gallery .rm-gallery-thumbs { position: relative; width: auto; margin-top: 12px; min-width: 0; }
.rm-gallery .rm-gallery-thumbs-swiper { height: auto !important; overflow: hidden; padding: 3px 0; }
.rm-gallery .rm-gallery-thumbs-swiper .swiper-slide { width: auto !important; height: auto !important; margin-right: 10px; overflow: visible; }
.rm-gallery .product-thumb {
  position: relative;
  display: block;
  width: 64px !important;
  height: 64px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 2px solid var(--rm-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s ease, transform 0.2s var(--rm-ease-out);
}
.rm-gallery .product-thumb img {
  position: absolute;
  inset: 0;
  left: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transform: none;
}
.rm-gallery .product-thumb.selected { border-color: var(--rm-ciruela); }
@media (hover: hover) and (pointer: fine) {
  .rm-gallery .product-thumb:hover { transform: translateY(-2px); border-color: var(--rm-line-strong); }
  .rm-gallery .product-thumb.selected:hover { border-color: var(--rm-ciruela); }
}
.rm-gallery .rm-thumbs-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rm-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rm-ink);
  box-shadow: 0 4px 12px rgba(42, 28, 36, 0.12);
  transform: translateY(-50%);
  cursor: pointer;
  line-height: 1;
}
.rm-gallery .rm-thumbs-arrow .icon-inline { width: 12px; height: 12px; fill: currentColor; }
.rm-gallery .rm-thumbs-prev { left: -8px; }
.rm-gallery .rm-thumbs-next { right: -8px; }
.rm-gallery .rm-thumbs-arrow.swiper-button-disabled { opacity: 0; pointer-events: none; }
/* Flechas de miniaturas solo con mouse (en touch se arrastra) */
@media (hover: hover) and (pointer: fine) {
  .rm-gallery .rm-thumbs-arrow { display: inline-flex; }
}

@media (max-width: 767px) {
  .rm-pdp .rm-pdp-top { padding-left: 0; padding-right: 0; }
  .rm-pdp-media { padding: 0 16px; }
}
@media (min-width: 768px) {
  .rm-gallery-main { border-radius: 18px; }
  .rm-gallery .product-thumb { width: 80px !important; height: 80px !important; }
  .rm-gallery-nav { display: inline-flex; }
  .rm-gallery-counter { display: none; }
}

/* ═════════════════════════════════════════════════════════════
   BLOQUE DE COMPRA
   ═════════════════════════════════════════════════════════════ */
.rm-buy { padding: 20px 16px 0; }
@media (min-width: 768px) { .rm-buy { padding: 0; } }

/* Rating (product-rating-stars.tpl con rs_size 'proof') */
.rm-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; line-height: 1.2; }
.rm-proof-stars { color: var(--rm-ciruela); font-size: 16px; letter-spacing: 1px; }
.rm-proof-text { color: var(--rm-muted); font-size: 13px; font-weight: 500; }
.rm-proof-text b { color: var(--rm-ink); font-weight: 800; }

/* Título */
html body .rm-pdp .rm-title {
  margin: 0 0 16px;
  color: var(--rm-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-transform: none;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
@media (min-width: 768px) { html body .rm-pdp .rm-title { font-size: 27px; } }
@media (min-width: 992px) { html body .rm-pdp .rm-title { font-size: 32px; } }
.rm-sku { margin: -8px 0 12px; color: var(--rm-muted); font-size: 12.5px; }

/* Precio: cuotas → precio grande (+ tachado y %) → transferencia */
.rm-price-block { margin-bottom: 14px; }
.rm-installments { margin: 0 0 6px; color: var(--rm-ink); font-size: 15.5px; line-height: 1.35; cursor: pointer; }
.rm-installments * { font-size: inherit; }
.rm-payments-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--rm-petroleo); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rm-payments-link .icon-inline { width: 15px; height: 15px; fill: currentColor; }
.rm-payments-link:hover { color: var(--rm-ciruela); }
.rm-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 10px; }
/* product-rating-stars.tpl fija `.js-price-container .js-price-display` con !important: se neutraliza solo en la PDP */
html body #single-product.rm-pdp .js-price-container .rm-price {
  display: inline-block;
  margin: 0;
  color: var(--rm-ink) !important;
  font-size: 34px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { html body #single-product.rm-pdp .js-price-container .rm-price { font-size: 38px !important; } }
html body #single-product.rm-pdp .js-price-container .rm-compare {
  margin: 0;
  color: var(--rm-muted) !important;
  font-size: 15px !important;
  opacity: 1 !important;
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.rm-off-label .label {
  margin: 0;
  padding: 5px 11px;
  border: 0;
  border-radius: 999px;
  background: var(--rm-rosa);
  color: var(--rm-ciruela);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
}
.rm-price-note { margin: 4px 0 0; color: var(--rm-muted); font-size: 12.5px; }

.rm-transfer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; line-height: 1.15; }
.rm-transfer:empty { display: none; }
.rm-transfer-component { margin: 0 !important; color: var(--rm-muted); font-size: 13.5px; font-weight: 600; }
/* Hay reglas inline del theme sobre .js-price-container .js-payment-discount-* (color acento, 20/26px !important)
   que se cargan después de este archivo: se pisan con más especificidad, solo en la PDP. */
html body #single-product.rm-pdp .js-price-container .rm-transfer-component,
html body #single-product.rm-pdp .js-price-container .rm-transfer-component .js-payment-discount-name-product {
  color: var(--rm-muted) !important;
  font-size: 13.5px !important;
  font-weight: 600;
}
html body #single-product.rm-pdp .js-price-container .rm-transfer-amount { color: var(--rm-petroleo) !important; font-size: 22px !important; }
@media (max-width: 767px) {
  html body #single-product.rm-pdp .js-price-container .rm-transfer-amount { font-size: 20px !important; }
  html body #single-product.rm-pdp .js-price-container .rm-transfer-component,
  html body #single-product.rm-pdp .js-price-container .rm-transfer-component .js-payment-discount-name-product { font-size: 12.5px !important; }
}
html body #single-product.rm-pdp .rm-installments-line,
html body #single-product.rm-pdp .rm-installments-line * { color: var(--rm-ink) !important; font-size: 15.5px !important; }
html body #single-product.rm-pdp .rm-installments-line .product-installment-amount,
html body #single-product.rm-pdp .rm-installments-line .product-installment-value { font-weight: 700; }
.rm-pdp .rm-transfer-amount {
  display: inline-block;
  color: var(--rm-petroleo) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  transform-origin: left center;
}
.rm-transfer-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--rm-celeste);
  color: var(--rm-petroleo);
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 0 0 0 rgba(43, 108, 117, 0);
}
@media (max-width: 767px) {
  .rm-pdp .rm-transfer-amount { font-size: 20px !important; }
  .rm-transfer-component { font-size: 12.5px; }
}

/* Regalo / contador (product-countdown.tpl) */
.rm-gift {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--rm-rosa);
  overflow: hidden;
  isolation: isolate;
}
.rm-gift-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--rm-ciruela);
  color: #fff;
}
.rm-gift-icon svg { width: 20px; height: 20px; }
.rm-gift-text { display: flex; flex: 1 1 160px; flex-direction: column; gap: 2px; min-width: 0; }
.rm-gift-title { color: var(--rm-ciruela); font-size: 15.5px; font-weight: 800; letter-spacing: 0.01em; line-height: 1.2; }
.rm-gift-sub { color: var(--rm-ink); font-size: 13px; font-weight: 500; }
.rm-gift-timer {
  display: inline-flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 6px 12px;
  border-radius: 10px;
  background: #fff;
  line-height: 1.1;
}
.rm-gift-timer-label { color: var(--rm-muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.rm-gift-timer-clock { color: var(--rm-ciruela); font-size: 17px; font-weight: 800; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.rm-gift-shimmer {
  position: absolute;
  inset: 0 auto 0 -50%;
  z-index: -1;
  width: 40%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  pointer-events: none;
}
@media (max-width: 400px) {
  .rm-gift-timer { flex-direction: row; align-items: baseline; gap: 8px; margin-left: 52px; padding: 5px 10px; }
}

/* Promociones nativas */
.rm-promos { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--rm-rosa-2); color: var(--rm-ink); font-size: 13.5px; }
.rm-promos:empty { display: none; }
.rm-promos .rm-promos-title { margin: 0 0 4px; color: var(--rm-ciruela); font-size: 14px; font-weight: 800; }
.rm-promos .rm-promos-text { margin: 0; font-size: 13px; }
.rm-promos .rm-promos-muted { color: var(--rm-muted); }

/* Envío gratis: card blanca de borde fino (cart.free_shipping) */
.rm-ship-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 11px 14px;
  border: 1px solid var(--rm-line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--rm-ink);
  font-size: 14px;
  line-height: 1.35;
}
.rm-ship-card .rm-ico { width: 20px; height: 20px; color: var(--rm-petroleo); fill: var(--rm-petroleo); }
.rm-ship-text { display: flex; flex-direction: column; min-width: 0; }
.rm-ship-text strong { font-weight: 800; white-space: nowrap; }
.rm-ship-note { color: var(--rm-muted); font-size: 12px; }

/* Actualización de precios al cambiar de variante */
.rm-pdp .is-updated { animation: rm-settle 0.36s var(--rm-ease-out); }
@keyframes rm-settle { from { opacity: 0.35; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ═════════════════════════════════════════════════════════════
   VARIANTES · TABLA DE TALLES
   ═════════════════════════════════════════════════════════════ */
.rm-form { margin: 0; padding-top: 18px; border-top: 1px solid var(--rm-line); }
.rm-variants { display: grid; gap: 18px; padding-bottom: 4px; }
.rm-var-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rm-pdp .rm-var-label { margin: 0; color: var(--rm-muted); font-size: 14.5px; font-weight: 400; }
.rm-var-label strong { color: var(--rm-ink); font-weight: 700; }
.rm-select { width: 100%; height: 48px; padding: 0 12px; border: 1.5px solid var(--rm-line-strong); border-radius: 12px; background: #fff; color: var(--rm-ink); font-size: 15px; }

.rm-size-card { margin: 0 0 16px; border: 1px solid #dedede; border-radius: 12px; background: #fff; overflow: hidden; }
.rm-size-card-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: 52px;
  padding: 8px 16px;
  color: var(--rm-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  list-style: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.rm-size-card-summary::-webkit-details-marker { display: none; }
.rm-size-card-summary:hover { background: #fcfafb; }
.rm-size-card-icon { display: inline-flex; flex: none; width: 18px; height: 18px; color: var(--rm-ciruela); }
.rm-size-card-icon svg { width: 100%; height: 100%; }
.rm-size-card-title { flex: 1 1 auto; }
.rm-size-card-chevron { flex: none; width: 20px; height: 20px; color: #666; transition: transform 0.25s ease; }
.rm-size-card[open]:not(.is-closing) .rm-size-card-chevron { transform: rotate(180deg); }
.rm-size-card-panel { overflow: hidden; padding: 2px 16px 16px; }
.rm-size-card-note { margin: 0 0 10px; color: var(--rm-muted); font-size: 13px; line-height: 1.45; }
.rm-size-card-note-end { margin: 10px 0 0; font-size: 12px; }
.rm-size-card-zoom { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; background: #faf8f9; overflow: hidden; cursor: zoom-in; }
.rm-size-card-zoom img { display: block; width: 100%; height: auto; }
.rm-size-card-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--rm-ink);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 4px 12px -6px rgba(42, 28, 36, 0.35);
}
.rm-size-card-zoom-hint .rm-ico { width: 14px; height: 14px; }
.rm-size-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rm-size-table th, .rm-size-table td { padding: 9px 12px; border-bottom: 1px solid var(--rm-line); text-align: center; }
.rm-size-table thead th { background: var(--rm-rosa); color: var(--rm-ink); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.rm-size-table tbody th { color: var(--rm-ciruela); font-weight: 700; }
.rm-size-table tbody tr:last-child th, .rm-size-table tbody tr:last-child td { border-bottom: 0; }

.rm-var-options { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-pdp .rm-opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  min-width: 60px;
  margin: 0;
  padding: 0 18px;
  border: 1.5px solid var(--rm-line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--rm-ink);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s var(--rm-ease-out), box-shadow 0.18s ease;
}
@media (hover: hover) and (pointer: fine) {
  .rm-pdp .rm-opt:hover { border-color: var(--rm-ciruela); transform: translateY(-1px); box-shadow: 0 6px 14px -10px rgba(117, 60, 89, 0.55); }
}
.rm-pdp .rm-opt:active { transform: scale(0.96); }
.rm-pdp .rm-opt.selected { border-color: var(--rm-ciruela); background: var(--rm-ciruela); color: #fff; animation: rm-pop 0.28s var(--rm-ease-out); }
@keyframes rm-pop { 0% { transform: scale(0.94); } 100% { transform: none; } }
/* Sin stock (clase nativa btn-variant-no-stock): sigue elegible, pero se lee como no disponible */
.rm-pdp .rm-opt.btn-variant-no-stock { color: var(--rm-muted); background: #faf8f9; border-style: dashed; }
.rm-pdp .rm-opt.btn-variant-no-stock .rm-opt-text { text-decoration: line-through; text-decoration-thickness: 1px; }
.rm-pdp .rm-opt.btn-variant-no-stock.selected { background: #8f7a85; border-color: #8f7a85; color: #fff; border-style: solid; }
.rm-pdp .rm-opt-media.rm-opt { min-width: 0; width: 50px; height: 50px; padding: 3px; border-radius: 999px; }
.rm-opt-swatch { display: block; width: 40px; height: 40px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.rm-pdp .rm-opt-media.rm-opt.selected { background: #fff; box-shadow: 0 0 0 2px var(--rm-ciruela); }

.rm-last-product { margin: 12px 0 0; color: var(--rm-ciruela); font-size: 14px; font-weight: 700; }

/* ═════════════════════════════════════════════════════════════
   STOCK · CANTIDAD · CTA
   ═════════════════════════════════════════════════════════════ */
/* Stock nativo (solo si el admin tiene activado "mostrar stock") */
.rm-stock { margin: 16px 0 0; color: var(--rm-muted); font-size: 14px; }
.rm-buy-row { margin-top: 16px; }

.rm-buy-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.rm-qty {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 56px;
  padding: 0 5px;
  border: 1.5px solid var(--rm-line-strong);
  border-radius: 999px;
  background: #fff;
  transition: border-color 0.2s ease;
}
.rm-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--rm-ciruela);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s ease;
}
.rm-qty-btn .icon-inline { width: 14px; height: 14px; fill: currentColor; }
.rm-qty-btn:hover:not(:disabled) { background: var(--rm-rosa); }
.rm-qty-btn:active:not(:disabled) { transform: scale(0.9); }
.rm-qty-btn:disabled { color: #b9aab2; background: none !important; cursor: not-allowed; }
.rm-pdp .rm-qty-input {
  width: 36px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rm-ink);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.rm-qty-input::-webkit-outer-spin-button, .rm-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rm-qty-input:focus { outline: none; }
.rm-qty:focus-within { border-color: var(--rm-petroleo); }

/* CTA: input submit nativo .js-addtocart (pisa reglas existentes con !important) */
.rm-cta-wrap { position: relative; flex: 1 1 190px; min-width: 0; border-radius: 999px; overflow: hidden; }
html body #single-product.rm-pdp input.rm-cta,
html body #single-product.rm-pdp .js-addtocart-placeholder.rm-cta,
html body .rm-sticky-buy .rm-cta {
  position: relative;
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 0 24px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--rm-ciruela) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  line-height: 56px !important;
  text-transform: none !important;
  white-space: nowrap;
  box-shadow: 0 10px 22px -14px rgba(117, 60, 89, 0.9) !important;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.18s var(--rm-ease-out), box-shadow 0.2s ease !important;
}
html body #single-product.rm-pdp input.rm-cta:hover:not(:disabled),
html body .rm-sticky-buy .rm-cta:hover:not(:disabled) { background: var(--rm-ciruela-dark) !important; box-shadow: 0 14px 26px -14px rgba(117, 60, 89, 0.95) !important; }
html body #single-product.rm-pdp input.rm-cta:active:not(:disabled) { transform: scale(0.98) !important; }
html body #single-product.rm-pdp input.rm-cta:disabled,
html body #single-product.rm-pdp input.rm-cta.nostock,
html body .rm-sticky-buy .rm-cta:disabled { background: #c9bcc3 !important; color: #fff !important; box-shadow: none !important; cursor: not-allowed; }
html body #single-product.rm-pdp .js-addtocart-placeholder.rm-cta { opacity: 0.9; cursor: default; }
/* Brillo: una pasada al entrar el mouse y una única pasada tras la carga (ver MOTION) */
.rm-cta-shine {
  position: absolute;
  inset: 0 auto 0 -60%;
  z-index: 2;
  width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  pointer-events: none;
}
.rm-cta-wrap:hover .rm-cta-shine { left: 130%; transition: left 0.7s ease; }

.rm-added-message { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 13.5px; }
.rm-added-message .icon-inline { fill: var(--rm-petroleo); }
.rm-free-shipping-done { margin: 10px 0 0; color: var(--rm-petroleo); font-size: 14px; font-weight: 700; }

/* Confianza */
.rm-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 20px 0 0;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid var(--rm-line);
}
.rm-trust li { display: inline-flex; align-items: center; gap: 8px; color: var(--rm-ink); font-size: 13.5px; font-weight: 500; }
.rm-trust .rm-ico { width: 18px; height: 18px; color: var(--rm-ciruela); }
.rm-trust .icon-inline.rm-ico { fill: var(--rm-ciruela); }

/* ═════════════════════════════════════════════════════════════
   SECCIONES — blanco dominante, bandas puntuales de color
   ═════════════════════════════════════════════════════════════ */
.rm-section { padding: 44px 0; }
@media (min-width: 768px) { .rm-section { padding: 64px 0; } }
.rm-band-rosa { background: var(--rm-rosa); }
html body .rm-pdp .rm-section-title,
html body .rm-related .h3 {
  margin: 0 0 20px;
  color: var(--rm-ink);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-transform: none;
  text-align: left;
}
@media (min-width: 1024px) {
  html body .rm-pdp .rm-section-title,
  html body .rm-related .h3 { font-size: 28px; }
}

/* Descripción (product.description): encabezado editorial + imagen centrada */
.rm-description { border-top: 1px solid var(--rm-line); text-align: center; }
.rm-eyebrow,
.rm-description-body { max-width: 760px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.rm-pdp .rm-eyebrow { margin-bottom: 14px; color: var(--rm-petroleo); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.rm-description-body { color: var(--rm-ink); font-size: 15.5px; line-height: 1.65; }
.rm-description-body > :first-child { margin-top: 0; }
html body .rm-pdp .rm-description-body h2 {
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--rm-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
  text-transform: none;
  text-wrap: balance;
}
@media (min-width: 768px) { html body .rm-pdp .rm-description-body h2 { font-size: 34px; margin-bottom: 36px; } }
.rm-description-body h2 mark {
  margin: 0 -0.03em;
  padding: 0 0.08em;
  border-radius: 0.22em;
  background-color: transparent;
  background-image: linear-gradient(var(--rm-rosa), var(--rm-rosa));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 100%;
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.rm-description-body h3 { margin: 1.6em 0 0.5em; font-size: 18px; font-weight: 700; }
.rm-description-body p { margin: 0 0 1em; }
.rm-description-body ul, .rm-description-body ol { display: inline-block; margin: 0 0 1em; text-align: left; }
.rm-description-body img {
  display: block;
  width: 100%;
  max-width: 560px !important;
  height: auto !important;
  margin: 0 auto !important;
  border-radius: 18px !important;
}
.rm-description-body div:empty { display: none; }
.rm-share { padding-bottom: 8px; text-align: center; }

/* FAQ */
.rm-faq { padding-bottom: 72px; }
@media (min-width: 768px) { .rm-faq { padding-bottom: 88px; } }
.rm-faq-list { border-top: 1px solid var(--rm-line); }
.rm-acc { border-bottom: 1px solid var(--rm-line); }
.rm-acc-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 16px 4px;
  color: var(--rm-ink);
  font-size: 17px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
.rm-acc-summary::-webkit-details-marker { display: none; }
.rm-acc-summary > span:first-child { flex: 1 1 auto; }
.rm-acc-count { padding: 2px 9px; border-radius: 999px; background: var(--rm-celeste); color: var(--rm-petroleo); font-size: 12px; font-weight: 800; }
.rm-acc-chevron { flex: none; width: 20px; height: 20px; color: var(--rm-ciruela); transition: transform 0.3s var(--rm-ease-out); }
.rm-acc[open]:not(.is-closing) .rm-acc-chevron { transform: rotate(180deg); }
.rm-acc-summary:hover { color: var(--rm-ciruela); }
.rm-acc-body { overflow: hidden; padding: 0 4px 22px; }
.rm-qa { max-width: 820px; }
.rm-qa + .rm-qa { margin-top: 16px; }
html body .rm-pdp .rm-qa-q { margin: 0 0 4px; color: var(--rm-ciruela); font-size: 15px; font-weight: 700; line-height: 1.35; text-transform: none; }
.rm-qa-a { margin: 0; color: var(--rm-muted); font-size: 15px; line-height: 1.6; }

/* Reseñas: carrusel vertical continuo sobre banda rosa */
.rm-reviews-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 4px; }
.rm-reviews-head .rm-proof { margin: 0 0 20px; }
.rm-reviews-viewport {
  position: relative;
  height: 460px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
}
.rm-reviews-cols { display: none; }
.rm-reviews-single { display: block; }
@media (min-width: 768px) {
  .rm-reviews-viewport { height: 480px; }
  .rm-reviews-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .rm-reviews-single { display: none; }
}
.rm-reviews-track {
  margin: 0;
  padding: 0;
  list-style: none;
  animation: rm-reviews-up var(--rm-reviews-duration, 40s) linear infinite;
  animation-play-state: paused;
  will-change: transform;
}
.rm-reviews-viewport.is-running .rm-reviews-track { animation-play-state: running; }
.rm-reviews-viewport:hover .rm-reviews-track,
.rm-reviews-viewport:focus-within .rm-reviews-track { animation-play-state: paused; }
@keyframes rm-reviews-up { from { transform: translateY(0); } to { transform: translateY(var(--rm-reviews-distance, -50%)); } }
.rm-review { padding-bottom: 16px; }
.rm-review-card { padding: 18px 20px; border-radius: 16px; background: #fff; box-shadow: 0 10px 24px -22px rgba(117, 60, 89, 0.55); }
.rm-review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rm-review-avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; background: var(--rm-rosa); color: var(--rm-ciruela); font-size: 13.5px; font-weight: 800; }
.rm-review-name { flex: 1 1 auto; min-width: 0; font-size: 14.5px; font-weight: 700; }
.rm-review-stars { color: var(--rm-ciruela); font-size: 13px; letter-spacing: 1px; }
.rm-review-text { margin: 0; color: var(--rm-ink); font-size: 14.5px; line-height: 1.6; }
.rm-reviews-note { margin: 18px 0 0; color: var(--rm-muted); font-size: 13.5px; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .rm-reviews-track { animation: none; }
  .rm-reviews-viewport { overflow-y: auto; -webkit-mask-image: none; mask-image: none; }
  .rm-reviews-track .rm-review[aria-hidden='true'] { display: none; }
}

/* Relacionados (component('products-section') nativo con las cards del grid) */
.template-product .rm-related { padding: 44px 0 56px; background: #fff; }
@media (min-width: 768px) { .template-product .rm-related { padding: 64px 0 72px; } }
.template-product .rm-related .container { max-width: 1120px; }

/* ═════════════════════════════════════════════════════════════
   VISOR DE LA TABLA DE TALLES (se mueve al <body> por JS)
   ═════════════════════════════════════════════════════════════ */
.rm-modal { position: fixed; inset: 0; z-index: 30000; display: flex; align-items: flex-end; justify-content: center; }
.rm-modal[hidden] { display: none; }
.rm-modal-backdrop { position: absolute; inset: 0; background: rgba(42, 28, 36, 0.55); opacity: 0; transition: opacity 0.22s ease; }
.rm-modal-panel {
  position: relative;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: #fff;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.28s var(--rm-ease-out), opacity 0.22s ease;
}
.rm-modal.is-open .rm-modal-backdrop { opacity: 1; }
.rm-modal.is-open .rm-modal-panel { transform: none; opacity: 1; }
@media (min-width: 768px) {
  .rm-modal { align-items: center; padding: 24px; }
  .rm-modal-panel { max-width: 560px; border-radius: 18px; padding: 22px 24px 24px; }
}
.rm-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
html body .rm-modal .rm-modal-title { margin: 0; color: var(--rm-ink); font-size: 20px; font-weight: 800; text-transform: none; }
.rm-icon-only { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--rm-ink); cursor: pointer; }
.rm-icon-only .rm-ico { width: 18px; height: 18px; fill: currentColor; }
.rm-icon-only:hover { background: var(--rm-rosa); }
.rm-size-figure { overflow: auto; border-radius: 12px; background: #faf8f9; }
.rm-size-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.rm-size-zoom img { display: block; width: 100%; height: auto; }
.rm-size-figure.is-zoomed .rm-size-zoom { width: 180%; cursor: zoom-out; }
.rm-modal-hint { margin: 8px 0 0; color: var(--rm-muted); font-size: 12.5px; text-align: center; }

/* ═════════════════════════════════════════════════════════════
   BARRA DE COMPRA FIJA (solo mobile)
   ═════════════════════════════════════════════════════════════ */
.rm-sticky-buy { display: none; }
@media (max-width: 767px) {
  .rm-sticky-buy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--rm-line);
    box-shadow: 0 -8px 24px -18px rgba(42, 28, 36, 0.45);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.3s var(--rm-ease-out), visibility 0s linear 0.3s;
  }
  .rm-sticky-buy.is-visible { transform: none; visibility: visible; transition: transform 0.3s var(--rm-ease-out), visibility 0s; }
  .rm-sticky-info { display: flex; flex-direction: column; min-width: 0; }
  .rm-sticky-price { color: var(--rm-ink); font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
  .rm-sticky-variant { color: var(--rm-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body .rm-sticky-buy .rm-sticky-cta { flex: 1 1 auto; width: auto !important; height: 48px !important; min-height: 48px !important; line-height: 48px !important; font-size: 14.5px !important; }
  body.rm-sticky-on .btn-whatsapp { bottom: calc(84px + env(safe-area-inset-bottom)) !important; transition: bottom 0.3s ease; }
  body.rm-sticky-on .rm-foot .footer-legal { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .rm-trust { gap: 8px 16px; }
}

/* ═════════════════════════════════════════════════════════════
   MOTION (todo dentro de prefers-reduced-motion: no-preference)
   ═════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: no-preference) {
  .rm-gallery-main { animation: rm-settle-in 0.6s var(--rm-ease-out) backwards; }
  @keyframes rm-settle-in { from { transform: scale(0.985); } to { transform: none; } }

  /* Entrada escalonada del bloque de compra (CSS puro: si falla el JS no se oculta nada) */
  .rm-enter { animation: rm-rise 0.55s var(--rm-ease-out) backwards; animation-delay: calc(var(--rm-i, 0) * 70ms + 60ms); }
  .rm-gift.rm-enter { animation-name: rm-rise-soft; }
  @keyframes rm-rise { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
  @keyframes rm-rise-soft { from { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.985); } to { opacity: 1; transform: none; } }

  /* Secciones al hacer scroll (rm-pdp.js agrega .rm-reveal-ready e .is-in) */
  .rm-reveal-ready { opacity: 0; transform: translate3d(0, 16px, 0); }
  .rm-reveal-ready.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.55s ease, transform 0.55s var(--rm-ease-out);
  }
  .rm-reveal-ready .rm-stagger > * { opacity: 0; transform: translate3d(0, 14px, 0); }
  .rm-reveal-ready.is-in .rm-stagger > * {
    opacity: 1;
    transform: none;
    transition: opacity 0.45s ease, transform 0.45s var(--rm-ease-out);
    transition-delay: 420ms;
  }
  .rm-reveal-ready.is-in .rm-stagger > :nth-child(1) { transition-delay: 120ms; }
  .rm-reveal-ready.is-in .rm-stagger > :nth-child(2) { transition-delay: 190ms; }
  .rm-reveal-ready.is-in .rm-stagger > :nth-child(3) { transition-delay: 260ms; }
  .rm-reveal-ready.is-in .rm-stagger > :nth-child(4) { transition-delay: 330ms; }
  .rm-reveal-ready.is-in .rm-stagger > :nth-child(5) { transition-delay: 400ms; }

  /* Transferencia: destello en la píldora + leve realce del monto, 3 veces cada 9s y para */
  .rm-transfer-pill { animation: rm-pill-glow 9s ease-in-out 1.4s 3; }
  .rm-pdp .rm-transfer-amount { animation: rm-amount-lift 9s ease-in-out 1.4s 3; }
  @keyframes rm-pill-glow {
    0%, 14%, 100% { box-shadow: 0 0 0 0 rgba(43, 108, 117, 0); }
    6% { box-shadow: 0 0 0 5px rgba(43, 108, 117, 0.14), 0 0 14px 2px rgba(43, 108, 117, 0.18); }
  }
  @keyframes rm-amount-lift { 0%, 12%, 100% { transform: none; } 5% { transform: scale(1.045); } }

  /* Regalo: brillo que cruza la tarjeta (4 pasadas espaciadas) + halo del ícono a contratiempo */
  .rm-gift-shimmer { animation: rm-gift-sweep 7s ease-in-out 1.1s 4; }
  @keyframes rm-gift-sweep { 0% { left: -50%; } 16%, 100% { left: 130%; } }
  .rm-gift-icon { animation: rm-gift-halo 7s ease-out 2.4s 4; }
  @keyframes rm-gift-halo {
    0%, 18%, 100% { box-shadow: 0 0 0 0 rgba(117, 60, 89, 0); transform: none; }
    6% { box-shadow: 0 0 0 6px rgba(117, 60, 89, 0.16); transform: scale(1.06); }
  }

  /* CTA: una única pasada de brillo después de la entrada */
  .rm-pdp-info .rm-cta-shine { animation: rm-cta-sweep 0.9s ease 1.6s 1; }
  @keyframes rm-cta-sweep { from { left: -60%; } to { left: 130%; } }

  /* Acordeones: el contenido aparece con fade + leve desplazamiento */
  .rm-acc[open]:not(.is-closing) .rm-acc-body > *,
  .rm-size-card[open]:not(.is-closing) .rm-size-card-panel > * { animation: rm-panel-in 0.38s var(--rm-ease-out) 0.06s backwards; }
  @keyframes rm-panel-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }

  /* Descripción: los resaltados se "pintan" y la imagen se asienta al entrar en pantalla */
  .rm-description.rm-reveal-ready h2 mark { background-size: 0% 100%; }
  .rm-description.rm-reveal-ready.is-in h2 mark { background-size: 100% 100%; transition: background-size 0.9s var(--rm-ease-out) 0.45s; }
  .rm-description.rm-reveal-ready.is-in h2 mark ~ mark { transition-delay: 0.75s; }
  .rm-description.rm-reveal-ready .rm-description-body img { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.985); }
  .rm-description.rm-reveal-ready.is-in .rm-description-body img {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease 0.35s, transform 0.8s var(--rm-ease-out) 0.35s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rm-reveal-ready { opacity: 1; transform: none; }
  .rm-gallery-main, .rm-enter, .rm-gift-icon, .rm-pdp .rm-opt.selected,
  .rm-pdp .rm-transfer-amount, .rm-transfer-pill, .rm-gift-shimmer, .rm-cta-shine,
  .rm-acc-body > *, .rm-size-card-panel > *, .rm-pdp .is-updated { animation: none !important; }
  .rm-gift-shimmer { display: none; }
  .rm-description-body h2 mark { background-size: 100% 100% !important; }
  .rm-pdp *, .rm-modal *, .rm-sticky-buy { transition-duration: 0.01ms !important; }
}

/* ═════════════════════════════════════════════════════════════
   DRAWER DEL CARRITO (#modal-cart) — solo presentación sobre el markup nativo
   ═════════════════════════════════════════════════════════════ */
#modal-cart { color: var(--rm-ink); background: #fff; }
@media (min-width: 768px) { #modal-cart.modal-docked-md { width: 420px; } }
#modal-cart .modal-header { border-bottom: 1px solid var(--rm-line); }
#modal-cart .modal-header .col.p-3 { padding: 18px 16px !important; font-size: 17px; font-weight: 700; }
#modal-cart .modal-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; cursor: pointer; }
#modal-cart .modal-close:hover { background: var(--rm-rosa); }

/* Barra de envío gratis (lógica nativa: .js-ship-free-rest / .js-bar-progress-active) */
#modal-cart .js-ship-free-rest { margin: 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--rm-celeste); }
#modal-cart .ship-free-rest-message { color: var(--rm-ink); font-size: 13.5px; font-weight: 600; }
#modal-cart .ship-free-rest-message .text-accent { color: var(--rm-petroleo) !important; }
#modal-cart .bar-progress { height: 6px; border-radius: 999px; background: rgba(43, 108, 117, 0.16); }
#modal-cart .bar-progress-active { border-radius: 999px; background: var(--rm-petroleo); }
#modal-cart .bar-progress-check { background: var(--rm-petroleo); }

/* Ítems (cart-item-ajax.tpl) */
#modal-cart .cart-item { padding: 14px 0; border-bottom: 1px solid var(--rm-line); }
#modal-cart .cart-item-image { width: 72px; border-radius: 8px; object-fit: cover; }
#modal-cart .cart-item-name { color: var(--rm-ink); font-size: 14px; font-weight: 500; line-height: 1.35; text-decoration: none; }
#modal-cart .cart-item-name .font-small { color: var(--rm-muted); }
#modal-cart .js-cart-item-subtotal { font-size: 14.5px; font-variant-numeric: tabular-nums; }
#modal-cart .cart-item .btn-link { color: var(--rm-muted); }
#modal-cart .cart-item .btn-link:hover { color: var(--rm-ciruela); }
#modal-cart .form-quantity-icon svg { fill: var(--rm-ciruela); }

/* Pie fijo del drawer: solo scrollea la parte superior (productos + "Sumá a tu compra").
   .cart-row (barra de envío gratis, subtotal, total, transferencia, CTA y "Ver más productos")
   queda pegado abajo con position: sticky dentro del cuerpo con scroll. */
html body #modal-cart { overflow: hidden !important; }
#modal-cart .js-ajax-cart-panel { display: flex; flex-direction: column; height: 100%; }
#modal-cart .js-ajax-cart-panel > .modal-header { flex: none; }
html body #modal-cart .js-ajax-cart-panel > .modal-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  height: auto !important;
  padding-bottom: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* Los bloques no se comprimen: desbordan y scrollea el cuerpo */
#modal-cart .js-ajax-cart-panel > .modal-body > * { flex-shrink: 0; }
#modal-cart .modal-body > .cart-row {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: auto;
  margin-left: -16px;
  margin-right: -16px;
  padding: 12px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--rm-line);
  box-shadow: 0 -10px 24px -20px rgba(42, 28, 36, 0.45);
}
#modal-cart .cart-row .js-ship-free-rest { margin: 0 0 10px; }
#modal-cart .cart-row .mb-3 { margin-bottom: 8px !important; }
#modal-cart .cart-row .divider { margin: 6px 0 !important; }
#modal-cart .cart-row .js-cart-total-container .font-huge { margin-bottom: 8px !important; }

/* "Sumá a tu compra": catálogo nativo en carrusel horizontal (rm-pdp.js.tpl → rmCartCatalog) */
#modal-cart .rm-cart-xsell { margin: 6px -16px 12px; padding: 16px 0 16px 16px; background: #faf9f1; border-top: 1px solid var(--rm-line); border-bottom: 1px solid var(--rm-line); overflow: hidden; }
#modal-cart .rm-cart-xsell:empty { display: none !important; }
#modal-cart .rm-xsell-title { margin: 0 16px 10px 0; color: var(--rm-ink); font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
#modal-cart .rm-xsell-loading { margin: 0; color: var(--rm-muted); font-size: 13px; }
#modal-cart .rm-xsell-viewport { position: relative; }
#modal-cart .js-rm-xsell-swiper { overflow: hidden; padding-right: 16px; }
#modal-cart .rm-xsell-slide { height: auto; }
/* Las cards del catálogo traen columnas de grilla: dentro del slide ocupan el 100% */
html body #modal-cart .rm-xsell-slide .js-item-product {
  flex: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 12.5px;
}
#modal-cart .rm-xsell-slide .item-product .item-name,
#modal-cart .rm-xsell-slide .item-product .js-item-name { font-size: 12.5px; line-height: 1.3; }
#modal-cart .rm-xsell-slide .item-product .item-price { font-size: 13.5px; }
#modal-cart .rm-xsell-slide .item-product .btn { width: 100%; padding-left: 8px !important; padding-right: 8px !important; font-size: 12.5px; }
/* Cards compactas: solo imagen, nombre, precio principal y CTA (el markup nativo no cambia) */
html body #modal-cart .rm-xsell-slide .perla-rating,
html body #modal-cart .rm-xsell-slide .js-payment-discount-price-product-container,
html body #modal-cart .rm-xsell-slide .product-installments,
html body #modal-cart .rm-xsell-slide .js-max-installments-container,
html body #modal-cart .rm-xsell-slide .item-installments,
html body #modal-cart .rm-xsell-slide .mc-grid-payments,
html body #modal-cart .rm-xsell-slide .mc-grid-3-installments,
html body #modal-cart .rm-xsell-slide .js-compare-price-display,
html body #modal-cart .rm-xsell-slide .price-compare,
html body #modal-cart .rm-xsell-slide .perla-pack-bubble,
html body #modal-cart .rm-xsell-slide .perla-gift-ribbon,
html body #modal-cart .rm-xsell-slide .perla-promo-badge,
html body #modal-cart .rm-xsell-slide .js-labels-floating-group { display: none !important; }
html body #modal-cart .rm-xsell-slide .item-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  margin: 8px 0 4px !important;
  color: var(--rm-ink);
  font-size: 12.5px !important;
  font-weight: 500;
  line-height: 1.3 !important;
}
html body #modal-cart .rm-xsell-slide .item-price { display: block; margin: 0 0 8px; color: var(--rm-ink); font-size: 14px !important; font-weight: 700 !important; }
html body #modal-cart .rm-xsell-slide .item-actions { display: block !important; width: 100%; margin: 0; }
html body #modal-cart .rm-xsell-slide .item-actions .btn,
html body #modal-cart .rm-xsell-slide .item-actions input.js-addtocart {
  display: block;
  width: 100% !important;
  height: 34px;
  margin: 0 !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  line-height: 34px !important;
  text-transform: none !important;
}

#modal-cart .rm-xsell-nav {
  position: absolute;
  top: 34%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--rm-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rm-ink);
  box-shadow: 0 4px 12px rgba(42, 28, 36, 0.12);
  cursor: pointer;
}
#modal-cart .rm-xsell-nav .icon-inline { width: 12px; height: 12px; fill: currentColor; }
#modal-cart .rm-xsell-prev { left: -4px; }
#modal-cart .rm-xsell-next { right: 8px; }
#modal-cart .rm-xsell-nav.swiper-button-disabled { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { #modal-cart .rm-xsell-nav { display: inline-flex; } }

/* Totales y CTA */
#modal-cart .js-cart-total-container .font-huge { font-size: 19px; font-weight: 700; }
html body #modal-cart input[name="go_to_checkout"] {
  height: 52px;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--rm-ciruela) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  text-transform: none !important;
  transition: background-color 0.2s ease;
}
html body #modal-cart input[name="go_to_checkout"]:hover { background: var(--rm-ciruela-dark) !important; }
#modal-cart .js-modal-close-private.btn-link { color: var(--rm-ciruela); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }

/* ═════════════════════════════════════════════════════════════
   DRAWER v2 — minimalista: crema/blanco, pocos bordes, acentos ciruela/petróleo.
   Pisa las reglas anteriores del drawer. Solo presentación: toda la lógica es nativa.
   ═════════════════════════════════════════════════════════════ */
html body #modal-cart { background: #fff; }
@media (min-width: 768px) { html body #modal-cart.modal-docked-md { width: 440px; } }

/* Header: "Carrito" + badge + X */
html body #modal-cart .modal-header { border-bottom: 0; background: #fff; }
html body #modal-cart .modal-header .col.p-3 { display: flex; align-items: center; gap: 10px; padding: 20px 20px 12px !important; }
#modal-cart .rm-drawer-title { color: var(--rm-ink); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
html body #modal-cart .rm-drawer-count {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 24px !important;
  height: 24px !important;
  padding: 0 7px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--rm-ink) !important;
  color: #fff !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 24px !important;
}
html body #modal-cart .modal-close { width: 40px; height: 40px; margin-right: 8px; }
html body #modal-cart .modal-close svg { width: 18px; height: 18px; }

/* Cuerpo */
html body #modal-cart .js-ajax-cart-panel > .modal-body { padding: 0 20px; }

/* Envío gratis arriba: mensaje y barra fina debajo */
#modal-cart .rm-drawer-ship { margin: 0 -20px; padding: 0 20px 14px; border-bottom: 1px solid var(--rm-line); }
html body #modal-cart .rm-drawer-ship .js-ship-free-rest { display: flex; flex-direction: column; gap: 8px; margin: 0 !important; padding: 0 !important; background: none !important; border-radius: 0; }
html body #modal-cart .rm-drawer-ship .js-ship-free-rest-message { position: relative; order: -1; height: 20px; margin: 0; padding: 0; color: var(--rm-ink); font-size: 13.5px; font-weight: 400 !important; line-height: 20px; text-align: left; }
/* Los 3 textos nativos van apilados (el JS nativo alterna su opacidad): una sola línea */
html body #modal-cart .rm-drawer-ship .ship-free-rest-text { position: absolute; top: 0; left: 0; right: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
#modal-cart .rm-drawer-ship .ship-free-rest-text strong { font-weight: 700; }
html body #modal-cart .rm-drawer-ship .text-accent,
html body #modal-cart .rm-drawer-ship .js-ship-free-dif { color: var(--rm-petroleo) !important; }
html body #modal-cart .rm-drawer-ship .js-ship-free-rest-message { margin: 0 0 10px !important; }
html body #modal-cart .rm-drawer-ship .bar-progress { position: relative !important; top: auto !important; height: 3px !important; margin: 0 !important; border-radius: 999px; background: #e9e4dc !important; }
html body #modal-cart .rm-drawer-ship .bar-progress-active { height: 3px !important; border-radius: 999px; background: var(--rm-ink) !important; }
html body #modal-cart .rm-drawer-ship .bar-progress-check { display: none !important; }

/* Producto del carrito: horizontal compacto */
html body #modal-cart .js-ajax-cart-list .cart-item { margin: 0; padding: 16px 0 !important; border-bottom: 1px solid var(--rm-line); align-items: flex-start !important; }
html body #modal-cart .cart-item-image-col { width: 64px; }
html body #modal-cart .cart-item-image { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #f6f3ee; }
html body #modal-cart .cart-item > .col { padding-left: 14px !important; }
html body #modal-cart .cart-item > .col > .row { display: flex; flex-wrap: wrap; align-items: center; margin: 0; }
html body #modal-cart .cart-item > .col > .row > .col-12 { order: 0; padding: 0; }
html body #modal-cart .cart-item-name-container { margin-bottom: 6px !important; padding: 0; }
html body #modal-cart .cart-item-name { color: var(--rm-ink) !important; font-size: 14px; font-weight: 600; line-height: 1.3; }
html body #modal-cart .cart-item-name .font-small { display: block; margin-top: 2px; color: var(--rm-muted); font-size: 12.5px; font-weight: 400; }
html body #modal-cart .cart-item-subtotal { position: static !important; order: 1; flex: 1 1 auto !important; width: auto !important; max-width: none !important; min-width: 0; padding: 0 !important; text-align: left !important; }
html body #modal-cart .cart-item > .col > .row { flex-wrap: wrap !important; }
html body #modal-cart .cart-item > .col > .row > .cart-item-quantity { flex: 0 0 auto !important; width: auto !important; max-width: none !important; margin-left: auto !important; }
html body #modal-cart .cart-item-quantity .form-quantity,
html body #modal-cart .cart-item-quantity .form-group { width: auto !important; float: none !important; margin: 0 !important; }
html body #modal-cart .js-cart-item-subtotal { color: var(--rm-ink); font-size: 14.5px; font-weight: 700 !important; }
html body #modal-cart .cart-item-quantity { order: 2; padding: 0; }
/* Eliminar: ícono de tacho en lugar del texto "Borrar" */
html body #modal-cart .cart-item [data-component="line-item.remove"] {
  width: 32px;
  height: 32px;
  margin: -6px -6px 0 0;
  padding: 0 !important;
  border-radius: 999px;
  font-size: 0 !important;
  background-color: var(--rm-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4h6v3'/%3E%3C/svg%3E") center / 17px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4h6v3'/%3E%3C/svg%3E") center / 17px no-repeat;
}
html body #modal-cart .cart-item [data-component="line-item.remove"]:hover { background-color: var(--rm-ciruela); }
/* Cantidad: control chico, bordes suaves */
html body #modal-cart .cart-item-quantity .form-quantity { height: 32px !important; padding: 0 2px !important; border: 1px solid #e5ddd8 !important; border-radius: 999px !important; background: #fff !important; box-shadow: none !important; }
html body #modal-cart .cart-item-quantity .js-cart-quantity-btn { width: 28px !important; height: 28px !important; border: 0 !important; background: none !important; }
html body #modal-cart .cart-item-quantity .js-cart-quantity-btn svg { width: 10px !important; height: 10px !important; fill: var(--rm-ink) !important; }
html body #modal-cart .cart-item-quantity .js-cart-quantity-input { width: 26px !important; height: 28px !important; padding: 0 !important; border: 0 !important; background: none !important; font-size: 13.5px !important; font-weight: 600; }

/* "También te puede gustar": cards horizontales compactas */
html body #modal-cart .rm-cart-xsell { margin: 0 -20px; padding: 22px 0 22px 20px; background: #faf8f4; border: 0; }
html body #modal-cart .rm-xsell-title { margin: 0 20px 14px 0; font-size: 15px; font-weight: 600; letter-spacing: 0; }
html body #modal-cart .js-rm-xsell-swiper { padding-right: 20px; }
html body #modal-cart .rm-xsell-slide .item { margin: 0 !important; padding: 12px; border-radius: 14px; background: #fff; }
html body #modal-cart .rm-xsell-slide .js-quickshop-container,
html body #modal-cart .rm-xsell-slide .item:not(:has(.js-quickshop-container)) {
  display: grid !important;
  grid-template-columns: 68px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
}
html body #modal-cart .rm-xsell-slide .item-image { grid-column: 1; width: 68px; margin: 0 !important; border-radius: 10px; overflow: hidden; background: #f6f3ee; }
html body #modal-cart .rm-xsell-slide .js-item-image-padding { padding-bottom: 100% !important; }
html body #modal-cart .rm-xsell-slide .item-image img { object-fit: cover; }
html body #modal-cart .rm-xsell-slide .item-description { grid-column: 2; min-width: 0; padding: 0 !important; }
html body #modal-cart .rm-xsell-slide .item-name { min-height: 0; margin: 0 0 3px !important; font-size: 13px !important; font-weight: 600 !important; }
html body #modal-cart .rm-xsell-slide .item-price { margin: 0 0 8px; font-size: 13.5px !important; }
html body #modal-cart .rm-xsell-slide .item-actions .btn,
html body #modal-cart .rm-xsell-slide .item-actions input.js-addtocart {
  display: inline-block;
  width: auto !important;
  height: 32px;
  padding: 0 16px !important;
  border: 0 !important;
  background: var(--rm-ink) !important;
  color: #fff !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 32px !important;
}
html body #modal-cart .rm-xsell-slide .item-actions .btn:hover,
html body #modal-cart .rm-xsell-slide .item-actions input.js-addtocart:hover { background: var(--rm-ciruela) !important; }
#modal-cart .rm-xsell-nav { top: 50%; margin-top: -16px; }

/* Footer fijo: total, nota, CTA y medios de pago */
html body #modal-cart .modal-body > .cart-row { margin-left: -20px; margin-right: -20px; padding: 16px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rm-line); box-shadow: 0 -12px 28px -24px rgba(42, 28, 36, 0.4); }
/* Subtotal y "Ver más productos" fuera del drawer minimalista (el total y las promociones siguen) */
html body #modal-cart .cart-row [data-store="cart-subtotal"],
html body #modal-cart .cart-row > .js-visible-on-cart-filled.divider,
html body #modal-cart .cart-row .js-modal-close.font-small { display: none !important; }
html body #modal-cart .cart-row > .mb-3 { margin-bottom: 0 !important; }
html body #modal-cart .cart-row .js-cart-total-container .row { margin-bottom: 4px !important; align-items: baseline; font-size: 17px !important; font-weight: 600 !important; }
html body #modal-cart .cart-row .js-cart-total { font-size: 18px; font-weight: 700; }
html body #modal-cart .cart-row .js-payment-discount-price-cart-container,
html body #modal-cart .cart-row .js-payment-discount-price-cart-container.text-accent { color: var(--rm-petroleo) !important; font-size: 12.5px !important; }
html body #modal-cart .cart-row .js-payment-discount-price-cart-container * { color: inherit !important; font-size: inherit !important; }
#modal-cart .cart-row .row.opacity-50 { margin-top: 2px; font-size: 11.5px; }
#modal-cart .rm-drawer-note { margin: 6px 0 12px; color: var(--rm-muted); font-size: 12px; line-height: 1.4; }
html body #modal-cart input[name="go_to_checkout"] { height: 54px; border-radius: 14px !important; font-size: 16px !important; font-weight: 600 !important; letter-spacing: 0; }
html body #modal-cart .js-ajax-cart-submit { margin-bottom: 10px !important; }
#modal-cart .rm-drawer-payments { display: flex; justify-content: center; }
#modal-cart .rm-drawer-payments img,
#modal-cart .rm-drawer-payments svg { max-height: 18px; width: auto; }
#modal-cart .rm-drawer-payments ul,
#modal-cart .rm-drawer-payments .payment-shipping-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin: 0; padding: 0; list-style: none; }

/* ═════════════════════════════════════════════════════════════
   FOOTER COMPACTO (snipplets/footer/footer.tpl .rm-foot)
   Fondo ciruela, texto crema (7.39:1). Mismo contenido nativo, menos alto.
   ═════════════════════════════════════════════════════════════ */
html body footer.rm-foot {
  --footer-background: #753c59;
  --footer-foreground: #f5f3e4;
  background: var(--rm-ciruela) !important;
  color: var(--rm-crema) !important;
  font-size: 13.5px;
}
html body footer.rm-foot a,
html body footer.rm-foot .btn-link,
html body footer.rm-foot .font-big,
html body footer.rm-foot .font-smallest { color: var(--rm-crema) !important; }
html body footer.rm-foot svg { fill: var(--rm-crema); }
footer.rm-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
footer.rm-foot :focus-visible { outline: 2px solid var(--rm-crema); outline-offset: 2px; }
footer.rm-foot > .container.py-3 { padding-top: 20px !important; padding-bottom: 8px !important; }
footer.rm-foot .font-big { padding-top: 8px !important; padding-bottom: 6px !important; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
footer.rm-foot ul { margin-bottom: 0; }
footer.rm-foot li { margin-bottom: 2px; }
footer.rm-foot .row.align-items-center.py-4 { padding-top: 12px !important; padding-bottom: 12px !important; }
footer.rm-foot .divider { border-color: rgba(245, 243, 228, 0.18); background: rgba(245, 243, 228, 0.18); }
footer.rm-foot .footer-legal { border-top: 1px solid rgba(245, 243, 228, 0.18); background: transparent !important; padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); font-size: 12px; }
@media (max-width: 767px) {
  footer.rm-foot .js-accordion-private-toggle-mobile .col.p-3 { padding-top: 12px !important; padding-bottom: 12px !important; }
}
