/* ==========================================================================
   Bonsáis La Perla — WooCommerce
   Catálogo "rótulo de exposición", ficha de ejemplar único y carrito.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Botones y avisos nativos de WooCommerce
   -------------------------------------------------------------------------- */
body.blp-theme a.button,
body.blp-theme button.button,
body.blp-theme input.button,
body.blp-theme #respond input#submit,
body.blp-theme .single_add_to_cart_button,
body.blp-theme .wc-block-components-button:not(.is-link) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--blp-font-sans);
  font-size: var(--blp-text-base);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  background-color: var(--blp-color-primary);
  border: 1px solid var(--blp-color-primary);
  border-radius: var(--blp-radius-md);
  box-shadow: var(--blp-shadow-sm);
  transition: background-color var(--blp-transition-base), transform var(--blp-transition-base), box-shadow var(--blp-transition-base);
}
body.blp-theme a.button:hover,
body.blp-theme button.button:hover,
body.blp-theme input.button:hover,
body.blp-theme #respond input#submit:hover,
body.blp-theme .single_add_to_cart_button:hover,
body.blp-theme .wc-block-components-button:not(.is-link):hover {
  color: #fff;
  background-color: var(--blp-color-primary-hover);
  border-color: var(--blp-color-primary-hover);
  box-shadow: var(--blp-shadow-md);
  transform: translateY(-1px);
}
body.blp-theme a.button.disabled,
body.blp-theme button.button:disabled,
body.blp-theme button.button.disabled {
  background-color: #e2dbd2;
  border-color: #e2dbd2;
  color: #6f635f;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

body.blp-theme .woocommerce-message,
body.blp-theme .woocommerce-info,
body.blp-theme .woocommerce-error {
  background: var(--blp-color-card);
  color: var(--blp-color-dark);
  border: 1px solid var(--blp-color-border);
  border-left: 4px solid var(--blp-color-primary);
  border-radius: var(--blp-radius-md);
}
body.blp-theme .woocommerce-error { border-left-color: var(--blp-state-sold); }
body.blp-theme .woocommerce-message::before,
body.blp-theme .woocommerce-info::before { color: var(--blp-color-primary); }

/* Oferta: pastilla tipo sello, no círculo genérico */
body.blp-theme span.onsale {
  min-height: 0;
  min-width: 0;
  padding: 0.25rem 0.625rem;
  line-height: 1.2;
  font-size: var(--blp-text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blp-color-pearl);
  background: var(--blp-color-dark);
  border: 1px solid var(--blp-color-gold-line);
  border-radius: var(--blp-radius-sm);
}

/* --------------------------------------------------------------------------
   2. Catálogo: tarjeta "rótulo de exposición"
   -------------------------------------------------------------------------- */
body.blp-theme ul.products li.product {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--blp-color-card);
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-lg);
  box-shadow: none;
  transition: box-shadow var(--blp-transition-base), transform var(--blp-transition-smooth), border-color var(--blp-transition-base);
}
body.blp-theme ul.products li.product:hover {
  border-color: var(--blp-color-border);
  box-shadow: var(--blp-shadow-lg);
  transform: translateY(-3px);
}
body.blp-theme ul.products li.product a img {
  margin: 0;
  background: var(--blp-color-pearl-soft);
}

/* Imagen vertical 3:4 sin recortar el árbol */
body.blp-theme ul.products li.product a.woocommerce-loop-image-link { display: block; overflow: hidden; background: var(--blp-color-pearl-soft); }
body.blp-theme ul.products li.product a.woocommerce-loop-image-link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 40%;
}

/* Cuadrícula adaptable: tantas columnas como quepan (tarjetas de ≥ 13,5 rem). En pantallas grandes la zona de
   la tienda se ensancha para aprovechar el ancho (Kadence la limita a 1290 px). */
@media (min-width: 641px) {
  body.blp-theme.blp-has-filters .content-container ul.products.grid-cols:not(.products-list-view) {
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
    gap: 1.5rem;
  }
}
@media (min-width: 1025px) {
  body.blp-theme.blp-has-filters .content-container.site-container { max-width: min(2200px, 100%); }
}

