/* =========================================================
   LOQUIERO — SINGLE PRODUCT · BUYFLOW
   Archivo: buyflow.css (o equivalente)
   Objetivo:
   - Ocultar cantidad (solo 1 unidad)
   - Normalizar paddings
   - Reestilizar botón nativo de Woo
   ========================================================= */


/* =========================================================
   1. OCULTAR SELECTOR DE CANTIDAD
   ---------------------------------------------------------
   En LoQuiero vendemos 1 unidad por producto.
   Ocultamos:
   - input puntual (Woo genera IDs dinámicos)
   - contenedor .quantity por seguridad
   ========================================================= */

/* Input puntual generado por Woo */
input#quantity_6985503651b77 {
  display: none;
}

/* Contenedor general de cantidad */
.quantity {
  display: none !important;
}


/* =========================================================
   2. AJUSTES DE LAYOUT — VARIACIONES
   ---------------------------------------------------------
   Padding lateral consistente para:
   - selector de variaciones
   - botón comprar
   ========================================================= */




/* =========================================================
   3. BUYFLOW RESET
   ---------------------------------------------------------
   Normalizamos box-model SOLO dentro del buyflow
   para evitar conflictos con estilos globales
   ========================================================= */

.lqsp-buyflow * {
  box-sizing: border-box;
}


/* =========================================================
   4. BOTONES DE COMPRA — SKIN LOQUIERO
   ---------------------------------------------------------
   .lq-btn-buy-now (P): Comprar ahora (Negro)
   .single_add_to_cart_button (S): Agregar al carrito (Gris)
   ========================================================= */

.lqsp-buyflow .button,
.lqsp-buyflow .lq-btn-buy-now,
.lqsp-buyflow .single_add_to_cart_button {
  /* --- Reset visual --- */
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;

  /* --- Layout --- */
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 58px !important; /* Ligeramente más alto */

  /* --- Estilo visual --- */
  border-radius: 18px !important; /* Radio más suave Apple */
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Tipografía --- */
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  text-decoration: none !important;
}

/* BOTÓN PRIMARIO: Comprar ahora */
.lqsp-buyflow .lq-btn-buy-now {
  background-color: var(--loq-primary) !important;
  color: #ffffff !important;
  margin-bottom: 0 !important;
  box-shadow: 0 4px 12px rgb(var(--loq-brand-cyan-rgb) / 0.3);
}

