/* =====================================================
   Ajustes finales para evitar desbordamiento horizontal
   ===================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

/* Corrección final para scroll horizontal */
html, body {
    overflow-x: hidden; /* Asegura que no haya scroll horizontal en toda la página */
    width: 100%;
}

/* =====================================================
   Estilos generales del contenedor principal
   ===================================================== */
.fortnite-shop-categories {
    border-radius: 10px; /* Esquinas redondeadas */
    padding: 10px; /* Espaciado interno */
    margin: 0; /* Elimina el margen para que ocupe todo el ancho */
    width: 100%; /* Ocupa todo el ancho disponible */
    max-width: 100%; /* Evita desbordamiento */
    min-height: 100vh; /* Asegura que el contenedor tenga al menos la altura de la vista */
    text-align: left; /* Alinear a la izquierda */
    position: relative; /* Para permitir posicionamiento absoluto de elementos hijos */
    font-family: 'Montserrat', sans-serif; /* Cambia la fuente a Montserrat */
    box-sizing: border-box; /* Incluye padding en el ancho total */
    overflow-x: hidden; /* Evita scroll horizontal */
}

/* =====================================================
   Estilo de las rejillas de tarjetas
   ===================================================== */
.product-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columnas por defecto */
    gap: 5px; /* Espaciado entre productos */
    justify-content: center; /* Asegura que las tarjetas se centren */
    width: 100%; /* Asegura que no exceda el contenedor */
    max-width: 100%; /* Evita desbordamiento */
    box-sizing: border-box; /* Incluye padding en el ancho total */
    padding: 0 5px; /* Pequeño padding interior para evitar que las cards toquen bordes */
}

/* =====================================================
   Media Queries para pantallas más grandes
   ===================================================== */
@media (max-width: 1200px) {
    .product-cards {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas en pantallas medianas */
    }
}

@media (max-width: 992px) {
    .fortnite-shop-categories {
        padding: 5px; /* Reduce el padding en tablets */
    }
    .product-cards {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
        justify-items: center; /* Centrar tarjetas en tablets */
        margin-left: auto; /* Centrar el contenido */
        margin-right: auto;
    }
}

/* Ajustes para móviles grandes (tablets pequeñas) */
@media (max-width: 768px) {
    .fortnite-shop-categories {
        padding: 5px; /* Reduce padding en móviles */
        margin: 0; /* Sin margen lateral */
    }

    .product-card {
        grid-template-columns: repeat(2, 1fr);
        width: 100%; /* Asegura que las tarjetas ocupen el 100% del ancho de la columna */
        aspect-ratio: 3 / 4; /* Mantiene el mismo ratio rectangular */
    }

    .product-card-content {
        font-size: 16px; 
    }

    .product-title {
        font-size: 1.4em; 
    }

    .product-price span.amount {
        font-size: 16px; 
    }

    /* Bundle y Pack cards en dispositivos pequeños */
    .product-card.bundle-product,
    .product-card.pack-product {
        aspect-ratio: 3 / 2; /* Ratio más manejable en móviles */
    }

    /* Animación reducida en móviles para mejorar rendimiento */
    .product-card,
    .product-card.bundle-product,
    .product-card.pack-product {
        animation: none !important;
        transition: transform 0.3s ease;
    }

    .product-card:hover,
    .product-card.bundle-product:hover,
    .product-card.pack-product:hover {
        transform: scale(1.03);
    }
}

/* =====================================================
   Estilos de cada tarjeta (.product-card)
   ===================================================== */
.product-card {
    background-color: rgba(168, 230, 207, 0.25); 
    -webkit-backdrop-filter: blur(10px); 
    backdrop-filter: blur(10px); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* === CAMBIO PRINCIPAL: La imagen AHORA CUBRE toda la tarjeta === */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    border-radius: 10px;
    width: 100%;
    aspect-ratio: 3 / 4;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    transition: transform 0.3s, box-shadow 0.3s, background-size 0.3s ease; /* Añadido background-size a la transición */
    cursor: pointer;
}


/* Efecto hover: ligero zoom a la imagen */
.product-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-color: rgba(255, 255, 255, 0.3);
    background-size: 110%; /* Zoom a la imagen al hacer hover */
}


.product-card:hover .product-card-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

/* =====================================================
   Contenido interno de cada tarjeta
   ===================================================== */
.product-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    transition: background 0.3s ease-in-out;
}

.product-title {
    margin: 0;
    padding: 0 0.5em;
    color: white; 
    font-weight: bold;
    font-size: 1.3em;
    text-align: left;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
        text-shadow:
        1px  1px 0 #100537,
       -1px  1px 0 #100537,
        1px -1px 0 #100537,
       -1px -1px 0 #100537,
        1px  0    0 #100537,
       -1px  0    0 #100537,
        0    1px  0 #100537,
        0   -1px  0 #100537;
}

.product-price span.amount {
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-shadow:
        1px  1px 0 #100537,
       -1px  1px 0 #100537,
        1px -1px 0 #100537,
       -1px -1px 0 #100537,
        1px  0    0 #100537,
       -1px  0    0 #100537,
        0    1px  0 #100537,
        0   -1px  0 #100537;
}