/* Vista de lista (botón de Kadence): una tarjeta por fila, imagen a la izquierda y texto a la derecha */
body.blp-theme ul.products.products-list-view { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
body.blp-theme ul.products.products-list-view li.product {
  display: grid;
  grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);
  align-items: stretch;
}
body.blp-theme ul.products.products-list-view li.product a.woocommerce-loop-image-link { height: 100%; min-height: 11rem; max-height: 14rem; }
body.blp-theme ul.products.products-list-view li.product a.woocommerce-loop-image-link img { height: 100%; aspect-ratio: auto; }
body.blp-theme ul.products.products-list-view li.product .product-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  border-top: 0;
  border-left: 3px solid var(--blp-color-primary);
}
body.blp-theme ul.products.products-list-view li.product .product-excerpt { margin-top: 0.5rem; font-size: var(--blp-text-sm); color: var(--blp-color-dark-subtle); }
body.blp-theme ul.products.products-list-view li.product .product-excerpt p {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
body.blp-theme ul.products.products-list-view li.product .product-action-wrap { margin-top: 0.75rem; }

/* Insignias sobre la imagen */
body.blp-theme ul.products li.product .blp-loop-badges {
  position: absolute;
  z-index: 3;
  top: 0.625rem;
  left: 0.625rem;
  right: 0.625rem;
  pointer-events: none;
}

/* Zona de texto */
body.blp-theme ul.products li.product .product-details,
body.blp-theme ul.products li.product .woocommerce-loop-product__title {
  padding-inline: 1.125rem;
}
body.blp-theme ul.products li.product .product-details {
  padding-top: 1rem;
  padding-bottom: 1.25rem;
  border-top: 3px solid var(--blp-color-primary);
}
body.blp-theme ul.products li.product .woocommerce-loop-product__title {
  margin: 0;
  padding-inline: 0;
  font-family: var(--blp-font-display);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--blp-color-primary);
}
.blp-botanical--loop { margin: 0.25rem 0 0; }
.blp-loop-dim {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0.5rem 0 0;
  font-size: var(--blp-text-sm);
  color: var(--blp-color-muted);
  font-feature-settings: 'tnum';
}
.blp-loop-dim-icon { width: 1rem; height: 1rem; color: var(--blp-color-primary); }
body.blp-theme ul.products li.product .price {
  margin-top: 0.75rem;
  font-family: var(--blp-font-sans);
  font-weight: 600;
  font-size: var(--blp-text-lg);
  font-feature-settings: 'tnum';
  color: var(--blp-color-dark);
}
body.blp-theme ul.products li.product .price del { color: var(--blp-color-muted); font-weight: 400; }
body.blp-theme ul.products li.product .price ins { text-decoration: none; }

/* --------------------------------------------------------------------------
   3. Ficha de ejemplar
   -------------------------------------------------------------------------- */
body.blp-theme.single-product div.product .product_title {
  margin: 0.5rem 0 0.25rem;
  font-family: var(--blp-font-display);
  font-weight: 400;
  font-size: clamp(1.875rem, 1.4rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  color: var(--blp-color-primary);
}
.blp-botanical--single {
  margin: 0 0 1rem;
  font-size: var(--blp-text-xl);
}
body.blp-theme.single-product div.product .badges-group,
body.blp-theme.single-product .blp-badges-group { margin-bottom: 0.5rem; }

body.blp-theme.single-product div.product p.price,
body.blp-theme.single-product div.product span.price {
  display: block;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  font-family: var(--blp-font-sans);
  font-weight: 700;
  font-size: var(--blp-text-3xl);
  font-feature-settings: 'tnum';
  color: var(--blp-color-dark);
  border-bottom: 1px solid var(--blp-color-border-subtle);
}
body.blp-theme.single-product div.product .woocommerce-product-details__short-description {
  color: var(--blp-color-dark-subtle);
}
body.blp-theme.single-product div.product p.stock { font-weight: 600; font-size: var(--blp-text-sm); }
body.blp-theme.single-product div.product p.stock.in-stock { color: var(--blp-state-acclimated); }
body.blp-theme.single-product div.product p.stock.out-of-stock { color: var(--blp-state-sold); }

/* Compra: botón grande y WhatsApp debajo, en columna */
body.blp-theme.single-product div.product form.cart {
  margin-bottom: 0.75rem;
}
body.blp-theme.single-product div.product form.cart .single_add_to_cart_button {
  width: 100%;
  padding-block: 1.0625rem;
  font-size: var(--blp-text-lg);
}
body.blp-theme.single-product div.product .blp-btn-whatsapp {
  display: flex;
  width: 100%;
  margin-bottom: 0.5rem;
}

/* Confianza logística */
.blp-trust {
  display: grid;
  gap: 0.625rem;
  margin: 1.25rem 0 0;
  padding: 1rem 1.125rem;
  list-style: none;
  background: var(--blp-color-surface);
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-md);
}
.blp-trust li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  font-size: var(--blp-text-sm);
  color: var(--blp-color-dark-subtle);
}
.blp-trust-icon { width: 1.375rem; height: 1.375rem; margin-top: 0.0625rem; color: var(--blp-color-primary); }

