/* Contenedor principal de la Galería */
.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    list-style: none;
}

/* Tarjeta individual */
.image-grid__item {
    flex: 0 0 calc(50% - 8px);
    height: 200px;                    /* Ajustado para móvil */
    position: relative;
    max-width: 380px;
    border-radius: 8px;
    overflow: hidden;
}

/* Sombra sutil */
.image-grid__item:before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08),
                0 4px 12px rgba(0,0,0,0.06);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.image-grid__item:hover:before {
    opacity: 1;
}

/* Contenido de la tarjeta */
.grid-item {
    display: flex;
    height: 100%;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    border-radius: 8px;
}

/* Contenedor de imagen */
.grid-item__image-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #0d0d0d;        /* ← Mismo color que los bordes */
    border-radius: 8px;
}

/* Imágenes reales */
.product-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    background-color: #0d0d0d;
}

.product-image.back {
    opacity: 0;
    z-index: 2;
}

.grid-item:hover .product-image {
    transform: scale(1.04);
}

.grid-item:hover .product-image.back {
    opacity: 1;
}

/* ==================== TARJETA ESPECIAL ==================== */
.special-item .special-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0d0d0d;
    border-radius: 8px;
    color: #fff;
    text-align: center;
    transition: all 0.4s ease;
}

.special-item:hover .special-content {
    background: #1a1a1a;
    transform: scale(1.02);
}

.plus-icon {
    font-size: 4.8rem;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 16px;
    color: #888;
}

.special-text {
    font-size: 1.4rem;
    font-weight: 500;
    color: #ddd;
    margin: 0;
    padding: 0 20px;
}

/* ==================== RESPONSIVE ==================== */

/* Tablet: 3 columnas */
@media (min-width: 768px) {
    .image-grid__item {
        flex: 0 0 calc(33.333% - 11px);
        height: 480px;
    }
}

/* Escritorio grande: 4 columnas */
@media (min-width: 1024px) {
    .image-grid__item {
        flex: 0 0 calc(25% - 12px);
        height: 520px;
        max-width: none;
    }
}
