/*
 * Carrito de cotización.
 *
 * Paleta tomada de las variables globales del sitio para que no desentone:
 *   #0E3D24 verde principal · #FFC10D ámbar de acción · #38AB35 verde claro
 *
 * Todo va con prefijo .kohen-cart para no chocar con Elementor. Sus estilos
 * de botón se le ganan por especificidad, no con !important: ver el bloque
 * «Refuerzo de especificidad» al final del archivo.
 */

.kohen-cart-hidden {
  display: none !important;
}

/* ------------------------------------------------------------
   Botón del header, con el contador
   ------------------------------------------------------------ */
/* Solo el icono: cuadrado, para que pese lo mismo que los demás
   controles del encabezado y no compita con el logo. */
.kohen-cart-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #ffc10d;
  color: #1a1a1a;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.kohen-cart-toggle:hover,
.kohen-cart-toggle:focus-visible {
  background: #ffd452;
  color: #1a1a1a;
}

.kohen-cart-toggle svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.kohen-cart-toggle__count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #0e3d24;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

/* El contador se sale un poco del botón; con el botón cuadrado hay que
   dejarle aire para que no lo corte el borde del encabezado. */
.kohen-cart-toggle {
  margin: 0 6px;
}

/* ------------------------------------------------------------
   Bloque de acción en la ficha de producto
   ------------------------------------------------------------ */
.kohen-cart-add {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid #e9e4d8;
  border-radius: 12px;
  background: #faf8f3;
}

.kohen-cart-add__row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

/* La etiqueta va sobre su control, no al lado. */
.kohen-cart-add__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kohen-cart-add__label {
  display: block;
}

.kohen-cart-add__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kohen-cart-add__field--grow {
  flex: 1 1 220px;
  min-width: 0;
}

.kohen-cart-add__label {
  color: #262626;
  font-size: 13px;
  font-weight: 600;
}

.kohen-cart-add__label span {
  color: #5c5c5c;
  font-weight: 400;
}

.kohen-cart-add input[type='number'],
.kohen-cart-add input[type='text'] {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
  font-size: 15px;
  font-family: inherit;
}

.kohen-cart-add input[type='number'] {
  width: 90px;
  text-align: center;
}

.kohen-cart-add input[type='text'] {
  width: 100%;
}

.kohen-cart-add input:focus {
  border-color: #38ab35;
  outline: 2px solid rgba(56, 171, 53, 0.25);
  outline-offset: 1px;
}

/* Fila principal: el selector de cantidad a la izquierda y «Agregar al
   carrito» ocupando el resto. En móvil el botón baja a su propia línea. */
.kohen-cart-add__medida {
  margin-top: 14px;
}

.kohen-cart-add__medida input {
  width: 100%;
}

.kohen-cart-btn--comprar {
  flex: 1 1 240px;
  height: 46px;
}

.kohen-cart-add__wa {
  display: flex;
  width: 100%;
  margin-top: 10px;
  height: 46px;
}

@media (max-width: 560px) {
  .kohen-cart-add__row {
    align-items: stretch;
  }

  .kohen-cart-add__field {
    flex: 1 1 100%;
  }

  .kohen-cart-btn--comprar {
    flex-basis: 100%;
  }
}

.kohen-cart-add__opcional {
  color: #5c5c5c;
  font-weight: 400;
}

/* Selector de cantidad de la ficha: más alto que el del panel, para que
   quede a la altura de los botones. */
.kohen-cart-qty--grande {
  height: 46px;
}

.kohen-cart-qty--grande button {
  width: 42px;
  height: 100%;
  font-size: 19px;
}

.kohen-cart-qty--grande input {
  width: 62px;
  height: 100%;
  font-size: 15px;
  font-weight: 600;
}

.kohen-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.kohen-cart-btn--primary {
  background: #ffc10d;
  color: #1a1a1a;
}

.kohen-cart-btn--primary:hover {
  background: #ffd452;
  color: #1a1a1a;
}

.kohen-cart-btn--wa {
  background: #25d366;
  color: #fff;
}

