/* Botones Comper — base; los tamaños/colores por contexto van en CSS inline (Ajustes). */

.bc-filtro-color {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

#shop-sidebar .bc-filtro-color,
.shop-sidebar .bc-filtro-color {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
}

#shop-sidebar .bc-filtro-color__all,
.shop-sidebar .bc-filtro-color__all {
  width: 100%;
  height: 32px;
}

#shop-sidebar .bc-filtro-color__swatches,
.shop-sidebar .bc-filtro-color__swatches {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  justify-content: space-between;
  align-items: start;
  justify-items: start;
  column-gap: 0;
  row-gap: 6px;
}

.bc-filtro-color__all {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #8c8f94;
  border-radius: 2px;
  background: #f6f7f7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.bc-filtro-color__all.is-on {
  background: #2271b1;
  border-color: #135e96;
  color: #fff;
}

.bc-filtro-color__swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bc-miniaturas-color {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bc-filtro-color .bc-swatch,
.bc-miniaturas-color .bc-swatch,
#shop-sidebar .bc-filtro-color .bc-swatch,
.shop-sidebar .bc-filtro-color .bc-swatch,
html body .bc-filtro-color span.bc-swatch,
html body .bc-miniaturas-color span.bc-swatch {
  width: var(--bc-sw-w, 22px) !important;
  height: var(--bc-sw-h, 22px) !important;
  min-width: var(--bc-sw-w, 22px) !important;
  min-height: var(--bc-sw-h, 22px) !important;
  max-width: var(--bc-sw-w, 22px) !important;
  max-height: var(--bc-sw-h, 22px) !important;
  border: var(--bc-sw-border-w, 1px) solid var(--bc-sw-border-c, #8c8f94) !important;
  border-radius: var(--bc-sw-radius, 0) !important;
  -webkit-border-radius: var(--bc-sw-radius, 0) !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  box-sizing: border-box !important;
  display: inline-block !important;
  vertical-align: top;
  appearance: none;
  -webkit-appearance: none;
  align-self: start;
  justify-self: start;
  flex: 0 0 auto !important;
  background-clip: padding-box;
}

/* Formas explícitas (por si el tema pisa variables). */
html body .bc-swatch.bc-forma-cuadrado,
html body .bc-swatch.bc-forma-rectangular {
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
}
html body .bc-swatch.bc-forma-circular,
html body .bc-swatch.bc-forma-ovalado {
  border-radius: 50% !important;
  -webkit-border-radius: 50% !important;
}

.bc-filtro-color .bc-swatch {
  cursor: pointer;
}

.bc-miniaturas-color .bc-swatch {
  cursor: default;
}

.bc-ficha-articulo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0.75rem 0 1rem;
  width: 100%;
  clear: both;
}

.custom-product-page .bc-ficha-articulo,
.add-to-cart-container .bc-ficha-articulo {
  margin: 0.75rem 0 1rem;
}

.custom-product-page .bc-comprar,
.summary .bc-comprar {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

/* Ficha con Botones Comper: ocultar atributos Woo antiguos (botones Color / talla). */
body.bc-ficha-activa form.variations_form table.variations,
body.bc-ficha-activa form.variations_form .variations,
body.bc-ficha-activa .variations_form .woocommerce-variation-description,
body.single-product:has(.bc-ficha-articulo) form.variations_form table.variations,
body.single-product:has(.bc-ficha-articulo) form.variations_form .variations {
  display: none !important;
}

/* Tabla (ancha) + celda guía solo del ancho de la camiseta, misma altura/borde. */
.bc-tallas-marco {
  display: flex;
  flex-direction: row;
  align-items: flex-start; /* la guía sigue a la tabla; no al revés */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  gap: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.bc-tallas-marco__tabla {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  align-self: flex-start;
}

html body .bc-tallas__table {
  width: 100%;
  min-width: 220px;
  max-width: none;
  height: auto !important;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px !important;
  line-height: 1.3 !important;
}

html body .bc-tallas__table th,
html body .bc-tallas__table td {
  border: 1px solid #c3c4c7;
  padding: 4px 8px !important;
  text-align: center;
  white-space: nowrap;
  line-height: 1.3 !important;
  height: auto !important;
  vertical-align: middle;
}

html body .bc-tallas__table th {
  background: #f0f0f1;
  font-weight: 700;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

html body .bc-tallas__table .bc-tallas__talla,
html body .bc-tallas__table .bc-tallas__talla strong {
  font-weight: 900 !important;
}

html body .bc-tallas__table .bc-tallas__precio {
  font-weight: 700 !important;
}

/* Talla no disponible para el color seleccionado. */
html body .bc-tallas__table tr.bc-tallas__row.is-na > td {
  background: #fce8e8 !important;
  color: #c9b8b8 !important;
}
html body .bc-tallas__table tr.bc-tallas__row.is-na .bc-tallas__talla,
html body .bc-tallas__table tr.bc-tallas__row.is-na .bc-tallas__talla strong,
html body .bc-tallas__table tr.bc-tallas__row.is-na .bc-tallas__precio,
html body .bc-tallas__table tr.bc-tallas__row.is-na .bc-tallas__anc,
html body .bc-tallas__table tr.bc-tallas__row.is-na .bc-tallas__alt {
  color: #c9b8b8 !important;
  font-weight: 500;
  opacity: 0.7;
}

.bc-miniaturas-color--interact .bc-swatch,
.bc-miniaturas-color[data-bc-interact="1"] .bc-swatch {
  cursor: pointer;
}

/* Ficha: ocultar miniaturas / dots del carrusel (solo imagen principal). */
body.single-product .product-thumbnails,
body.single-product .product-gallery-thumbnails,
body.single-product .thumbnails,
body.single-product .woocommerce-product-gallery .flex-control-thumbs,
body.single-product .product-gallery-slider .flickity-page-dots,
body.single-product .product-gallery-slider .flickity-button {
  display: none !important;
}

/* Ficha: solo «Añadir al carrito» (sin Comprar, Customize ni cantidad). */
body.single-product .bc-comprar,
body.bc-ficha-activa .bc-comprar,
body.single-product #lumise-customize-button,
body.single-product .lumise-customize-button,
body.single-product a.lumise-button,
body.single-product form.cart .quantity,
body.single-product .cart .quantity {
  display: none !important;
}

/* Precio + Añadir al carrito en la misma línea. */
.bc-precio-cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  width: 100%;
  margin: 0.75em 0 1em;
  box-sizing: border-box;
}
.bc-precio-cart .price-wrapper,
.bc-precio-cart .product-page-price,
.bc-precio-cart .price,
.bc-precio-cart form.cart {
  margin: 0 !important;
}
.bc-precio-cart .price,
.bc-precio-cart .price-wrapper .price,
.bc-precio-cart .product-page-price .price {
  display: inline-block;
  font-size: 200% !important;
  line-height: 1.2 !important;
  font-weight: 700;
}

/* «IVA incluido» (sufijo Woo): rojo, negrita, cursiva. */
body.single-product .woocommerce-price-suffix,
body.bc-ficha-activa .woocommerce-price-suffix,
.bc-precio-cart .woocommerce-price-suffix {
  color: #e53935 !important;
  font-weight: 700 !important;
  font-style: italic !important;
  font-size: inherit !important;
}
.bc-precio-cart form.cart {
  display: inline-flex !important;
  align-items: center;
  flex: 0 0 auto;
  visibility: visible !important;
}
.bc-precio-cart .single_add_to_cart_button:not(#lumise-customize-button) {
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Talla | Precio | Ancho | Largo */
.bc-tallas__table col.bc-col-talla {
  width: 18%;
}
.bc-tallas__table col.bc-col-precio {
  width: 22%;
}
.bc-tallas__table col.bc-col-anc,
.bc-tallas__table col.bc-col-alt {
  width: 30%;
}

/* Celda derecha: ancho = imagen + lo quitado a Ancho/Largo (JS). */
.bc-tallas-marco__guia {
  flex: 0 0 auto;
  width: auto;
  max-width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid #c3c4c7;
  border-left: 0;
  background: #fff;
  padding: 2px 4px;
  overflow: hidden;
}

.bc-tallas-marco__guia img {
  display: block;
  width: auto;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 549px) {
  .bc-tallas-marco {
    flex-direction: column;
    align-items: stretch;
  }
  .bc-tallas-marco__tabla,
  .bc-tallas__table {
    width: 100%;
  }
  .bc-tallas-marco__guia {
    width: 100%;
    max-width: none;
    border-left: 1px solid #c3c4c7;
    border-top: 0;
    min-height: 120px;
  }
  .bc-tallas-marco__guia img {
    height: auto;
    max-height: 160px;
    max-width: 140px;
  }
}

.bc-comprar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  background: #2271b1;
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  border-radius: 2px;
  align-self: flex-start;
}

.bc-comprar:hover {
  background: #135e96;
  color: #fff !important;
}

.bc-empty {
  font-size: 13px;
  color: #646970;
}

[data-bc-colores].bc-filtrado-oculto,
.product.bc-filtrado-oculto,
.product-small.bc-filtrado-oculto,
li.product.bc-filtrado-oculto,
.product-category.bc-filtrado-oculto,
li.product-category.bc-filtrado-oculto {
  display: none !important;
}

.bc-loop-colores {
  display: block;
  clear: both;
  margin: 8px 0 4px;
  width: 100%;
  min-height: 12px;
  z-index: 2;
  position: relative;
}

.product-small .bc-loop-colores,
.product .bc-loop-colores,
.box-text .bc-loop-colores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.bc-loop-colores .bc-miniaturas-color {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.single-product .bc-comprar {
  margin-top: 0.75rem;
}