.cart-icon {
    position: absolute;
    bottom: 0.5em;
    right: 0.5em;
    font-size: 1.2em;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .cart-icon {
    opacity: 1;
}

/* =====================================================
   Estilos para productos tipo bundle y pack
   ===================================================== */
.product-card.bundle-product,
.product-card.pack-product {
    grid-column: span 2;
    width: 100%;
    max-width: none;
    /* === CAMBIO: Imagen alineada arriba y al centro === */
    background-position: 50% 0%; 
    transition: transform 0.3s ease, background-size 0.3s ease;
    position: relative;
}

.product-card.bundle-product {
    aspect-ratio: 6.05 / 4;
}

.product-card.pack-product {
    aspect-ratio: 6.2 / 4;
    animation: snake-glow 2s infinite;
}

.product-card.pack-product:hover {
    animation: none;
    box-shadow: 
        0 0 8px rgba(255, 0, 0, 0.5),
        0 0 12px rgba(255, 255, 0, 0.5),
        0 0 16px rgba(0, 255, 255, 0.5),
        0 0 20px rgba(0, 0, 255, 0.5);
}

/* Animación de resplandor RGB para packs */
@keyframes snake-glow {
    0%, 100% {
        box-shadow: 
            0 0 3px rgba(255, 0, 0, 0.3), 0 0 6px rgba(255, 255, 0, 0.3),
            0 0 9px rgba(0, 255, 255, 0.3), 0 0 12px rgba(0, 0, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 0 8px rgba(255, 0, 0, 0.5), 0 0 11px rgba(255, 255, 0, 0.5),
            0 0 14px rgba(0, 255, 255, 0.5), 0 0 17px rgba(0, 0, 255, 0.5);
    }
}
/* =====================================================
   Estilo para el título de la tienda
   ===================================================== */
.fortnite-shop-title {
    font-size: 2.5em;
    font-weight: bold;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.fortnite-shop-categories h2 {
    display: none;
}

.fortnite-shop-categories h3 {
    color: white;
    font-size: 2em;
    margin: 30px 0;
    transform: skew(-8deg);
}

.fortnite-shop-categories h2 {
    margin-top: 40px;
}

/* =====================================================
   Nuevos estilos para alinear Descripción y Precio
   ===================================================== */
.product-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4em;
    font-size: 1.1em;
    color: #ffffff;
    margin-top: 0.4em;
    padding: 0 0.5em;
    flex-wrap: wrap;
    text-align: left;
    width: 100%;
}

.product-meta .product-icon {
    width: 1em;
    height: auto;
    margin-right: 2px;
    vertical-align: middle;
    display: inline-block;
}

.product-meta del,
.product-meta ins,
.product-meta .product-price,
.product-meta .product-price span.amount {
    display: inline;
    margin-right: 0.3em;
}

.product-meta {
    gap: 0.2em;
}

@media (max-width: 576px) {
    .product-meta {
        font-size: 1em;
    }
}

.product-description {
    color: #6e6e6e;
    text-decoration-color: #ffffff;
}

.product-description .product-icon {
    filter: grayscale(100%) brightness(60%);
    vertical-align: middle;
    display: inline-block;
}

.product-description del,
.product-description del .woocommerce-Price-amount,
.product-description .woocommerce-Price-amount,
.product-description ins {
    text-decoration: none !important;
    text-decoration-line: none !important;
    color: #ffffff !important;
    filter: none !important;
    opacity: 1 !important;
}

/* =====================================================
   ESTILOS FINALES PARA TARJETAS ACRÍLICAS DE JAM TRACKS
   ===================================================== */
.fortnite-shop-category-block.category-jam-tracks {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    margin-top: 30px;
}

.category-jam-tracks .product-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.product-card--jam-track {
    background: rgba(168, 230, 207, 0.15);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-image: none !important;
    
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-radius: 12px;
    aspect-ratio: 1 / 1.35;
    transition: transform 0.3s ease, background 0.3s ease;
}

.product-card--jam-track:hover {
    transform: translateY(-5px);
    background: rgba(168, 230, 207, 0.25);
    border-color: rgba(255, 255, 255, 0.2);
}

.product-card--jam-track:hover .product-card-content {
    background: none;
}

.product-card--jam-track .jam-track__image {
    width: 95%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
}

.product-card--jam-track .product-card-content {
    position: static;
    background: none;
    padding: 0;
    text-align: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card--jam-track .product-title {
    text-align: center;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: none;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
}

.product-card--jam-track .product-meta {
    justify-content: center;
    font-size: 1.1em;
    margin-top: 0;
    padding-top: 0;
    gap: 0.5em;
}

.product-card--jam-track .product-description {
    color: #a0a3c2;
}

@media (max-width: 1200px) {
    .category-jam-tracks .product-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .category-jam-tracks .product-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* =====================================================
   AJUSTES RESPONSIVOS FINALES PARA MÓVILES
   ===================================================== */
@media (max-width: 768px) {
    .fortnite-shop-categories h3 {
        font-size: 1.6em;
        margin: 20px 0;
    }
    .product-card .product-title {
        font-size: 1.1em;
    }
    .product-card .product-meta {
        font-size: 1em;
    }
    .product-card--jam-track .product-title {
        font-size: 0.9em;
    }
    .product-card--jam-track .product-meta {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .product-card .product-title {
        font-size: 1em;
    }
    .product-card .product-meta {
        font-size: 0.9em;
    }
    .product-card--jam-track .product-title {
        font-size: 0.85em;
    }
    .product-card--jam-track .product-meta {
        font-size: 0.9em;
    }
}