/* ==========================================================================
   od-odas.css - Rediseno ODAS (mayorista) sobre plantilla Lima
   Archivo propio. No reemplaza ni edita CSS del tema.
   Solo ASCII. Todos los textos visibles viven en od-odas.js.
   ========================================================================== */

:root {
  --od-negro: #111111;
  --od-rosa: #E5387F;
  --od-celeste: #C8E9EC;
  --od-gris: #8A8A8A;
  --od-gris-claro: #EFEFEF;
  --od-gris-precio: #B5B5B5;
  --od-verde: #4CC26A;
  --od-borde-pendiente: #CFCFCF;
}

/* Utilitario de ocultamiento. Nunca borramos nodos del tema: los ocultamos,
   porque hay scripts (tema y admin) que los buscan con querySelector. */
.od-hide { display: none !important; }

/* --------------------------------------------------------------------------
   A1. Precio de la ficha
   -------------------------------------------------------------------------- */

.od-price { margin-bottom: 12px; }

.od-price-compare {
  display: block;
  font-size: 13px;
  line-height: 1.2;
  color: var(--od-gris);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.od-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.od-price-now {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--od-negro);
}

.od-price-unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--od-gris);
}

.od-badge-off {
  display: inline-block;
  background: var(--od-rosa);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.od-price-notax {
  display: block;
  font-size: 9px;
  line-height: 1.3;
  color: var(--od-gris-precio);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   A2. Bloque de transferencia
   -------------------------------------------------------------------------- */

.od-transfer {
  background: var(--od-rosa);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.od-transfer-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
}

.od-transfer-icon svg { width: 100%; height: 100%; fill: #fff; display: block; }

.od-transfer-body { min-width: 0; }

.od-transfer-title {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.od-transfer-price {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   A3. Recuadros de cuotas y envio
   -------------------------------------------------------------------------- */

.od-perks { margin-bottom: 18px; }

.od-perk {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--od-negro);
  border-radius: 6px;
  padding: 9px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.25;
  color: var(--od-negro);
}

.od-perk:last-child { margin-bottom: 0; }

.od-perk-icon { flex: 0 0 auto; width: 18px; height: 18px; }
.od-perk-icon svg { width: 100%; height: 100%; fill: var(--od-rosa); display: block; }

.od-perk-text { min-width: 0; }
.od-perk-text b { font-weight: 700; }

/* --------------------------------------------------------------------------
   A5. Badge "N personas viendo"
   -------------------------------------------------------------------------- */

.od-viewers {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(24, 24, 24, 0.8);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 999px;
  pointer-events: none;
}

.od-viewers-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--od-verde);
  flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   B. Tabla de talles con cantidades
   -------------------------------------------------------------------------- */

.od-sizes { margin: 0 0 20px; }

.od-sizes-head {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--od-negro);
  margin-bottom: 8px;
}

.od-sizes-list { border-top: 1px solid var(--od-gris-claro); }

.od-size-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--od-gris-claro);
}

.od-size-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--od-negro);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.od-size-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--od-negro);
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 auto;
}

/* 44x44 es el minimo tactil recomendado por Apple. Cargar 10 unidades de un
   talle es el caso normal en mayorista, asi que los controles son grandes.
   touch-action: manipulation desactiva el doble toque para hacer zoom SOLO en
   estos botones; el zoom de la pagina sigue disponible. */
.od-size-btn {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--od-negro);
  font-size: 16px;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.od-size-btn:disabled { opacity: 0.3; cursor: default; }
.od-size-btn svg { width: 11px; height: 11px; fill: currentColor; display: block; }

.od-size-input {
  width: 44px;
  height: 44px;
  text-align: center;
  border: 0;
  border-left: 1px solid var(--od-gris-claro);
  border-right: 1px solid var(--od-gris-claro);
  font-size: 14px;
  font-weight: 700;
  color: var(--od-negro);
  background: #fff;
  padding: 0;
  -moz-appearance: textfield;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  touch-action: manipulation;
}

.od-size-input::-webkit-outer-spin-button,
.od-size-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.od-size-row.is-off { opacity: 0.35; }
.od-size-row.is-off .od-size-stepper { border-color: var(--od-borde-pendiente); }

.od-sizes-error {
  font-size: 12px;
  color: var(--od-rosa);
  margin-top: 8px;
}