/* Metadatos nativos (SKU, categorías): discretos pero legibles (los span anidados no encogen el texto) */
body.blp-theme.single-product div.product .product_meta {
  margin-top: 1rem;
  font-size: var(--blp-text-sm);
  letter-spacing: 0.02em;
  color: var(--blp-color-muted);
}
body.blp-theme.single-product div.product .product_meta span,
body.blp-theme.single-product div.product .product_meta a { font-size: inherit; }

/* Galería: marco de exposición */
body.blp-theme.single-product div.product .woocommerce-product-gallery .flex-viewport,
body.blp-theme.single-product div.product .woocommerce-product-gallery__wrapper {
  border-radius: var(--blp-radius-lg);
  overflow: hidden;
  background: var(--blp-color-pearl-soft);
  border: 1px solid var(--blp-color-border);
}
body.blp-theme.single-product div.product .flex-control-thumbs li img {
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-md);
  opacity: 0.7;
  transition: opacity var(--blp-transition-fast), border-color var(--blp-transition-fast);
}
body.blp-theme.single-product div.product .flex-control-thumbs li img:hover,
body.blp-theme.single-product div.product .flex-control-thumbs li img.flex-active {
  opacity: 1;
  border-color: var(--blp-color-primary);
}

/* Ficha técnica Key–Value */
.blp-specs {
  clear: both;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--blp-color-card);
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-lg);
}
body.blp-theme .blp-specs-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  font-family: var(--blp-font-display);
  font-size: var(--blp-text-2xl);
  border-bottom: 3px double var(--blp-color-border);
}
.blp-specs-icon { width: 1.5rem; height: 1.5rem; color: var(--blp-color-primary); }
.blp-specs-list { margin: 0; }
.blp-spec-row {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--blp-color-border-subtle);
  font-size: var(--blp-text-sm);
}
.blp-spec-row:last-child { border-bottom: 0; }
.blp-spec-row dt { margin: 0; font-weight: 500; color: var(--blp-color-muted); }
.blp-spec-row dd { margin: 0; color: var(--blp-color-dark); font-feature-settings: 'tnum'; }
.blp-spec-row--highlight { padding: 0.75rem; margin-top: 0.5rem; background: #faf8f5; border-radius: var(--blp-radius-md); border-bottom: 0; }

/* Pestañas */
body.blp-theme.single-product .woocommerce-tabs ul.tabs { border-bottom: 1px solid var(--blp-color-border); }
body.blp-theme.single-product .woocommerce-tabs ul.tabs li a {
  font-family: var(--blp-font-sans);
  font-weight: 600;
  font-size: var(--blp-text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blp-color-muted);
}
body.blp-theme.single-product .woocommerce-tabs ul.tabs li.active a,
body.blp-theme.single-product .woocommerce-tabs ul.tabs li a:hover { color: var(--blp-color-primary); }
body.blp-theme.single-product .woocommerce-tabs ul.tabs li.active { border-bottom-color: var(--blp-color-primary); }

/* Productos relacionados */
body.blp-theme.single-product .related.products > h2,
body.blp-theme.single-product .up-sells > h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

/* --------------------------------------------------------------------------
   4. Garantía de transporte de ser vivo
   -------------------------------------------------------------------------- */
.blp-guarantee {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  margin-block: 1.5rem;
  background: var(--blp-color-surface);
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-md);
}
.blp-guarantee-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--blp-color-primary);
  background: var(--blp-color-card);
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-full);
}
.blp-guarantee-icon .blp-icon { width: 1.5rem; height: 1.5rem; }
body.blp-theme .blp-guarantee-title { margin: 0 0 0.25rem; font-size: var(--blp-text-base); }
.blp-guarantee-text { margin: 0; font-size: var(--blp-text-sm); line-height: 1.55; color: var(--blp-color-muted); }

