/* ---------- CARD ---------- */

 .products .product{
    position: relative;
    overflow: hidden;
}

/* ---------- OVERLAY OSCURO ---------- */

 .products .product::before{
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity .3s ease;
    z-index: 5;
}

.products .product:hover::before{
    opacity: 1;
}

/* ---------- CONTENEDOR BOTONES (DESKTOP) ---------- */

.product-hover-buttons{
    position: absolute;
    left: 50%;
    bottom: -80px;
    transform: translate(-50%, 0);
    z-index: 20;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;

    width: max-content;          /* 🔑 CLAVE */
    opacity: 0;
    pointer-events: none;

    transition: bottom .35s ease, opacity .25s ease;
}

.product:hover .product-hover-buttons{
    bottom: 45%;
    opacity: 1;
    pointer-events: auto;
}
/* ---------- BOTONES ---------- */

.btn-view,
.btn-buy,
.btn-soldout{
    min-width: 115px;
    padding: 10px 14px;
    font-size: 13px;
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
    text-align: center;
    letter-spacing: .4px;
    cursor: pointer;
    transition: all .25s ease;
    text-decoration: none;
}

/* VER */

.btn-view:hover{
    background: #fff;
    color: #000;
}

/* COMPRAR */

.btn-buy{
    background: #fff;
    color: #000;
    font-weight: 600;
}

.btn-buy:hover{
    background: #111;
    color: #fff;
    border-color: #111;
}

/* AGOTADO */

.btn-soldout{
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.4);
    cursor: default;
}

.product-miniature{
    position: relative;
}

.product-link-overlay{
    z-index: 10;
}

.product-hover-buttons{
    z-index: 20;
}

/* =========================
   TABLET + MOBILE
========================= */

@media (max-width: 992px){

  /* Quitar overlay oscuro */
  .product::before{
      display: none !important;
  }

  /* Quitar cualquier filtro / brillo */
  .product{
      filter: none !important;
      background: none !important;
  }

  /* Sin hover effects */
  .product:hover .product-hover-buttons{
      bottom: 0;
      opacity: 1;
  }

}
@media (max-width: 992px){

  .product-hover-buttons{
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      transform: none;
      width: 100%;
      display: flex;
      gap: 8px;
      padding: 10px;
      background: rgba(0,0,0,.55);
      opacity: 1 !important;
      pointer-events: auto;
      z-index: 20;
  }

  /* Botones ocupan todo el ancho */
  .btn-view,
  .btn-buy,
  .btn-soldout{
      flex: 1;
      min-width: 0;
      padding: 12px 8px;
      font-size: 13px;
  }

}
/* LINK CLICKABLE EN TODO EL ARTICLE */

.product-link-overlay{
    position: absolute;
    inset: 0;
    z-index: 10;
    text-indent: -9999px;
}

/* BOTONES POR ENCIMA DEL LINK */

.product-hover-buttons,
.btn-buy,
.btn-view,
.btn-soldout{
    position: relative;
    z-index: 20;
}

.product-link-overlay{
    cursor: pointer;
}


.product-miniature {
    padding: 20px;
    min-height: 500px;
    border-radius: 8px;
    
    position: relative;
    width: 100%;
    min-width: 270px;
    max-width: 360px;
}

.product-miniature .thumbnail-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: unset;
    margin-bottom: 0;
    height: auto;
}

.product-miniature .thumbnail-top {
    text-align: center;
}

.product-miniature .thumbnail-top img {
    max-width: 100%;
    height: 100%;
}

.product-miniature .product-description {
    padding: 0;
}

.product-miniature .product-description .h3.product-title {
    margin-top: 0px;
    margin-bottom: 1rem;
    text-align: left;
}

.product-miniature .product-description .product-title a {
    font-size: var(--zg-font-size-body-large);
    color: var(--zg-color-text-primary);
    font-weight: var(--zg-font-weight-bold);
    text-decoration: none;
}

.product-miniature .product-description .product-title a:hover {
    color: var(--zg-color-hover-secondary);
}

.product-miniature .product-description .product-desc {
    font-size: var(--zg-font-size-body);
    color: var(--zg-color-text-primary);
    opacity: 0.8;
    line-height: 24px;
    min-height: 60px;
    margin-bottom: 0;
}

.product-miniature .product-price-and-shipping {
    display: flex;
    gap: 10px;
}

.product-miniature .text-price {
    color: var(--zg-color-text-primary);
    font-size: var(--zg-font-size-body);
    font-weight: var(--zg-font-weight-semibold);
    line-height: 24px;
}

.product-miniature .regular-price {
    color: var(--zg-color-text-primary);
    opacity: 0.6;
    font-size: var(--zg-font-size-body);
    font-weight: var(--zg-font-weight-semibold);
    line-height: 24px;
    text-decoration: line-through;
}

.product-miniature .price {
    color: var(--zg-color-text-primary);
    font-size: var(--zg-font-size-body-large);
    font-weight: var(--zg-font-weight-semibold);
    line-height: 24px;
}

.product-miniature .url-product-category {
    padding: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-miniature .url-product-category .url {
    color: var(--zg-color-tertiary);
    font-size: var(--zg-font-size-body-small);
    text-decoration: none;
    font-weight: var(--zg-font-weight-semibold);
    transition: transform 0.25s ease;
    display: inline-block;
}

.product-miniature .url-product-category .url:hover {
    color: var(--zg-color-hover-secondary);
    transform: translateY(-3px);
}

.product-miniature .highlighted-informations {
    position: relative;
    top: 0;
    padding: 0;
    min-height: 20px;
    margin: 15px 0 0 0;
}

.product-miniature .variant-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.product-miniature .variant-links a {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid var(--zg-color-secondary);
    transition: transform 0.25s ease;
}

.product-miniature .variant-links a:hover {
    transform: translateY(-2px);
}

.product-miniature .product-flags {
    position: absolute;
    top: 7px;
    left: 9px;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-miniature .product-flags .product-flag {
    height: 26px;
    border-radius: 4px;
    padding: 4px 12px 4px 12px;
    font-weight: var(--zg-font-weight-semibold);
    font-size: var(--zg-font-size-body);
    line-height: 18px;
    text-transform: uppercase;
    color: var(--zg-color-white);
}

.product-miniature .product-flags .product-flag.new {
    background-color: var(--zg-color-primary);
}

.product-miniature .product-flags .product-flag.discount {
    background-color: var(--zg-color-tertiary);
}

.product-miniature .product-flags .product-flag.pack {
    background-color: var(--zg-color-warning);
}

.product-miniature .product-flags .product-flag.new,
.product-miniature .product-flags .product-flag.discount,
.product-miniature .product-flags .product-flag.pack {
    text-align: center;
}

@media only screen and (max-width: 767px) {
    .product-miniature {
        padding: 10px;
        height: 455px;
        min-height: 455px;
    }

    .product-miniature .product-flags .product-flag {
        height: 20px;
        border-radius: 4px;
        font-weight: var(--zg-font-weight-regular);
        font-size: var(--zg-font-size-body-small);
        line-height: 18px;
        text-transform: uppercase;
        display: flex;
        align-items: center;
    }
}

@media only screen and (max-width: 425px) {
    .product-miniature {
        padding: 20px;
        height: auto;
        min-height: 400px;
        margin: auto;
    }

    .product-miniature .variant-links {
        gap: 10px;
    }

    .product-miniature .variant-links a {
        width: 25px;
        height: 25px;
    }
    #product .product-name {
        font-size: 3rem !important;
    }
}