/* Todo control nuestro que se toque repetido: sin doble toque para zoom y sin
   seleccion de texto ni lupa al repetir el toque. */
.od-size-btn,
.od-size-input,
.od-size-stepper,
.od-size-row,
body.od-sizes-on #product_form .js-prod-submit-form {
  touch-action: manipulation;
}

.od-size-row,
.od-sizes-head {
  -webkit-user-select: none;
  user-select: none;
}

/* Boton de agregar en estado ocupado */
.od-cta-busy { opacity: 0.6; cursor: progress; }

/* Con la tabla de talles activa el selector de cantidad queda oculto, asi que
   la columna del boton pasa a ocupar el ancho completo. */
body.od-sizes-on #product_form .form-row > .col-8 {
  flex: 0 0 100%;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   C. Barra de progreso de dos hitos
   -------------------------------------------------------------------------- */

.od-prog { margin: 0 0 22px; }

.od-prog-msg {
  font-size: 13px;
  line-height: 1.35;
  color: var(--od-negro);
  margin-bottom: 12px;
}

.od-prog-msg b { font-weight: 700; }

.od-prog-track {
  position: relative;
  height: 4px;
  background: var(--od-gris-claro);
  border-radius: 999px;
  margin-bottom: 44px;
}

.od-prog-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--od-rosa);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.od-prog-mark { position: absolute; top: -8px; }
.od-prog-mark--mid { left: 33.333%; margin-left: -10px; }
.od-prog-mark--end { right: 0; }

.od-prog-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--od-borde-pendiente);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.od-prog-dot svg { width: 10px; height: 10px; fill: #fff; display: none; }

.od-prog-mark.is-done .od-prog-dot {
  background: var(--od-rosa);
  border-color: var(--od-negro);
}

.od-prog-mark.is-done .od-prog-dot svg { display: block; }

.od-prog-lbl {
  position: absolute;
  top: 25px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--od-gris);
}

.od-prog-lbl span { display: block; }
.od-prog-lbl b { display: block; font-weight: 700; }

.od-prog-mark.is-done .od-prog-lbl { color: var(--od-negro); }

.od-prog-mark--mid .od-prog-lbl { left: 50%; transform: translateX(-50%); text-align: center; }
.od-prog-mark--end .od-prog-lbl { right: 0; text-align: right; }

/* --------------------------------------------------------------------------
   A6 / A7. Cross-sell
   -------------------------------------------------------------------------- */

/* En mobile el acordeon de Medios de envio se mueve debajo del cross-sell y
   sale de su .container: este wrapper se lo devuelve. */
.od-envio-wrap { padding-left: 15px; padding-right: 15px; }

/* Botones del cross-sell en negro */
.od-xsell .btn-secondary,
.od-xsell .item-actions .btn {
  background: var(--od-negro) !important;
  border-color: var(--od-negro) !important;
  color: #fff !important;
  fill: #fff !important;
}

/* Badge de descuento del cross-sell en rosa */
.od-xsell .label-accent,
.od-xsell .js-offer-label {
  background: var(--od-rosa) !important;
  color: #fff !important;
}

/* --------------------------------------------------------------------------
   D. Listados (home, categorias, busqueda)
   -------------------------------------------------------------------------- */

.od-card-price { margin-bottom: 6px; }

.od-card-compare {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  color: var(--od-gris);
  text-decoration: line-through;
  margin-bottom: 1px;
}

.od-card-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.od-card-now {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--od-negro);
}

.od-card-badge {
  display: inline-block;
  background: var(--od-rosa);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.od-card-transfer {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--od-rosa);
  color: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  margin: 6px 0 0;
}