/* Aviso de plazos de envío (carrito y pago) */
.blp-ship-note {
  padding: 1.25rem 1.5rem;
  margin-block: 1.5rem;
  background: var(--blp-color-surface);
  border: 1px solid var(--blp-color-border);
  border-left: 3px solid var(--blp-color-primary);
  border-radius: var(--blp-radius-md);
  font-size: var(--blp-text-sm);
  line-height: 1.55;
  color: var(--blp-color-muted);
}
body.blp-theme .blp-ship-note__title { margin: 0 0 0.5rem; font-size: var(--blp-text-base); color: var(--blp-color-dark); }
.blp-ship-note ul { margin: 0 0 0.5rem; padding-left: 1.125rem; }
.blp-ship-note li + li { margin-top: 0.25rem; }
.blp-ship-note p { margin: 0; }

/* --------------------------------------------------------------------------
   5. Tienda: buscador, menú de categorías y filtros
   -------------------------------------------------------------------------- */
.blp-filters__panel {
  padding: 1.25rem;
  background: var(--blp-color-card);
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-lg);
}
.blp-filters__toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.blp-filters__toggle::-webkit-details-marker { display: none; }
.blp-filters__toggle-icon { width: 1.25rem; height: 1.25rem; color: var(--blp-color-primary); }

.blp-filter-search { position: relative; margin: 0 0 1.5rem; }
.blp-filter-search input[type='search'] {
  width: 100%;
  height: 2.75rem;
  padding: 0 2.75rem 0 0.875rem;
  font-family: var(--blp-font-sans);
  font-size: var(--blp-text-sm);
  color: var(--blp-color-dark);
  background: var(--blp-color-surface);
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-md);
}
.blp-filter-search input[type='search']:focus { border-color: var(--blp-color-primary); background: #fff; outline: none; }
.blp-filter-search__btn {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--blp-color-primary);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.blp-filter-search__btn .blp-icon { width: 1.25rem; height: 1.25rem; }

/* Listas del panel sin sangrado heredado de Kadence/WordPress */
body.blp-theme .blp-filters ul { margin: 0; padding: 0; list-style: none; }
body.blp-theme .blp-filters li { margin: 0; padding: 0; list-style: none; }
body.blp-theme .blp-cats ul { margin-left: 0.25rem; padding-left: 0.875rem; }
.blp-filters ::placeholder { color: var(--blp-color-muted); opacity: 1; }

.blp-filter-block { margin: 0 0 1.5rem; padding-top: 1.25rem; border-top: 3px double var(--blp-color-border); }
.blp-filter-search + .blp-filter-block { border-top: 0; padding-top: 0; }
body.blp-theme .blp-filter-title {
  margin: 0 0 0.75rem;
  font-family: var(--blp-font-sans);
  font-size: var(--blp-text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blp-color-dark-subtle);
}

/* Categorías: el árbol se despliega solo en la rama activa */
.blp-cats, .blp-cats ul { margin: 0; padding: 0; list-style: none; }
.blp-cats li { margin: 0; font-size: var(--blp-text-sm); line-height: 1.4; }
.blp-cats a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.25rem 0;
  color: var(--blp-color-dark);
  text-decoration: none;
}
body.blp-theme .blp-cats a:hover { color: var(--blp-color-primary); text-decoration: underline; }
.blp-cats ul { padding-left: 0.875rem; margin-left: 0.25rem; border-left: 1px solid var(--blp-color-border); display: none; }
.blp-cats .blp-cats__toggle[aria-expanded='true'] ~ ul { display: block; }
/* Botón «+» / «−» de las categorías con subcategorías */
.blp-cats li { position: relative; }
.blp-cats .blp-cats__toggle {
  position: absolute;
  top: 0.2rem;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font: inherit;
  color: var(--blp-color-primary);
  background: transparent;
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-md);
  cursor: pointer;
}
.blp-cats .blp-cats__toggle:hover, .blp-cats .blp-cats__toggle:focus-visible { border-color: var(--blp-color-primary); background: var(--blp-color-pearl-soft); }
.blp-cats__icon::before { content: '+'; font-size: 1.25rem; font-weight: 600; line-height: 1; }
.blp-cats .blp-cats__toggle[aria-expanded='true'] .blp-cats__icon::before { content: '\2212'; }
.blp-cats li:has(> .blp-cats__toggle) > a { max-width: calc(100% - 2.75rem); }
.blp-cats li.current-cat > a,
.blp-cats li.current-cat-parent > a,
.blp-cats li.current-cat-ancestor > a { font-weight: 600; color: var(--blp-color-primary); }
.blp-cats .count { margin-left: 0.25rem; font-size: var(--blp-text-xs); color: var(--blp-color-muted); font-feature-settings: 'tnum'; }

