/* ============================================================
   WooCommerce bridge — alinea el markup nativo de WC (avisos,
   formularios, botones, quantity, paginación) con la línea
   gráfica del diseño SubastaPro. Las plantillas override de
   woocommerce/ ya emiten las clases del diseño (.card--product,
   .cart-item, .checkout-*, .profile-*); este archivo cubre los
   nodos que WooCommerce genera por su cuenta.
   ============================================================ */

/* Quitar el theme wrapper por defecto de WC y dejar el layout al diseño */
.woocommerce,
.woocommerce-page {
  color: #0f172a;
}

/* Botones nativos de WC → look .btn--primary del diseño */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
  background: #4f46e5;
  color: #fff;
}
.woocommerce a.button.wc-backward,
.woocommerce .button.wc-backward {
  background: #fff;
  color: #6366f1;
  border: 1px solid #cbd5e1;
}
.woocommerce a.button.wc-backward:hover,
.woocommerce .button.wc-backward:hover {
  background: #f8fafc;
  color: #4f46e5;
}

/* Inputs / selects / textarea nativos de WC */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection,
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.woocommerce-account input[type="text"],
.woocommerce-account input[type="email"],
.woocommerce-account input[type="password"],
.woocommerce-account input[type="tel"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  color: #0f172a;
  background: #fff;
  line-height: 1.4;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-account input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}
.woocommerce form .form-row label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 6px;
}
.woocommerce form .form-row {
  margin-bottom: 16px;
}

/* Avisos (message / info / error) */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
.woocommerce-store-notice {
  border: 1px solid #e2e8f0;
  border-left: 4px solid #6366f1;
  background: #f8fafc;
  color: #0f172a;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 20px;
  list-style: none;
  font-size: 15px;
}
.woocommerce-error {
  border-left-color: #ef4444;
  background: #fef2f2;
}
.woocommerce-message {
  border-left-color: #10b981;
  background: #ecfdf5;
}
.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
  padding: 8px 16px;
  font-size: 14px;
}

/* Quantity input */
.woocommerce .quantity .qty {
  width: 64px;
  padding: 9px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
  color: #0f172a;
}

/* Precio */
.woocommerce .price,
.woocommerce .woocommerce-Price-amount {
  color: #0f172a;
  font-weight: 700;
}
.woocommerce del,
.woocommerce del .woocommerce-Price-amount {
  color: #94a3b8;
  font-weight: 400;
}

/* Paginación nativa de WC (fallback si el override no la cubre) */
.woocommerce nav.woocommerce-pagination ul {
  border: none;
  display: inline-flex;
  gap: 6px;
}
.woocommerce nav.woocommerce-pagination ul li {
  border: none;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #0f172a;
  background: #fff;
}
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}

/* Tabla de totales / cupón en carrito (fallback) */
.woocommerce table.shop_table {
  border-radius: 12px;
  border-color: #e2e8f0;
}

/* Ocultar el título de página duplicado que WC inserta en algunas plantillas */
.woocommerce-products-header__title.page-title {
  display: none;
}

/* Select2 (país/región del checkout) */
.woocommerce .select2-container--default .select2-selection--single {
  height: auto;
  padding: 5px 6px;
  border-radius: 10px;
  border-color: #cbd5e1;
}

/* Widget "Sección Tienda": el encabezado va alineado a la izquierda (badge,
   título y bajada), por si un contenedor de Elementor hereda text-align:center. */
.section--shop .section__header,
.section--shop .section__header__left {
  text-align: left;
}
.section--shop .section__header__left {
  -ms-flex-align: start;
  align-items: flex-start;
}

/* Precio en las cards de producto: el actual en negro, el original (oferta) en
   gris tachado. Se fuerza también el .woocommerce-Price-amount que genera
   wc_price(), para que herede el color correcto del diseño. */
.card .card__price__current,
.card__price__current .woocommerce-Price-amount,
.card__price__current bdi {
  color: #0f172a;
  font-weight: 700;
}
.card .card__price__original,
.card__price__original .woocommerce-Price-amount,
.card__price__original bdi {
  color: #94a3b8;
  font-weight: 400;
  text-decoration: line-through;
}

/* Enlace "Ver carrito" que WooCommerce añade tras el alta AJAX en las cards:
   se estiliza como botón outline del sitio (debajo del botón "Agregar"). */
.card__footer .added_to_cart.wc-forward {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  padding: 10px 20px;
  border: 2px solid #6366f1;
  border-radius: 10px;
  background: transparent;
  color: #6366f1;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.card__footer .added_to_cart.wc-forward:hover {
  background: #6366f1;
  color: #fff;
}

/* CTA primarios de WooCommerce con el look de los botones del sitio:
   "Finalizar compra" (carrito) y "Realizar pedido" (checkout). */
.woocommerce .wc-proceed-to-checkout .checkout-button,
.woocommerce #place_order,
.woocommerce-checkout #place_order {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.woocommerce .wc-proceed-to-checkout .checkout-button:hover,
.woocommerce #place_order:hover,
.woocommerce-checkout #place_order:hover {
  background: #4f46e5;
  color: #fff;
}

/* WooCommerce BLOCKS (bloques Carrito / Checkout) — CTA primario del sitio.
   Estas páginas usan el bloque (no el shortcode clásico), con markup propio:
   .wc-block-cart__submit-button (Finalizar compra) y
   .wc-block-components-checkout-place-order-button (Realizar el pedido). */
.wc-block-cart__submit-button,
a.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
button.wc-block-components-checkout-place-order-button {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  background: #6366f1 !important;
  background-image: none !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 15px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .2s ease;
}
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-checkout-place-order-button:not([disabled]):hover {
  background: #4f46e5 !important;
  color: #fff !important;
}
.wc-block-components-checkout-place-order-button[disabled],
.wc-block-components-checkout-place-order-button:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.wc-block-cart__submit-button .wc-block-components-button__text,
.wc-block-components-checkout-place-order-button .wc-block-components-button__text,
.wc-block-components-checkout-place-order-button__text {
  color: #fff !important;
}
