/* LGDRY · Catálogo móvil editorial V28.1
   Solo cambia la PRESENTACIÓN del catálogo (#productsGrid) en pantallas pequeñas.
   No modifica precios, inventario, métodos de envío ni lógica de pedidos. */

/* Elementos nuevos: categoría y corazón solo aparecen en móvil. */
.lgdry-card-category,
.lgdry-card-favorite,
.lgdry-card-promo { display: none; }

@media (max-width: 768px) {
  /* Un catálogo con DOS tarjetas por fila, también en iPhone y WebView. */
  #shop.gallery-premium-section { padding-bottom: 58px; }
  #shop.gallery-premium-section > .container {
    padding-left: 13px;
    padding-right: 13px;
  }
  #productsGrid.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 13px;
    margin-top: 16px;
    align-items: start;
  }
  #productsGrid .gallery-premium-card {
    min-width: 0;
    max-width: none;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    cursor: pointer;
  }
  #productsGrid .card-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    box-shadow: none;
    background-color: #f7f7f7;
    overflow: hidden;
    transform: none !important;
  }
  #productsGrid .card-bg-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none !important;
  }
  /* Toda la información queda visible debajo de las fotos, no sobre la imagen. */
  #productsGrid .card-overlay-gradient,
  #productsGrid .card-info-reveal { display: none !important; }
  #productsGrid .card-static-bottom {
    padding: 10px 1px 0;
    margin: 0;
    text-align: left;
    transform: none !important;
    opacity: 1 !important;
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
  }
  #productsGrid .lgdry-card-category {
    display: block;
    font-family: var(--font-heading, sans-serif);
    font-weight: 500;
    text-transform: uppercase;
    color: #727272;
    font-size: 9.5px;
    letter-spacing: 0.20em;
    line-height: 1.5;
    margin: 0 0 5px;
  }
  #productsGrid .static-title {
    font-family: var(--font-heading, sans-serif);
    font-size: clamp(11px, 3.15vw, 13px);
    line-height: 1.28;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
    text-align: left;
    color: #111;
    margin: 0 0 8px;
    min-width: 0;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  #productsGrid .static-price {
    display: block;
    color: #02aebe;
    font-family: var(--font-heading, sans-serif);
    font-size: clamp(13px, 3.6vw, 16px);
    font-weight: 800;
    line-height: 1.25;
    white-space: normal;
    margin: 0;
  }
  #productsGrid .static-price .original-price {
    display: inline-block;
    color: #999 !important;
    font-size: .72em !important;
    font-weight: 500;
    white-space: nowrap;
  }
  #productsGrid .static-price .current-price { color: #02aebe !important; }
  #productsGrid .static-price .lgdry-price-pending {
    color: #777;
    font-size: 11px;
  }
  #productsGrid .lgdry-card-swatches {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-height: 26px;
    padding: 7px 0 0;
    margin: 0;
  }
  #productsGrid .lgdry-card-swatch {
    display: inline-flex !important;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-width: 1.5px;
  }
  #productsGrid .lgdry-card-swatch::after { inset: 5px; }
  #productsGrid .lgdry-card-favorite {
    display: grid;
    place-items: center;
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 8;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.97);
    color: #545454;
    box-shadow: 0 3px 11px rgba(0,0,0,.12);
    cursor: pointer;
    touch-action: manipulation;
    transition: transform .15s ease, color .15s ease;
  }
  #productsGrid .lgdry-card-favorite svg {
    width: 19px;
    height: 19px;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  #productsGrid .lgdry-card-favorite[aria-pressed="true"] { color: #c44c75; }
  #productsGrid .lgdry-card-favorite[aria-pressed="true"] svg { fill: currentColor; }
  #productsGrid .lgdry-card-favorite:active { transform: scale(.92); }
  #productsGrid .lgdry-card-favorite:focus-visible,
  #productsGrid .gallery-premium-card:focus-visible {
    outline: 2px solid #03aabb;
    outline-offset: 3px;
  }
  #productsGrid .lgdry-card-promo {
    display: inline-flex;
    position: absolute;
    left: 9px;
    top: 9px;
    z-index: 5;
    max-width: calc(100% - 56px);
    padding: 5px 9px;
    border-radius: 24px;
    background: #111;
    color: #fff;
    font-family: var(--font-heading, sans-serif);
    font-size: 9px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .08em;
    line-height: 1.1;
  }
  #productsGrid .sold-out-badge {
    top: 9px !important;
    left: 9px !important;
    padding: 6px 9px !important;
    border-radius: 20px;
    font-size: 9px !important;
    letter-spacing: .07em;
  }
  /* Mantener las transiciones anteriores fuera de esta cuadrícula móvil. */
  #productsGrid .card-bg-image,
  #productsGrid .card-image-wrapper,
  #productsGrid .card-static-bottom { transition: none !important; }
}
@media (max-width: 350px) {
  #shop.gallery-premium-section > .container { padding-left: 10px; padding-right: 10px; }
  #productsGrid.products-grid { gap: 24px 9px; }
  #productsGrid .card-image-wrapper { aspect-ratio: 3 / 4; }
  #productsGrid .static-title { font-size: 11px; }
  #productsGrid .static-price { font-size: 13px; }
  #productsGrid .lgdry-card-favorite { width: 33px; height: 33px; }
}
@media (prefers-reduced-motion: reduce) {
  #productsGrid .lgdry-card-favorite { transition: none; }
}