/* Tamaño: botones tipo "rótulo" */
.blp-chips { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.blp-chips li { margin: 0; }
body.blp-theme .blp-chip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  color: var(--blp-color-dark);
  text-decoration: none;
  background: var(--blp-color-surface);
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-md);
  transition: border-color var(--blp-transition-fast), background-color var(--blp-transition-fast);
}
.blp-chip strong { font-family: var(--blp-font-sans); font-weight: 600; font-size: var(--blp-text-sm); }
.blp-chip span { font-size: var(--blp-text-xs); color: var(--blp-color-muted); }
body.blp-theme .blp-chip:hover { border-color: var(--blp-color-primary); color: var(--blp-color-dark); }
body.blp-theme .blp-chip.is-active { color: #fff; background: var(--blp-color-primary); border-color: var(--blp-color-primary); }
body.blp-theme .blp-chip.is-active span { color: var(--blp-color-pearl); }

/* Precio */
.blp-price__row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.blp-price__row label { flex: 1; min-width: 0; }
.blp-price__row input[type='number'] {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.625rem;
  font-family: var(--blp-font-sans);
  font-size: var(--blp-text-sm);
  font-feature-settings: 'tnum';
  background: var(--blp-color-surface);
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-md);
}
.blp-price__row input[type='number']:focus { border-color: var(--blp-color-primary); background: #fff; outline: none; }
.blp-price__sep { color: var(--blp-color-muted); }
.blp-price__btn { width: 100%; padding-block: 0.625rem; font-size: var(--blp-text-sm); }

/* Filtros por tipo de producto (chips pequeños que se ajustan a la línea) */
.blp-chips--wrap { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.blp-chips--scroll { max-height: 13rem; overflow-y: auto; padding-right: 0.25rem; }
body.blp-theme .blp-chip--sm { padding: 0.4rem 0.75rem; min-height: 2.25rem; }
body.blp-theme .blp-chip--sm strong { font-weight: 500; }

/* Medidas de la maceta */
.blp-dims__hint { margin: -0.25rem 0 0.75rem; font-size: var(--blp-text-xs); color: var(--blp-color-muted); }
.blp-dims__row { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.4rem; margin-bottom: 0.6rem; }
.blp-dims__label { font-size: var(--blp-text-sm); font-weight: 600; }
.blp-dims__row label { min-width: 0; }
.blp-dims__row input[type='number'] {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.5rem;
  font-family: var(--blp-font-sans);
  font-size: var(--blp-text-sm);
  font-feature-settings: 'tnum';
  background: var(--blp-color-surface);
  border: 1px solid var(--blp-color-border);
  border-radius: var(--blp-radius-md);
}
.blp-dims__row input[type='number']:focus { border-color: var(--blp-color-primary); background: #fff; outline: none; }
.blp-dims .blp-price__btn { margin-top: 0.25rem; }

.blp-filter-clear { margin: 0; text-align: center; font-size: var(--blp-text-sm); }

/* La barra lateral de Kadence queda en la columna izquierda; en móvil pasa arriba y se pliega */
@media (min-width: 1025px) {
  body.blp-theme #secondary .blp-filters { position: sticky; top: 1.5rem; }
}
@media (max-width: 1024px) {
  /* En móvil Kadence apila #primary y #secondary en bloque y la barra lateral queda al final.
     Con panel de filtros presente, el contenedor pasa a columna y el panel sube arriba. */
  body.blp-theme.blp-has-filters .content-container { display: flex; flex-direction: column; }
  body.blp-theme.blp-has-filters .content-container > #primary,
  body.blp-theme.blp-has-filters .content-container > #secondary { width: 100%; max-width: 100%; }
  body.blp-theme.blp-has-filters .content-container > #secondary { order: -1; margin: 0 0 1.25rem; }
  .blp-filters__toggle { display: flex; margin: -0.25rem 0 1rem; }
  .blp-filters__panel:not([open]) { padding-block: 0.875rem; }
  .blp-filters__panel:not([open]) .blp-filters__toggle { margin: 0; }
}

/* --------------------------------------------------------------------------
   6. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .blp-spec-row { grid-template-columns: 1fr; gap: 0.125rem; }
  .blp-specs { padding: 1.125rem; }

  /* Catálogo en 2 columnas: menos scroll y fichas compactas */
  body.blp-theme ul.products.grid-cols:not(.products-list-view) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  /* Lista en móvil: imagen más estrecha y sin descripción */
  body.blp-theme ul.products.products-list-view li.product { grid-template-columns: 7.5rem minmax(0, 1fr); }
  body.blp-theme ul.products.products-list-view li.product .product-details { padding: 0.875rem 1rem; }
  body.blp-theme ul.products.products-list-view li.product .product-excerpt { display: none; }
  /* Con miniatura estrecha, las insignias tapaban el árbol: solo la primera y en la parte inferior */
  body.blp-theme ul.products.products-list-view li.product .blp-loop-badges { top: auto; bottom: 0.375rem; }
  body.blp-theme ul.products.products-list-view li.product .blp-loop-badges .blp-badge:not(:first-child) { display: none; }
  body.blp-theme ul.products li.product .product-details { padding: 0.75rem 0.75rem 1rem; }
  body.blp-theme ul.products li.product .woocommerce-loop-product__title { font-size: 1.125rem; }
  body.blp-theme ul.products li.product .price { font-size: var(--blp-text-base); }
  body.blp-theme ul.products li.product .blp-loop-badges { top: 0.375rem; left: 0.375rem; right: 0.375rem; gap: 0.25rem; }
  body.blp-theme ul.products li.product .blp-badge { padding: 0.1875rem 0.375rem; white-space: normal; }
  .blp-loop-dim { font-size: var(--blp-text-sm); }
}
@media (prefers-reduced-motion: reduce) {
  body.blp-theme ul.products li.product,
  body.blp-theme a.button { transition: none; }
}

/* Tarjeta de producto: el botón y el enlace «Ver carrito» no deben solaparse con el precio.
   Kadence coloca .product-action-wrap en posición absoluta; aquí fluye bajo el precio. */
body.blp-theme ul.products li.product .product-action-wrap {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0;
}
body.blp-theme ul.products li.product .product-action-wrap .added_to_cart { margin: 0; }

/* Kadence usa una regla más específica (acción al pasar el ratón, posición absoluta y opacidad 0):
   se iguala aquí para que el botón y «Ver carrito» queden siempre visibles bajo el precio. */
html body.blp-theme .woocommerce ul.products.woo-archive-action-on-hover li.product .product-action-wrap {
  position: static;
  width: auto;
  bottom: auto;
  opacity: 1;
  visibility: visible;
  transform: none;
  padding: 0;
  margin-top: 0.75rem;
}

/* Refuerzo: Kadence aplica además estilos en línea desde el personalizador. */
body.blp-theme ul.products li.product .product-details .product-action-wrap {
  position: static !important;
  bottom: auto !important;
  width: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* En pantallas pequeñas el panel de filtros empieza plegado ya en el primer pintado (sin esperar al JavaScript),
   para que la página no se desplace cuando el script lo pliega (corrige el CLS de Search Console). */
@media (max-width: 1024px) {
  .blp-filters__panel:not(.is-user-open) > :not(summary) { display: none; }
  .blp-filters__panel:not(.is-user-open) { padding-block: 0.875rem; }
  .blp-filters__panel:not(.is-user-open) .blp-filters__toggle { margin: 0; }
}

/* ==========================================================================
   Cuenta de cliente (Mi cuenta): acceso, registro y panel
   ========================================================================== */
body.blp-theme .blp-topbar__account { display: inline-flex; align-items: center; gap: 0.4rem; }

body.blp-theme.woocommerce-account .u-columns.col2-set,
body.blp-theme.woocommerce-account #customer_login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 60rem;
  margin-inline: auto;
}
body.blp-theme.woocommerce-account #customer_login .u-column1,
body.blp-theme.woocommerce-account #customer_login .u-column2 {
  float: none;
  width: auto;
  box-sizing: border-box;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--blp-color-border, #E4DCCF);
  border-radius: 12px;
}
body.blp-theme.woocommerce-account #customer_login h2 {
  margin-top: 0;
  font-family: 'Dekiru', Georgia, serif;
  color: var(--blp-color-primary);
}
body.blp-theme.woocommerce-account form.woocommerce-form input.input-text { box-sizing: border-box; width: 100%; }
@media (max-width: 760px) {
  body.blp-theme.woocommerce-account #customer_login { grid-template-columns: 1fr; }
}

