/* =============================================================================
 * OTR — Página de productos cotizables y formulario inline en single
 *
 * La grilla de la página OTR usa la clase .daher-card--otr con estilos
 * auto-contenidos (no depende de los selectores específicos de Woo en
 * shop-card.css). Replica la estética de la tarjeta de tienda: borde, sombra,
 * hover-lift, header absoluto con marca, imagen 1:1, título centrado, footer
 * con CTA full-width.
 * ============================================================================= */

:root {
  --otr-primary: var(--color-secundario, #ec0106);
  --otr-primary-dark: #b80305;
  --otr-text: #313344;
  --otr-muted: #6b7280;
  --otr-border: #ecedf3;
  --otr-bg-soft: #f7f7f8;
  --otr-success: #16a34a;
  --otr-error: #b91c1c;
  --otr-radius: 10px;
  --otr-radius-lg: 14px;
  --otr-card-primary: var(--color-primario, #011b44);
}

/* ----- Página OTR (intro, empty, paginación) ------------------------------ */

/* El intro queda sin container ni padding lateral: Elementor (o el editor)
   define su propio ancho. Solo dejamos un margen vertical opcional. */
.otr-page__intro {
  width: 100%;
}

.otr-page__list-wrap {
  padding: 32px 0 64px;
}

.otr-page__empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--otr-muted);
  background: var(--otr-bg-soft);
  border-radius: var(--otr-radius-lg);
}

.otr-pagination {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.otr-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--otr-border);
  border-radius: 8px;
  color: var(--otr-text);
  text-decoration: none;
  font-weight: 600;
  background: #fff;
  transition: all .15s ease;
}

.otr-pagination .page-numbers:hover {
  border-color: var(--otr-primary);
  color: var(--otr-primary);
}

.otr-pagination .page-numbers.current {
  background: var(--otr-primary);
  border-color: var(--otr-primary);
  color: #fff;
}

.otr-pagination .page-numbers.dots {
  border: 0;
  background: transparent;
}

/* ----- Grilla OTR (auto-contenida, no depende de shop-card.css) ----------- */

.otr-page .woocommerce.productos_gral_trustus ul.products,
.otr-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.otr-page ul.products::before,
.otr-page ul.products::after {
  content: none !important;
  display: none !important;
}

.otr-page li.product.daher-card--otr {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  background: transparent;
  text-align: left;
  float: none !important;
  list-style: none;
}

@media (max-width: 1199px) {

  .otr-page .woocommerce.productos_gral_trustus ul.products,
  .otr-page ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {

  .otr-page .woocommerce.productos_gral_trustus ul.products,
  .otr-page ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

/* ----- Card OTR ----------------------------------------------------------- */

.daher-card--otr .daher-card__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--otr-border);
  border-radius: var(--otr-radius-lg);
  padding: 18px 18px 16px;
  height: 100%;
  font-family: 'Rubik', sans-serif;
  box-shadow: 0 2px 14px -8px rgba(1, 27, 68, .12);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.daher-card--otr .daher-card__inner:hover {
  box-shadow: 0 14px 36px -10px rgba(1, 27, 68, .22);
  border-color: rgba(1, 27, 68, .15);
  transform: translateY(-2px);
}

/* Header absoluto: marca a la izquierda, pill "Cotizable" a la derecha */
.daher-card--otr .daher-card__head {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  z-index: 2;
}

.daher-card--otr .daher-card__head>* {
  pointer-events: auto;
}

.daher-card--otr .daher-card__brand {
  display: inline-flex;
  align-items: center;
  max-width: 55%;
  height: 40px;
}

.daher-card--otr .daher-card__brand img {
  max-height: 40px !important;
  width: auto !important;
  max-width: 70px !important;
  height: auto !important;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.daher-card--otr .daher-card__brand--text {
  font-size: 13px;
  font-weight: 700;
  color: var(--otr-text);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.daher-card--otr .daher-card__brand--empty {
  width: 1px;
  height: 32px;
}

/* Pill "COTIZABLE" — compacto, mismo peso visual que el badge de descuento. */
.daher-card--otr .daher-card__pill {
  display: inline-flex;
  align-items: center;
  height: auto;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--otr-primary);
  color: #fff;
  font-family: 'Rubik', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 0 4px 10px -3px rgba(236, 1, 6, .35);
  white-space: nowrap;
}

/* Imagen 1:1 con padding superior para no chocar con el header absoluto */
.daher-card--otr .daher-card__media {
  display: block !important;
  margin: 0 !important;
  padding: 36px 8px 4px !important;
  border-radius: 10px;
  background: #fff;
}

.daher-card--otr .daher-card__media img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  transition: transform .25s ease;
}

.daher-card--otr .daher-card__inner:hover .daher-card__media img {
  transform: scale(1.04);
}

/* Título: centrado, dos líneas */
.daher-card--otr .daher-card__title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  padding: 0;
  margin: 4px 0 2px;
  font-family: 'Rubik', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--otr-text) !important;
  text-decoration: none !important;
  text-align: center;
}

