/* Inicio sin restricciones de ancho de Astra */
body.home #content > .ast-container {
  display: block;
  max-width: none;
  padding: 0;
}

body.home #primary.weik-home {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Hero */
.weik-home-hero {
  width: 100%;
  margin: 0;
  padding: 0;
}

.weik-home-hero-imagen {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  border-radius: 0;
}

/* Contenido que se agregue desde el editor */
.weik-home-contenido {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.weik-home-contenido:empty {
  display: none;
}

/* Bloque de presentación y productos */
.weik-home-productos {
  box-sizing: border-box;
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  padding: 64px 24px;
}

.weik-home-productos-encabezado {
  max-width: 850px;
  margin: 0 auto 36px;
  text-align: center;
}

.weik-home-productos-encabezado h1 {
  margin: 0 0 20px;
  color: #195995;
  font-size: 35px;
  font-weight: 700;
  line-height: 1.2;
}

.weik-home-productos-encabezado p {
  margin: 0;
  color: #195995;
  font-size: 16px;
  line-height: 1.7;
}

/* Carrusel horizontal */
.weik-home-carrusel {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #6FA3A8 #F5F2F4;
  padding-bottom: 20px;
}

.weik-home-carrusel:focus-visible {
  outline: 2px solid #195995;
  outline-offset: 4px;
}

.weik-home-carrusel .weik-home-carrusel-lista {
  display: flex !important;
  gap: 24px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.weik-home-carrusel .weik-home-carrusel-lista::before,
.weik-home-carrusel .weik-home-carrusel-lista::after {
  display: none !important;
}

/* Cuatro tarjetas visibles en escritorio */
.weik-home-carrusel .weik-home-carrusel-lista > li.product {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - 72px) / 4);

  float: none !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0;

  scroll-snap-align: start;
  text-align: left;
}

.weik-home-carrusel li.product a img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 16px;
  border-radius: 8px;
}

.weik-home-carrusel .woocommerce-loop-product__title {
  margin: 0 0 12px;
  padding: 0;
  color: #195995;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.weik-home-carrusel li.product .price {
  display: block;
  margin: 0 0 16px;
  color: #195995;
  font-size: 22px;
  font-weight: 600;
}

.weik-home-carrusel .price :where(span, bdi, del, ins) {
  font-size: inherit;
  color: inherit;
}

.weik-home-carrusel .price ins {
  background: transparent;
  color: #9C4C8D;
  text-decoration: none;
}

/* Botones */
.weik-home-carrusel li.product a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;

  min-height: 44px;
  margin: auto 0 0;
  padding: 12px 16px;
  border: 1px solid #6FA3A8;
  border-radius: 8px;

  background: #6FA3A8;
  color: #F5F5F5;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.weik-home-carrusel li.product a.button:hover {
  background: #5D9095;
  border-color: #5D9095;
  color: #F5F5F5;
}

/* Ocultar información adicional */
.weik-home-carrusel :where(
  .ast-woo-product-category,
  .ast-woo-shop-product-description,
  .star-rating
) {
  display: none !important;
}

/* Tablet */
@media (max-width: 921px) {
  .weik-home-carrusel .weik-home-carrusel-lista > li.product {
    flex-basis: calc((100% - 24px) / 2);
  }
}

/* Móvil: una tarjeta y parte de la siguiente */
@media (max-width: 544px) {
  .weik-home-productos {
    padding: 40px 20px;
  }

  .weik-home-carrusel .weik-home-carrusel-lista > li.product {
    flex-basis: 85%;
  }
}

/* Ocultar botones de compra en el carrusel de inicio */
.weik-home-carrusel-lista li.product a.button,
.weik-home-carrusel-lista li.product a.added_to_cart {
  display: none !important;
}

/* Mantener todos los productos en una única fila desplazable */
.weik-home-carrusel {
  width: 100%;
  min-width: 0;
  overflow-x: auto !important;
}

.weik-home-carrusel .weik-home-carrusel-lista {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100%;
}

.weik-home-carrusel-controles {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.weik-home-carrusel-controles button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #6FA3A8;
  border-radius: 8px;
  background: #6FA3A8;
  color: #F5F5F5;
  font-size: 24px;
  cursor: pointer;
}

.weik-home-carrusel-controles button:hover {
  background: #5D9095;
}

/* Categorías: texto | imagen | imagen | texto */
.weik-home-categorias {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}

.weik-home-categoria-nombre {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  color: #195995;
  text-decoration: none;
}

.weik-home-categoria-nombre h2 {
  margin: 0;
  color: #195995;
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 700;
  line-height: 1.2;
}

.weik-home-categoria-nombre span {
  color: #195995;
  font-size: 13px;
  font-weight: 600;
}

.weik-home-categoria-nombre:hover span {
  text-decoration: underline;
}

.weik-home-categoria-imagen {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
}

.weik-home-categoria-imagen img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

/* Móvil: una categoría por fila, con texto e imagen */
@media (max-width: 767px) {
  .weik-home-categorias {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "remeras-texto remeras-imagen"
      "mallas-imagen mallas-texto";
    gap: 20px 12px;
  }

  .weik-home-remeras-nombre {
    grid-area: remeras-texto;
  }

  .weik-home-remeras-imagen {
    grid-area: remeras-imagen;
  }

  .weik-home-mallas-imagen {
    grid-area: mallas-imagen;
  }

  .weik-home-mallas-nombre {
    grid-area: mallas-texto;
  }

  .weik-home-categoria-nombre {
    padding: 12px;
  }

  .weik-home-categoria-nombre h2 {
    font-size: 24px;
  }
}