.blp-account-welcome__title { margin: 0 0 0.25rem; font-family: 'Dekiru', Georgia, serif; color: var(--blp-color-primary); }
.blp-account-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.blp-account-cards a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-sizing: border-box;
  height: 100%;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid var(--blp-color-border, #E4DCCF);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}
.blp-account-cards a:hover, .blp-account-cards a:focus-visible { border-color: var(--blp-color-primary); }
.blp-account-cards strong { color: var(--blp-color-primary); }
.blp-account-cards span { font-size: 0.9rem; color: #6F635F; }
/* WooCommerce añade pseudo-elementos de «clearfix» que ocupaban la primera celda de la rejilla. */
body.blp-theme.woocommerce-account .u-columns.col2-set::before,
body.blp-theme.woocommerce-account .u-columns.col2-set::after { display: none; content: none; }
body.blp-theme.woocommerce-account .u-columns .u-column1,
body.blp-theme.woocommerce-account .u-columns .u-column2 {
  float: none; width: auto; box-sizing: border-box; padding: 1.5rem; background: #fff;
  border: 1px solid var(--blp-color-border, #E4DCCF); border-radius: 12px;
}
body.blp-theme.woocommerce-account .u-columns h2 { margin-top: 0; font-family: 'Dekiru', Georgia, serif; color: var(--blp-color-primary); }
@media (max-width: 760px) { body.blp-theme.woocommerce-account .u-columns.col2-set { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   PayPal: botones exprés (carrito y ficha). PayPal solo permite sus colores de botón (oro, azul, plata, negro,
   blanco), así que el botón es blanco y se enmarca en un panel perla para integrarlo con la página.
   -------------------------------------------------------------------------- */
body.blp-theme .ppc-button-wrapper {
  box-sizing: border-box;
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: var(--blp-color-pearl, #F4F0B8);
  border: 1px solid rgba(100, 42, 52, 0.18);
  border-radius: 8px;
}
body.blp-theme .ppc-button-wrapper > div { display: grid; gap: 0.5rem; }
body.blp-theme .ppc-button-wrapper paypal-button,
body.blp-theme .ppc-button-wrapper paypal-pay-later-button { --paypal-button-border-radius: 6px; }

/* --------------------------------------------------------------------------
   Botones «Pagar» y «Cancelar pedido»: separación y mismo tamaño.
   1) Página de pago de las pasarelas Redsys (tarjeta, Bizum y Google Pay). El plugin escribe
      <form id="redsys_payment_form"> con el botón de pago y el enlace «Cancelar pedido» separados solo por un espacio.
   2) Mi cuenta › Pedidos: acciones Pagar / Ver / Cancelar.
   -------------------------------------------------------------------------- */
body.blp-theme #redsys_payment_form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 1.25rem;
}
body.blp-theme #redsys_payment_form #submit_redsys_payment_form,
body.blp-theme #redsys_payment_form a.button.cancel {
  box-sizing: border-box;
  margin: 0;
  border: 0;
  min-height: 3rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  line-height: 1.2;
  border-radius: 6px;
}
body.blp-theme .woocommerce-orders-table__cell-order-actions .button {
  margin: 0 0.75rem 0.5rem 0;
}

/* --------------------------------------------------------------------------
   Pago con bloques: tarjeta de la dirección de envío / facturación con el enlace «Editar».
   En móvil «Editar» se partía en dos líneas («Edit» / «ar»): el cuerpo de la página lleva overflow-wrap: anywhere,
   que deja encoger el enlace hasta una letra. Además Kadence daba al <address> un margen inferior de 32 px que
   descentraba el contenido de la tarjeta.
   -------------------------------------------------------------------------- */
body.blp-theme .wc-block-components-address-card {
  gap: 1rem;
  align-items: flex-start;
}
body.blp-theme .wc-block-components-address-card address {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
body.blp-theme .wc-block-components-address-card__edit {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
