/**
 * Altitude Zone - WooCommerce Checkout Modern Branded Styles
 * Unifica el diseño del checkout con la nueva web en Astro.
 */

/* 1. Ocultar completamente cabeceras y pies antiguos de Elementor y descripciones deslocalizadas */
.wc-block-components-product-metadata__description,
.elementor-location-header,
.elementor-location-footer,
header.elementor,
footer.elementor,
.elementor-63,
.elementor-61,
#site-header,
#site-footer,
.site-header,
.site-footer {
  display: none !important;
}

/* 2. Tipografía global y fondo */
body {
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  background-color: #F8F9FA !important;
  color: #0B0D10 !important;
  margin: 0 !important;
  padding: 0 !important;
  -webkit-font-smoothing: antialiased;
}

/* 3. Cabecera oficial del Checkout */
.az-checkout-header {
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 14px 20px;
}
.az-chk-wrap {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.az-chk-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0B0D10;
}
.az-chk-mark {
  width: 44px;
  height: auto;
  max-height: 22px;
}
.az-chk-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0B0D10;
}
.az-chk-secure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #10B981;
  background: #ECFDF5;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #A7F3D0;
}
.az-chk-secure svg {
  width: 14px;
  height: 14px;
}
.az-chk-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.az-chk-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: #4B5563;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background-color 0.15s;
}
.az-chk-action-link:hover {
  color: #0B0D10;
  background-color: #F3F4F6;
}
.az-chk-action-link svg {
  width: 16px;
  height: 16px;
}
.az-chk-cart-link {
  position: relative;
  font-weight: 600;
  color: #0B0D10;
  background: #F3F4F6;
}
.az-chk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #D93829;
  color: #FFFFFF;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.az-chk-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  background: #D93829;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(217, 56, 41, 0.25);
}
.az-chk-action-btn:hover {
  background: #B52D20;
  color: #FFFFFF;
  transform: translateY(-1px);
}
.az-chk-action-btn svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 768px) {
  .az-chk-secure {
    display: none;
  }
}
@media (max-width: 480px) {
  .az-chk-action-link span {
    display: none;
  }
  .az-chk-action-link {
    padding: 6px;
  }
}

/* 4. Contenedor principal de Checkout y Carrito */
.woocommerce,
.woocommerce-page,
.entry-content,
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
  max-width: 1140px !important;
  margin: 24px auto 48px !important;
  padding: 0 16px !important;
}

/* Estilos de WooCommerce Blocks (Checkout y Carrito) */
.wc-block-checkout,
.wc-block-cart,
.wp-block-woocommerce-cart {
  font-family: inherit !important;
}

.wc-block-components-checkout-step,
.wc-block-cart__main,
.wp-block-woocommerce-cart-items-block {
  border: 1px solid #E5E7EB !important;
  background: #FFFFFF !important;
  border-radius: 12px !important;
  padding: 24px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.wc-block-cart__sidebar,
.wp-block-woocommerce-cart-totals-block {
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px !important;
  padding: 24px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.wc-block-components-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0B0D10 !important;
  letter-spacing: -0.01em !important;
}

/* Inputs y Selects */
.wc-block-components-text-input input,
.wc-block-components-combobox input,
.wc-block-components-combobox .wc-block-components-combobox__input,
.wc-block-components-textarea textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
select {
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  font-family: inherit !important;
  font-size: 14px !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}

/* Espaciado armónico para etiquetas flotantes de WooCommerce Blocks (evita colisión entre label y valor) */
.wc-block-components-text-input input,
.wc-block-components-combobox input,
.wc-block-components-combobox .wc-block-components-combobox__input {
  min-height: 54px !important;
  height: 54px !important;
  box-sizing: border-box !important;
  padding: 16px 14px 10px 14px !important;
}

.wc-block-components-text-input label,
.wc-block-components-combobox label {
  left: 14px !important;
}

.wc-block-components-text-input.is-active input,
.wc-block-components-combobox.is-active input,
.wc-block-components-combobox.is-active .wc-block-components-combobox__input,
.wc-block-components-text-input input:-webkit-autofill {
  padding-top: 24px !important;
  padding-bottom: 8px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.wc-block-components-text-input.is-active label,
.wc-block-components-combobox.is-active label {
  top: 8px !important;
  transform: none !important;
  font-size: 11px !important;
  line-height: 12px !important;
  color: #6B7280 !important;
}

.wc-block-components-textarea textarea {
  padding: 12px 14px !important;
}

.wc-block-components-text-input input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus {
  border-color: #0B0D10 !important;
  box-shadow: 0 0 0 2px rgba(11, 13, 16, 0.15) !important;
  outline: none !important;
}

/* Resumen del Pedido (Sidebar) */
.wc-block-checkout__sidebar {
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* Botón de Realizar Pedido (CTA Principal Rojo Altitude Zone) */
.wc-block-components-checkout-place-order-button,
button#place_order,
.wc-block-cart__submit-button {
  background-color: #D93829 !important;
  border: none !important;
  color: #FFFFFF !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  border-radius: 999px !important;
  padding: 14px 28px !important;
  cursor: pointer !important;
  transition: background-color 0.15s, transform 0.1s !important;
  box-shadow: 0 4px 14px rgba(217, 56, 41, 0.28) !important;
  width: 100% !important;
}

.wc-block-components-checkout-place-order-button:hover,
button#place_order:hover,
.wc-block-cart__submit-button:hover {
  background-color: #B52D20 !important;
  transform: translateY(-1px) !important;
}

/* Badge de precio y total */
.wc-block-components-order-summary-item__quantity {
  background-color: #0B0D10 !important;
  color: #FFFFFF !important;
  border-radius: 999px !important;
}

/* 5. Pie oficial del Checkout */
.az-checkout-footer {
  background: #FFFFFF;
  border-top: 1px solid #E5E7EB;
  padding: 32px 20px;
  margin-top: 60px;
}
.az-chk-foot-wrap {
  flex-direction: column;
  text-align: center;
  gap: 12px;
}
.az-chk-copy {
  margin: 0;
  font-size: 13.5px;
  color: #6B7280;
  font-weight: 500;
}
.az-chk-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 4px 0;
}
.az-chk-links a {
  font-size: 13px;
  color: #4B5563;
  text-decoration: none;
  transition: color 0.15s;
}
.az-chk-links a:hover {
  color: #0B0D10;
  text-decoration: underline;
}
.az-chk-safe {
  margin: 0;
  font-size: 12px;
  color: #9CA3AF;
}