.kohen-cart-btn--wa:hover {
  background: #1fb855;
  color: #fff;
}

.kohen-cart-btn--ghost {
  border: 1px solid #0e3d24;
  background: transparent;
  color: #0e3d24;
}

.kohen-cart-btn--ghost:hover {
  background: #e3f3e1;
  color: #0e3d24;
}

.kohen-cart-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.kohen-cart-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.kohen-cart-add__nota {
  margin: 12px 0 0;
  color: #5c5c5c;
  font-size: 13px;
  line-height: 1.5;
}

/* El precio encabeza el bloque: es el dato que la gente busca primero. */
.kohen-cart-add__precio {
  margin: 0 0 16px;
  color: #0e3d24;
  line-height: 1.2;
}

.kohen-cart-add__monto {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.kohen-cart-add__unidad {
  color: #5c5c5c;
  font-size: 17px;
  font-weight: 600;
}

.kohen-cart-add__precio small {
  display: block;
  margin-top: 4px;
  color: #5c5c5c;
  font-size: 12px;
  font-weight: 400;
}

/* ------------------------------------------------------------
   Panel lateral
   ------------------------------------------------------------ */
.kohen-cart-panel {
  position: fixed;
  inset: 0;
  z-index: 99999;
  visibility: hidden;
}

.kohen-cart-panel.is-open {
  visibility: visible;
}

.kohen-cart-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.kohen-cart-panel.is-open .kohen-cart-panel__backdrop {
  opacity: 1;
}

.kohen-cart-panel__box {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.kohen-cart-panel.is-open .kohen-cart-panel__box {
  transform: translateX(0);
}

.kohen-cart-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #e9e4d8;
}

.kohen-cart-panel__title {
  margin: 0;
  color: #0e3d24;
  font-size: 17px;
  font-weight: 700;
}

.kohen-cart-panel__sub {
  margin: 4px 0 0;
  color: #5c5c5c;
  font-size: 13px;
}

.kohen-cart-panel__close {
  flex: none;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5c5c5c;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.kohen-cart-panel__close:hover {
  background: #f1ede2;
  color: #1a1a1a;
}

.kohen-cart-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
}

.kohen-cart-panel__empty {
  padding: 40px 0;
  color: #5c5c5c;
  font-size: 14px;
  text-align: center;
  line-height: 1.6;
}

.kohen-cart-panel__foot {
  padding: 16px 20px;
  border-top: 1px solid #e9e4d8;
}

.kohen-cart-panel__foot .kohen-cart-btn {
  width: 100%;
}

.kohen-cart-panel__aviso {
  margin: 0 0 12px;
  color: #5c5c5c;
  font-size: 13px;
  line-height: 1.5;
}

.kohen-cart-panel__vaciar {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: #5c5c5c;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}

.kohen-cart-panel__vaciar:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

/* ------------------------------------------------------------
   Línea de producto (se reusa en el panel y en /cotizacion/)
   ------------------------------------------------------------ */
.kohen-cart-line {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #e9e4d8;
}

.kohen-cart-line:last-child {
  border-bottom: 0;
}

.kohen-cart-line__img {
  flex: none;
  width: 64px;
  height: 64px;
  border: 1px solid #e9e4d8;
  border-radius: 8px;
  background: #faf8f3;
  object-fit: contain;
}

.kohen-cart-line__main {
  flex: 1;
  min-width: 0;
}

.kohen-cart-line__name {
  display: block;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.kohen-cart-line__name:hover {
  color: #0e3d24;
}

.kohen-cart-line__meta {
  margin: 3px 0 0;
  color: #5c5c5c;
  font-size: 12px;
  line-height: 1.4;
}

.kohen-cart-line__precio {
  margin: 3px 0 0;
  color: #0e3d24;
  font-size: 13px;
  font-weight: 700;
}

.kohen-cart-line__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.kohen-cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.kohen-cart-qty button {
  width: 30px;
  height: 30px;
  border: 0;
  background: #fff;
  color: #5c5c5c;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.kohen-cart-qty button:hover {
  background: #f1ede2;
  color: #0e3d24;
}

.kohen-cart-qty input {
  width: 44px;
  height: 30px;
  border: 0;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  font-size: 13px;
  font-family: inherit;
  text-align: center;
}

.kohen-cart-qty input:focus {
  outline: 2px solid rgba(56, 171, 53, 0.25);
  outline-offset: -2px;
}

.kohen-cart-line__del {
  margin-left: auto;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #afafaf;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.kohen-cart-line__del:hover {
  background: #f1ede2;
  color: #1a1a1a;
}

/* ------------------------------------------------------------
   Página /cotizacion/
   ------------------------------------------------------------ */
.kohen-cot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.kohen-cot__title {
  margin: 0;
  color: #0e3d24;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.kohen-cot__lead {
  max-width: 640px;
  margin: 12px 0 0;
  color: #262626;
  font-size: 16px;
  line-height: 1.6;
}

.kohen-cot__grid {
  display: grid;
  gap: 32px;
  margin-top: 32px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .kohen-cot__grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

.kohen-cot__panel {
  padding: 20px;
  border: 1px solid #e9e4d8;
  border-radius: 12px;
  background: #faf8f3;
}

.kohen-cot__panel h2 {
  margin: 0 0 4px;
  color: #0e3d24;
  font-size: 18px;
  font-weight: 700;
}

.kohen-cot__lista {
  border: 1px solid #e9e4d8;
  border-radius: 12px;
  background: #fff;
  padding: 0 16px;
}

.kohen-cot__vacio {
  padding: 48px 20px;
  text-align: center;
  color: #5c5c5c;
  line-height: 1.6;
}

.kohen-cot__total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #5c5c5c;
  font-size: 14px;
}

.kohen-cot__total strong {
  color: #0e3d24;
}

.kohen-cot__field {
  display: block;
  margin-bottom: 12px;
}

.kohen-cot__field span {
  display: block;
  margin-bottom: 5px;
  color: #262626;
  font-size: 13px;
  font-weight: 600;
}

.kohen-cot__field span em {
  color: #5c5c5c;
  font-style: normal;
  font-weight: 400;
}

.kohen-cot__field input,
.kohen-cot__field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
  font-size: 14px;
  font-family: inherit;
}

.kohen-cot__field textarea {
  min-height: 110px;
  resize: vertical;
}

.kohen-cot__field input:focus,
.kohen-cot__field textarea:focus {
  border-color: #38ab35;
  outline: 2px solid rgba(56, 171, 53, 0.25);
  outline-offset: 1px;
}

.kohen-cot__msg {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.kohen-cot__msg--error {
  border: 1px solid #e5b4b4;
  background: #fdf2f2;
  color: #8a1f1f;
}

.kohen-cot__msg--ok {
  border: 1px solid #38ab35;
  background: #e3f3e1;
  color: #0e3d24;
}

.kohen-cot__ok {
  max-width: 620px;
  padding: 28px;
  border: 1px solid #38ab35;
  border-radius: 12px;
  background: #e3f3e1;
}

.kohen-cot__ok h2 {
  margin: 0 0 10px;
  color: #0e3d24;
  font-size: 22px;
}

.kohen-cot__ok p {
  margin: 0 0 10px;
  color: #262626;
  line-height: 1.6;
}

.kohen-cot__legal {
  margin: 10px 0 0;
  color: #5c5c5c;
  font-size: 12px;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   Refuerzo de especificidad frente al kit de Elementor
   ------------------------------------------------------------
   El tema trae esta regla en su CSS:

     .elementor-kit-8 .elementor-button,
     .elementor-kit-8 button { background-color: var(--e-global-color-text); … }

   El <body> lleva la clase `elementor-kit-8`, así que le pega a TODO
   <button> de la página con especificidad (0,1,1) —una clase y un
   elemento—. Las reglas de arriba son de una sola clase (0,1,0) y
   perdían: los botones del carrito salían con el gris casi negro del
   tema en lugar del ámbar de la marca, y con su tipografía y su
   relleno.

   Acá se repiten solo las propiedades que el kit pisa, con el mismo
   prefijo para ganarle limpio. Se evita !important a propósito: si
   mañana hay que ajustar un botón puntual, se puede.
   ------------------------------------------------------------ */
.elementor-kit-8 .kohen-cart-btn,
.elementor-kit-8 .kohen-cart-toggle {
  font-family: inherit;
  border: 0;
  transition: background-color 0.15s ease;
}

.elementor-kit-8 .kohen-cart-btn--primary,
.elementor-kit-8 .kohen-cart-btn--primary:visited,
.elementor-kit-8 .kohen-cart-toggle,
.elementor-kit-8 .kohen-cart-toggle:visited {
  background-color: #ffc10d;
  color: #1a1a1a;
  fill: #1a1a1a;
}

.elementor-kit-8 .kohen-cart-btn--primary:hover,
.elementor-kit-8 .kohen-cart-btn--primary:focus,
.elementor-kit-8 .kohen-cart-toggle:hover,
.elementor-kit-8 .kohen-cart-toggle:focus {
  background-color: #ffd452;
  color: #1a1a1a;
}

.elementor-kit-8 .kohen-cart-btn--wa,
.elementor-kit-8 .kohen-cart-btn--wa:visited {
  background-color: #25d366;
  color: #fff;
  fill: #fff;
}

.elementor-kit-8 .kohen-cart-btn--wa:hover,
.elementor-kit-8 .kohen-cart-btn--wa:focus {
  background-color: #1fb855;
  color: #fff;
}

.elementor-kit-8 .kohen-cart-btn--ghost,
.elementor-kit-8 .kohen-cart-btn--ghost:visited {
  border: 1px solid #0e3d24;
  background-color: transparent;
  color: #0e3d24;
}

.elementor-kit-8 .kohen-cart-btn--ghost:hover,
.elementor-kit-8 .kohen-cart-btn--ghost:focus {
  background-color: #e3f3e1;
  color: #0e3d24;
}

/* Los botones chicos del panel y de las líneas: el kit también les
   pone su fondo oscuro y su tipografía. */
.elementor-kit-8 .kohen-cart-qty button {
  background-color: #fff;
  color: #5c5c5c;
  font-family: inherit;
  font-size: 16px;
  padding: 0;
  border-radius: 0;
}

.elementor-kit-8 .kohen-cart-qty--grande button {
  font-size: 19px;
}

.elementor-kit-8 .kohen-cart-qty button:hover {
  background-color: #f1ede2;
  color: #0e3d24;
}

.elementor-kit-8 .kohen-cart-panel__close,
.elementor-kit-8 .kohen-cart-panel__vaciar,
.elementor-kit-8 .kohen-cart-line__del {
  background-color: transparent;
  font-family: inherit;
  border-radius: 6px;
}

.elementor-kit-8 .kohen-cart-panel__close {
  color: #5c5c5c;
  font-size: 22px;
  padding: 6px;
}

.elementor-kit-8 .kohen-cart-panel__vaciar {
  color: #5c5c5c;
  font-size: 13px;
  padding: 6px;
}

.elementor-kit-8 .kohen-cart-line__del {
  color: #afafaf;
  font-size: 13px;
  padding: 5px 8px;
}

.elementor-kit-8 .kohen-cart-panel__close:hover,
.elementor-kit-8 .kohen-cart-line__del:hover,
.elementor-kit-8 .kohen-cart-panel__vaciar:hover {
  background-color: #f1ede2;
  color: #1a1a1a;
}

/* El bloque de la ficha es una sección propia, no un elemento más de la
   fila de botones de Elementor: ocupa todo el ancho de la columna. */
.kohen-cart-add {
  width: 100%;
  max-width: 620px;
  box-sizing: border-box;
}

.kohen-cart-add *,
.kohen-cart-panel *,
.kohen-cot *:not(.prosa) {
  box-sizing: border-box;
}