/* BOTÓN SECUNDARIO: Añadir al carrito (Convertido en Link Sutil) */
.lqsp-buyflow .lq-btn-add-cart {
  background-color: transparent !important;
  color: #86868b !important; /* Gris Apple */
  border: none !important;
  height: auto !important;
  margin-top: 4px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.lqsp-buyflow .lq-btn-add-cart:hover {
  background-color: transparent !important;
  color: #1d1d1f !important;
  text-decoration: underline !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ESTADOS */
.lqsp-buyflow .button:hover,
.lqsp-buyflow .lq-btn-buy-now:hover,
.lqsp-buyflow .single_add_to_cart_button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* Hover específico para el primario */
.lqsp-buyflow .lq-btn-buy-now:hover {
  background-color: var(--loq-primary) !important;
}

/* Hover específico para el ghost */
.lqsp-buyflow .single_add_to_cart_button:hover {
  background-color: #f8f9fa !important;
}

.lqsp-buyflow .button:active,
.lqsp-buyflow .lq-btn-buy-now:active,
.lqsp-buyflow .single_add_to_cart_button:active {
  transform: translateY(0);
}

.lqsp-buyflow .button:disabled,
.lqsp-buyflow .lq-btn-buy-now:disabled,
.lqsp-buyflow .single_add_to_cart_button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* =========================================================
   6. ESPACIADO FINAL DEL BLOQUE DE COMPRA
   ---------------------------------------------------------
   Separación visual entre:
   - métodos de pago
   - botón comprar
   ========================================================= */

.lqsp-buyflow .woocommerce-variation-add-to-cart {
  margin-top: 0;
}
/* Keep native variation selectors available while custom CTAs submit the
   same WooCommerce form. Simple products keep the native form hidden. */
.lq-native-form-wrapper--options-visible {
  display: block !important;
  visibility: visible !important;
  width: 100%;
  height: auto !important;
  overflow: visible !important;
}

.lqsp-buyflow .lq-native-form-wrapper--options-visible .single_add_to_cart_button,
.lqsp-buyflow .lq-native-form-wrapper--options-visible .lq-btn-buy-now,
.lqsp-buyflow .lq-native-form-wrapper--options-visible .quantity {
  display: none !important;
}

/* Native WooCommerce variation choices: keep one selector, before purchase actions. */
body.single-product:has(.lq-native-form-wrapper--options-visible) .lqsp-titleflow > .lq-color-strip {
  display: none !important;
}

.lqsp-buyflow .lq-native-form-wrapper--options-visible {
  order: -1;
}

.lqsp-buyflow .lq-native-form-wrapper--options-visible .loq-attr-label {
  display: block;
  margin: 0 0 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.lqsp-buyflow .lq-native-form-wrapper--options-visible .lq-color-strip__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 720px;
  margin: 0;
  padding: 4px 2px 8px;
}

.lqsp-buyflow .lq-native-form-wrapper--options-visible .lq-color-card {
  width: 100%;
  min-width: 0;
  max-width: 136px;
  min-height: 0;
  flex: initial;
  scroll-snap-align: initial;
}

/* The price block owns display pricing; retain Woo variation stock only. */
.lqsp-buyflow .lq-native-form-wrapper--options-visible .woocommerce-variation-price {
  display: none !important;
}

/* GDS-CONSUMER-V1
{
  "schema_version": 1,
  "consumer_id": "gds.module.pdp-buy-flow",
  "kind": "module",
  "source": "inc/integrations/loq-panel/modules/global/pdp-layout/blocks/pdp_buy_flow/frontend.css",
  "token_paths": ["colors.text", "typography.body_family", "layout.grid_gap_y", "button.height", "button.padding_x", "button.radius", "button.weight", "geometry.border_width", "colors.primary", "colors.on_primary", "typography.heading_family", "typography.sizes.h2", "typography.sizes.h3", "typography.weights.heading", "typography.line_heights.heading"],
  "uses": ["gds.primitive.button", "gds.adapter.woocommerce-primary-actions"],
  "variants": [],
  "surfaces": ["pdp"],
  "responsive_context": {"breakpoints_px": []},
  "evidence": {"type": "source_boundary", "ref": "inc/integrations/loq-panel/modules/global/pdp-layout/blocks/pdp_buy_flow/render.php"},
  "coverage": "PARTIAL"
}
END-GDS-CONSUMER-V1 */
/* Direct GDS v1 consumer: pdp buy flow */
html[data-gds-version="1"] .lqsp-buyflow { color:var(--gds-color-text);font-family:var(--gds-font-body);gap:var(--gds-grid-gap-y); }

/* WooCommerce owns this generated purchase control; the module scopes its visual contract. */
html[data-gds-version="1"] .lqsp-buyflow .single_add_to_cart_button { min-height:var(--gds-button-height); padding-inline:var(--gds-button-padding-x); border:var(--gds-border-width) solid var(--gds-color-primary); border-radius:var(--gds-button-radius); background:var(--gds-color-primary); color:var(--gds-color-on-primary); font-family:var(--gds-font-body); font-weight:var(--gds-button-weight); }

/* Module-owned conventional heading consumes the GDS type scale. */
html[data-gds-version="1"] .lqsp-buyflow h2 {
  color: var(--gds-color-text);
  font-family: var(--gds-font-heading);
  font-size: var(--gds-font-size-h2);
  font-weight: var(--gds-font-weight-heading);
  line-height: var(--gds-line-height-heading);
}
html[data-gds-version="1"] .lqsp-buyflow h3 {
  color: var(--gds-color-text);
  font-family: var(--gds-font-heading);
  font-size: var(--gds-font-size-h3);
  font-weight: var(--gds-font-weight-heading);
  line-height: var(--gds-line-height-heading);
}
