/* Estilo Frontend Flat para Dossier Grid */

#dossier-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Buscador */
.dossier-search-container {
    margin-bottom: 30px;
    margin: 0 auto 30px auto;
    position: relative;
    max-width: 400px;
}

#dossier-search {
    width: 100%;
    padding: 12px 15px;
    padding-right: 40px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 14px;
    color: #333;
    outline: none;
    border-radius: 0;
    box-shadow: none;
}

#dossier-search:focus {
    border-color: #0073aa;
}

#clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    display: none;
    border-radius: 0;
}

#clear-search.show {
    display: block;
}

/* Grid principal - Estilo WooCommerce */
#dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Items del dossier */
.dossier-item {
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.dossier-link:visited {
    color: inherit;
}

/* Imagen del dossier */
.dossier-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dossier-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* Información del dossier */
.dossier-info {
    padding: 15px;
    background: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dossier-sku {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    line-height: 1;
}

.dossier-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin: 0;
}

/* Botón Cargar Más */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

#load-more-dossiers {
    padding: 15px 30px;
    border: 1px solid #ff0303;
    background: #ff0303;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 0;
    box-shadow: none;
}

#load-more-dossiers:hover {
    background: #d60000;
    border-color: #d60000;
}

#load-more-dossiers:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* Sin resultados */
.no-dossiers {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    grid-column: 1 / -1;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 1024px) {
    #dossier-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    #dossier-container {
        padding: 15px;
    }
    
    .dossier-search-container {
        max-width: 100%;
    }
    
    #dossier-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .dossier-image {
        height: 200px;
    }
    
    .dossier-info {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    #dossier-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .dossier-image {
        height: 150px;
    }
    
    .dossier-info {
        padding: 10px;
    }
    
    .dossier-sku {
        font-size: 10px;
        margin-bottom: 5px;
    }
    
    .dossier-title {
        font-size: 12px;
    }
}