.od-card-transfer-title {
  display: block;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.od-card-transfer-price {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

/* Boton Comprar siempre visible y a ancho completo en mobile */
@media (max-width: 767px) {
  .js-item-product .item-actions {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-top: 10px;
  }
  .js-item-product .item-actions .btn,
  .js-item-product .item-actions form,
  .js-item-product .item-actions input[type="submit"] {
    display: block !important;
    width: 100% !important;
  }
}

/* --------------------------------------------------------------------------
   F. Coordinacion con funciones existentes
   -------------------------------------------------------------------------- */

/* El boton flotante de WhatsApp vive abajo a la derecha (45px a right:15px),
   justo donde cae el + de la tabla de talles, que tambien va pegado al borde
   derecho. Si una fila queda a esa altura, el WhatsApp tapa el + por completo
   y el toque abre el chat en vez de sumar una unidad.
   Mientras la tabla esta a la vista lo mandamos a la izquierda: ahi solo queda
   por encima del nombre del talle, que no es interactivo.
   La clase od-sizes-a-la-vista la pone od-odas.js con un IntersectionObserver. */
@media (max-width: 767px) {
  body.od-sizes-a-la-vista .btn-whatsapp,
  body.od-sizes-a-la-vista .js-btn-fixed-bottom {
    left: 15px;
    right: auto;
  }
}

/* En mobile la notificacion de "agregado al carrito" ocupa el ancho completo
   abajo y se superpone con el boton de WhatsApp: lo subimos mientras esta
   visible. La clase od-notif-open la pone od-odas.js. */
@media (max-width: 767px) {
  body.od-notif-open .btn-whatsapp,
  body.od-notif-open .js-btn-fixed-bottom {
    transform: translateY(-96px);
    transition: transform 0.25s ease;
  }
  .btn-whatsapp,
  .js-btn-fixed-bottom { transition: transform 0.25s ease; }
}

/* --------------------------------------------------------------------------
   H. Header
   Los colores del header (fondo blanco, textos e iconos negros) y el logo
   centrado se configuran en el editor de diseno. Aca va lo que el editor no
   permite. Lo que depende del JS va bajo body.od-head: si el JS falla, queda
   el header nativo completo, con su barra superior y los links de cuenta.
   -------------------------------------------------------------------------- */

/* Barra de anuncios arriba de todo. En desktop el tema la manda debajo del
   menu con order:1. Su texto no se toca: de ahi sale la compra minima. */
@media (min-width: 768px) {
  .head-main > .section-adbar {
    order: -1;
  }
}

/* Una sola linea, centrada. Si un mensaje no entra, se corta con "..." en
   vez de pasar a dos lineas. El carrusel sigue igual. */
.section-adbar .slide-container {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
}

/* Franja superior: se oculta recien cuando el JS reubico sus links. */
body.od-head .js-topbar {
  display: none !important;
}

/* Fila del logo: tres columnas iguales a los costados, logo siempre al
   centro exacto, en mobile y desktop. */
body.od-head .od-head-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

body.od-head .od-head-row > * {
  flex: none;
  width: auto;
  max-width: none;
  margin: 0;
}

body.od-head .od-head-menu,
body.od-head .od-head-menu.d-md-none {
  display: block !important;
  grid-column: 1;
  justify-self: start;
}

body.od-head .od-head-logo {
  grid-column: 2;
  text-align: center !important;
}

body.od-head .od-head-right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

body.od-head .od-head-right > .col-utility {
  gap: 16px;
}

@media (min-width: 768px) {
  body.od-head .od-head-right,
  body.od-head .od-head-right > .col-utility {
    gap: 4px;
  }
}

body.od-head .od-head-right > .col-utility {
  display: flex;
  align-items: center;
  width: auto;
  padding-left: 0;
  padding-right: 0;
}

/* El buscador de desktop reserva lugar para desplegar el campo: a la
   derecha, el icono va pegado al resto del grupo. */
body.od-head .od-head-right .search-controls-wrapper {
  text-align: right !important;
}

/* Iconos limpios: sin el borde redondeado que el tema les pone en desktop. */
body.od-head .head-main .btn-utility {
  border-color: transparent !important;
}

/* Menu de categorias: el activo subrayado en rosa y SALE en rosa.
   En la ficha el tema marca como activas todas las categorias del producto
   (Todos, Abrigos, Blazers...): ahi no se subraya ninguna. */
body:not(.template-product) .nav-desktop-list .nav-list-link.selected {
  text-decoration: underline;
  text-decoration-color: #E5387F;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

body:not(.template-product) .nav-desktop-list .nav-list-link.selected:after {
  background: #E5387F;
}

a.nav-list-link[href$="/sale/"],
.head-main a.nav-list-link[href$="/sale/"] {
  color: #E5387F;
}

/* Canal de WhatsApp en el menu desplegable y en el footer. */
.od-canal-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.od-canal-link .od-canal-icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: currentColor;
}
