/*
 Theme Name:   Kirei
 Description:  Kirei Template 1.0
 Author:       Gonzalo C.
 Author URI:   http://kirei.ar
 Template:     astra
 Version:      1.0.0
*/

/* Oculta mensaje de backorder */
p.stock.available-on-backorder {
  display: none !important;
}

p.stock.out-of-stock {
  display: none !important;
}

/* Botones tipo call to action: descuento, envío, stock, compra segura */
.ml-discount-badge,
.ml-fast-shipping,
.ml-stock-ok,
.ml-stock-no,
.ml-safe-pay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 16px;
  padding: 8px 24px;
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.2;
}

/* Colores individuales */
.ml-discount-badge {
  background: #ffe600;
  color: #dc143c;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.ml-fast-shipping {
  background: #00a650;
  color: #fff;
}

.ml-stock-ok {
  background: #e8f5e9;
  color: #219150;
}

.ml-stock-no {
  background: #ffebee;
  color: #c62828;
}

.ml-safe-pay {
  background: #e3f0ff;
  color: #1565c0;
}

/* Íconos: tamaño y alineación uniforme */
.ml-discount-badge i,
.ml-fast-shipping i,
.ml-stock-ok i,
.ml-stock-no i,
.ml-safe-pay i {
  margin-right: 8px;
  font-size: 1.1em;
  vertical-align: middle;
}

/* Bloque de precio */
.ml-price-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ml-price {
  font-size: 1.3rem;
  color: #000000;
  font-weight: 600;
}

/* Galería y layout principal */
.ml-product-container {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 32px;
  margin-top: 40px;
  padding: 32px;
  box-sizing: border-box;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.ml-product-gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 80px;
  flex-shrink: 0;
}

.ml-product-gallery-thumbs img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border: 2px solid #eee;
  border-radius: 8px;
  cursor: pointer;
  transition: border 0.2s;
}

.ml-product-gallery-thumbs img.active,
.ml-product-gallery-thumbs img:hover {
  border: 2px solid #3483fa;
}

.ml-product-gallery-main {
  flex: 1 1 350px;
  min-width: 350px;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ml-product-gallery-main img {
  max-width: 500px;
  max-height: 500px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  background: #fafafa;
  display: block;
}

.ml-product-info {
  flex: 1 1 280px;
  min-width: 280px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: 16px;
}

.ml-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.ml-stock {
  margin-bottom: 6px;
}

.ml-short-description {
  color: #333;
  font-size: 1.1rem;
}

.ml-full-description {
  flex-basis: 100%;
  width: 100%;
  max-width: 1200px;
  margin-top: 32px;
  padding: 32px;
  font-size: 1.1rem;
  color: #333;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  display: block;
  order: 10;
}

.ml-full-description h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: #222;
}

/* Responsive */
@media (max-width: 900px) {
  .ml-product-container {
    flex-direction: column;
    padding: 16px;
    gap: 20px;
  }
  .ml-product-gallery-thumbs {
    flex-direction: row;
    width: 100%;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
  }
  .ml-product-gallery-thumbs img {
    width: 60px;
    height: 60px;
  }
  .ml-product-gallery-main {
    min-width: 0;
    max-width: 100%;
  }
  .ml-product-gallery-main img {
    max-width: 100%;
    max-height: 320px;
  }
  .ml-product-info {
    min-width: 0;
    max-width: 100%;
    padding-left: 0;
  }
  .ml-full-description {
    padding: 16px;
  }
}

/* Ocultar breadcrumb solo en la página principal de la tienda */
.post-type-archive-product .woocommerce-breadcrumb,
.page-id-2027 .woocommerce-breadcrumb {
    display: none !important;
}

/* Oculta la cuadrícula estándar de productos SOLO en desktop/tablet (no en mobile) */
@media (min-width: 601px) {
  .post-type-archive-product ul.products,
  .page-id-2027 ul.products,
  .post-type-archive-product .woocommerce-result-count,
  .page-id-2027 .woocommerce-result-count,
  .post-type-archive-product .woocommerce-ordering,
  .page-id-2027 .woocommerce-ordering,
  .post-type-archive-product .woocommerce-pagination,
  .page-id-2027 .woocommerce-pagination {
      display: none !important;
  }
}

/* 2 productos por fila en mobile WooCommerce */
@media (max-width: 600px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products,
  .post-type-archive-product ul.products,
  .page-id-2027 ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    padding: 0 !important;
  }
  .woocommerce ul.products li.product,
  .woocommerce-page ul.products li.product,
  .post-type-archive-product ul.products li.product,
  .page-id-2027 ul.products li.product {
    width: 48% !important;
    margin: 0 1% 16px 0 !important;
    float: none !important;
    clear: none !important;
  }
  .woocommerce ul.products li.product:nth-child(2n),
  .woocommerce-page ul.products li.product:nth-child(2n),
  .post-type-archive-product ul.products li.product:nth-child(2n),
  .page-id-2027 ul.products li.product:nth-child(2n) {
    margin-right: 0 !important;
  }
}