/* =============================================
   GRID RESPONSIVE (6, 3, 2 columnas)
   ============================================= */
.sjd-grid-container {
    display: grid;
    gap: 20px; /* Espacio reducido para más columnas */
    grid-template-columns: repeat(6, 1fr); /* Escritorio: 6 columnas */
}

@media (max-width: 980px) {
    .sjd-grid-container {
        grid-template-columns: repeat(3, 1fr); /* Tablet: 3 columnas */
    }
}

@media (max-width: 767px) {
    .sjd-grid-container {
        grid-template-columns: repeat(2, 1fr); /* Móvil: 2 columnas */
    }
}

/* =============================================
   ESTILOS VISUALES DE CADA ITEM
   ============================================= */
.sjd-grid-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sjd-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.sjd-grid-item a {
    text-decoration: none;
    color: inherit;
}

.sjd-grid-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.sjd-grid-item-content {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.sjd-grid-item-content h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    line-height: 1.3;
}

.sjd-item-category {
    font-size: 13px;
    color: #888;
    display: block;
}
        
/* =============================================
   ESTILOS DEL MODAL
   ============================================= */
#sjd-modal-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.sjd-modal-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.75); cursor: pointer;
}
.sjd-modal-content {
    position: relative; background-color: #fff; width: 90%; max-width: 800px;
    max-height: 90vh; overflow-y: auto; padding: 40px; border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); z-index: 10001;
}
.sjd-modal-close-btn {
    position: absolute; top: 10px; right: 15px; background: none; border: none;
    font-size: 30px; line-height: 1; color: #888; cursor: pointer; padding: 5px;
}
.sjd-modal-close-btn:hover { color: #000; }
.sjd-modal-body img {
    max-width: 100%; height: auto; display: block;
    margin: 0 auto 20px auto; border-radius: 5px;
}
.sjd-modal-body h2 { margin-top: 0; margin-bottom: 20px; }
.sjd-modal-body .loading-spinner { text-align: center; font-size: 20px; padding: 50px 0; }