.daher-card--otr .daher-card__title:hover {
  color: var(--otr-card-primary) !important;
}

/* Línea de estado en lugar del precio/stock */
.daher-card--otr .daher-card__stock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: #4e516a;
  text-align: center;
  font-weight: 500;
}

.daher-card--otr .daher-card__stock-icon {
  color: var(--otr-primary);
  font-size: 14px;
}

/* Footer con CTA */
.daher-card--otr .daher-card__actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

/* Botón "Cotizar": full-width, mismo lenguaje que el botón cart */
.daher-card--otr .daher-card__cart--otr {
  flex: 1 1 auto;
  width: 100%;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--otr-card-primary) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  text-align: center;
  box-shadow: 0 6px 14px -6px rgba(1, 27, 68, .55);
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}

.daher-card--otr .daher-card__cart--otr:hover {
  background: var(--otr-primary) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -4px rgba(236, 1, 6, .45);
}

.daher-card--otr .daher-card__cart--otr:active {
  transform: scale(0.97);
}

@media (max-width: 767px) {
  .daher-card--otr .daher-card__inner {
    padding: 12px 12px 14px;
    border-radius: 12px;
  }

  .daher-card--otr .daher-card__cart--otr {
    min-height: 40px;
    font-size: 13px;
  }
}

/* ----- Form de cotización (single OTR) ------------------------------------ */

.otr-quote {
  margin-top: 18px;
  padding: 22px;
  background: var(--otr-bg-soft);
  border: 1px solid var(--otr-border);
  border-radius: var(--otr-radius-lg);
}

.otr-quote__head {
  margin-bottom: 16px;
}

.otr-quote__pill {
  display: inline-block;
  background: var(--otr-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.otr-quote__title {
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--otr-text);
  font-weight: 700;
}

.otr-quote__lead {
  margin: 0;
  font-size: 14px;
  color: var(--otr-muted);
}

.otr-quote__form {
  display: grid;
  gap: 12px;
}

.otr-quote__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 540px) {
  .otr-quote__row {
    grid-template-columns: 1fr;
  }
}

.otr-quote__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.otr-quote__field--small {
  max-width: 200px;
}

.otr-quote__field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--otr-text);
  letter-spacing: .02em;
}

.otr-quote__req {
  color: var(--otr-primary);
}

.otr-quote__field input,
.otr-quote__field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--otr-border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--otr-text);
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
}

.otr-quote__field input:focus,
.otr-quote__field textarea:focus {
  outline: none;
  border-color: var(--otr-primary);
  box-shadow: 0 0 0 3px rgba(236, 1, 6, .12);
}

.otr-quote__field textarea {
  resize: vertical;
  min-height: 96px;
}

.otr-quote__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.otr-quote__actions {
  margin-top: 6px;
}

.otr-quote__btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--otr-primary);
  color: #fff;
  border: 0;
  padding: 13px 18px;
  border-radius: var(--otr-radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}

.otr-quote__btn:hover {
  background: var(--otr-primary-dark);
}

.otr-quote__btn:active {
  transform: translateY(1px);
}

.otr-quote__btn[disabled] {
  opacity: .65;
  cursor: not-allowed;
}

.otr-quote__feedback {
  margin-top: 4px;
  font-size: 14px;
  min-height: 1em;
}

.otr-quote__feedback.is-success {
  color: var(--otr-success);
  font-weight: 600;
}

.otr-quote__feedback.is-error {
  color: var(--otr-error);
  font-weight: 600;
}

.otr-quote.is-sent .otr-quote__form>*:not(.otr-quote__feedback) {
  display: none;
}

/* =============================================================================
 * Precio referencial OTR + leyenda de descuento por volumen
 * ============================================================================= */

/* ---- Tarjeta de la página OTR ---- */
.daher-card__otr-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 14px;
  margin-top: 4px;
}

.daher-card__otr-price-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--otr-card-primary);
  line-height: 1.1;
}

.daher-card__otr-price-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--otr-primary);
}

.daher-card__otr-price-legend i {
  font-size: .8em;
}

/* ---- Resumen sticky del single OTR ---- */
.daher-summary__price-box--otr {
  margin: 4px 0 8px;
}

.daher-summary__price-box--otr .daher-summary__price-ref {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--otr-bg-soft);
  color: var(--otr-muted);
  font-size: .72rem;
  font-weight: 600;
  vertical-align: middle;
}

.daher-summary__otr-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: var(--otr-radius);
  background: rgba(236, 1, 6, .06);
  color: var(--otr-primary);
  font-size: .9rem;
  font-weight: 600;
}


/* Botón "Ficha técnica" (PDF o imagen) — listado y single OTR */
.daher-datasheet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1.5px solid var(--otr-card-primary, #011b44);
  border-radius: 10px;
  background: #fff;
  color: var(--otr-card-primary, #011b44);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.daher-datasheet:hover {
  background: var(--otr-card-primary, #011b44);
  color: #fff;
}

.daher-datasheet i {
  font-size: 1.05em;
}

.daher-datasheet--large {
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  margin: 4px 0 8px;
}