/*
 * PA Reservas — estilos para cart/checkout de WooCommerce (bloques)
 * Se encola solo en las páginas de carrito y checkout.
 */

/* ---------- responsive móvil ---------- */
/* alignwide del tema mete margin -80px: en móvil corre el bloque fuera de pantalla */
@media (max-width: 1024px) {
  .wp-block-woocommerce-cart.alignwide,
  .wp-block-woocommerce-checkout.alignwide { margin-left: 0 !important; margin-right: 0 !important; }
  /* respiro lateral: el contenedor va de borde a borde en móvil */
  .wp-block-woocommerce-cart,
  .wp-block-woocommerce-checkout { padding-left: 16px; padding-right: 16px; }
}

/* ---------- aire arriba/abajo (WC deja padding-bottom en 0 por defecto) ---------- */
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout {
  padding-top: 48px !important;
  padding-bottom: 64px !important;
}
/* el header de Elementor es position:fixed (~174px) desde 768px hacia arriba;
   al no estar en el flujo normal, tapa el contenido si no le dejamos lugar */
@media (min-width: 768px) {
  .wp-block-woocommerce-cart, .wp-block-woocommerce-checkout {
    padding-top: 200px !important;
  }
}

/* ---------- filas del formulario pegadas (WC deja row-gap:0 en el flex) ---------- */
.wc-block-components-address-form { row-gap: 16px !important; }

/* ---------- botones de WooCommerce (Finalizar compra / Realizar el pedido):
   sin esto heredan el link rosa de Hello Elementor, con subrayado y hover ilegible ---------- */
.wp-block-woocommerce-cart .wp-element-button,
.wp-block-woocommerce-checkout .wp-element-button {
  text-decoration: none !important;
  background-color: #241a12 !important;
  color: #ffffff !important;
  border: 1px solid #241a12 !important;
  border-radius: 6px !important;
  font-family: "Space Grotesk", sans-serif !important;
}
.wp-block-woocommerce-cart .wp-element-button:hover, .wp-block-woocommerce-cart .wp-element-button:focus,
.wp-block-woocommerce-checkout .wp-element-button:hover, .wp-block-woocommerce-checkout .wp-element-button:focus {
  background-color: #a3431f !important;
  border-color: #a3431f !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* ---------- estética de los campos (WC Blocks los deja con la fuente/borde del sistema) ---------- */
.wp-block-woocommerce-cart input[type=text], .wp-block-woocommerce-cart input[type=email],
.wp-block-woocommerce-cart input[type=tel], .wp-block-woocommerce-cart input[type=number],
.wp-block-woocommerce-cart select, .wp-block-woocommerce-cart textarea,
.wp-block-woocommerce-checkout input[type=text], .wp-block-woocommerce-checkout input[type=email],
.wp-block-woocommerce-checkout input[type=tel], .wp-block-woocommerce-checkout input[type=number],
.wp-block-woocommerce-checkout select, .wp-block-woocommerce-checkout textarea {
  border-radius: 6px !important;
  border-color: #d9c7a8 !important;
  font-family: "Space Grotesk", sans-serif !important;
}
.wp-block-woocommerce-cart input[type=text]:focus, .wp-block-woocommerce-cart input[type=email]:focus,
.wp-block-woocommerce-cart input[type=tel]:focus, .wp-block-woocommerce-cart input[type=number]:focus,
.wp-block-woocommerce-cart select:focus, .wp-block-woocommerce-cart textarea:focus,
.wp-block-woocommerce-checkout input[type=text]:focus, .wp-block-woocommerce-checkout input[type=email]:focus,
.wp-block-woocommerce-checkout input[type=tel]:focus, .wp-block-woocommerce-checkout input[type=number]:focus,
.wp-block-woocommerce-checkout select:focus, .wp-block-woocommerce-checkout textarea:focus {
  border-color: #a3431f !important;
  box-shadow: 0 0 0 3px rgba(163,67,31,.15) !important;
  outline: none !important;
}

/* el box del widget text-editor de Elementor genera ~1800px de alto fantasma
   con los bloques React de Woo: se elimina el box intermedio */
.elementor-widget-text-editor:has(> .wp-block-woocommerce-checkout),
.elementor-widget-text-editor:has(> .wp-block-woocommerce-cart) { display: contents; }

/* ---------- sin foto de producto ---------- */
/* checkout: fuera la foto; el contador de pax queda como chip navy */
.wc-block-components-order-summary-item__image img { display: none !important; }
.wc-block-components-order-summary-item__image { width: 24px !important; min-width: 24px !important; }
.wc-block-components-order-summary-item__quantity {
  position: static !important; transform: none !important; top: auto !important; right: auto !important;
  box-shadow: none !important; border: 0 !important; background: #a3431f !important; color: #ffffff !important;
  width: 24px; height: 24px; min-width: 24px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 12px;
}
.wc-block-components-order-summary-item__description { padding-left: 12px !important; }

/* cart: fuera la foto y su columna */
.wc-block-cart-item__image img { display: none !important; }
.wc-block-cart-item__image { width: 0 !important; min-width: 0 !important; padding: 0 !important; }
.wc-block-cart-item__product { padding-left: 0 !important; }
tr.wc-block-cart-items__row { grid-template-columns: 0 1fr !important; }

/* ---------- link "editar reserva" como botón, mismo ancho que el sidebar ---------- */
.pr-edit-cart { margin-top: 16px; width: 100%; box-sizing: border-box; }
.pr-edit-cart a {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  padding: 12px 16px; background: transparent; color: #a3431f !important;
  border: 1px solid #a3431f; border-radius: 6px;
  font-family: "Space Grotesk", sans-serif; font-size: 12.5px; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 500; text-decoration: none !important;
  transition: background .15s, color .15s;
}
.pr-edit-cart a:hover { background: #a3431f; color: #ffffff !important; }
