/* ========================================
   WIDGETS DE SUBASTAS - ESTILOS
   ======================================== */

/* GRID PRINCIPAL */
.wsw-subastas-grid {
    display: grid;
    gap: 25px;
    margin-top: 20px;
}

/* Configuraciones de columnas */
.wsw-columnas-1 { grid-template-columns: 1fr; }
.wsw-columnas-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.wsw-columnas-3 { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }
.wsw-columnas-4 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* TARJETAS DE SUBASTA */
.wsw-subasta-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.wsw-subasta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* HEADER DE SUBASTA */
.wsw-subasta-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wsw-subasta-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.wsw-subasta-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.wsw-subasta-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wsw-subasta-meta i {
    font-size: 16px;
}

/* BADGES DE ESTADO */
.wsw-estado-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
}

.wsw-estado-badge.activa {
    background: #e8f5e8;
    color: #2e7d32;
}

.wsw-estado-badge.programada {
    background: #e3f2fd;
    color: #1565c0;
}

/* VEHÍCULOS DESTACADOS */
.wsw-vehiculos-destacados {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.wsw-vehiculo-item {
    text-align: center;
}

.wsw-vehiculo-imagen {
    position: relative;
    width: 100%;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    background: #f5f5f5;
}

.wsw-vehiculo-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.wsw-vehiculo-imagen:hover img {
    transform: scale(1.05);
}

.wsw-imagen-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.wsw-imagen-placeholder i {
    font-size: 36px;
}

/* OVERLAY DE PRECIOS */
.wsw-precio-overlay {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.wsw-precio-overlay.precio-salida {
    background: rgba(255,152,0,0.9);
}

/* INFO DE VEHÍCULOS */
.wsw-vehiculo-info h4 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
    min-height: 32px;
}

.wsw-precio-salida,
.wsw-mi-puja {
    margin: 0;
    font-size: 11px;
    color: #666;
}

.wsw-mi-puja {
    color: #1a73e8;
    font-weight: 500;
}

/* MÁS VEHÍCULOS */
.wsw-mas-vehiculos {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    min-height: 90px;
}

/* ACCIONES DE SUBASTA */
.wsw-subasta-acciones {
    padding: 15px 20px;
    background: #fafafa;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

/* BOTONES */
.wsw-btn-primary,
.wsw-btn-secondary,
.wsw-btn-outline {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    border: none;
    cursor: pointer;
    text-align: center;
}

.wsw-btn-primary {
    background: #1a73e8;
    color: white;
    flex: 1;
    justify-content: center;
}

.wsw-btn-primary:hover {
    background: #1557b7;
    color: white;
    text-decoration: none;
}

.wsw-btn-secondary {
    background: white;
    color: #5f6368;
    border: 1px solid #dadce0;
}

.wsw-btn-secondary:hover {
    background: #f8f9fa;
    color: #5f6368;
    text-decoration: none;
}

.wsw-btn-outline {
    flex: 1;
    border: 1px solid #1a73e8;
    color: #1a73e8;
    background: white;
    justify-content: center;
}

.wsw-btn-outline:hover {
    background: #1a73e8;
    color: white;
    text-decoration: none;
}

/* ========================================
   PRÓXIMAS SUBASTAS
   ======================================== */

.wsw-proximas-subastas {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.wsw-proxima-subasta-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e8eaed;
    overflow: hidden;
    transition: all 0.2s ease;
}

.wsw-proxima-subasta-card:hover {
    border-color: #1a73e8;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.1);
}

.wsw-proxima-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #f8f9fa;
}

.wsw-proxima-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wsw-proxima-fecha,
.wsw-proxima-vehiculos {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.wsw-proxima-fecha i,
.wsw-proxima-vehiculos i {
    font-size: 16px;
}

.wsw-proxima-preview {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.wsw-preview-vehiculo {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.wsw-preview-vehiculo:last-child {
    margin-bottom: 0;
}

.wsw-preview-imagen {
    width: 60px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}

.wsw-preview-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wsw-preview-imagen .wsw-imagen-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ccc;
}

.wsw-preview-imagen .wsw-imagen-placeholder i {
    font-size: 20px;
}

.wsw-preview-info h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.wsw-preview-info p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.wsw-proxima-acciones {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
}

/* ========================================
   SUBASTAS DESTACADAS (COMBO)
   ======================================== */

.wsw-subastas-destacadas {
    margin: 20px 0;
}

.wsw-seccion-destacadas {
    margin-bottom: 40px;
}

.wsw-seccion-destacadas:last-child {
    margin-bottom: 0;
}

.wsw-seccion-titulo {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a73e8;
}

/* ========================================
   EMPTY STATES
   ======================================== */

.wsw-empty-subastas {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
}

.wsw-empty-subastas i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ccc;
}

.wsw-empty-subastas p {
    margin: 0;
    font-size: 16px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .wsw-columnas-4 { 
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    }
    .wsw-columnas-3 { 
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    }
}

@media (max-width: 768px) {
    .wsw-subastas-grid,
    .wsw-proximas-subastas {
        grid-template-columns: 1fr !important;
    }
    
    .wsw-subasta-header,
    .wsw-proxima-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .wsw-subasta-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .wsw-vehiculos-destacados {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wsw-subasta-acciones {
        flex-direction: column;
    }
    
    .wsw-btn-primary,
    .wsw-btn-secondary,
    .wsw-btn-outline {
        width: 100%;
        justify-content: center;
    }
    
    .wsw-seccion-titulo {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .wsw-vehiculos-destacados {
        grid-template-columns: 1fr;
    }
    
    .wsw-subasta-header,
    .wsw-proxima-header {
        padding: 15px;
    }
    
    .wsw-vehiculos-destacados {
        padding: 10px;
    }
    
    .wsw-subasta-acciones,
    .wsw-proxima-acciones {
        padding: 10px 15px;
    }
}

/* ========================================
   LOADING STATES
   ======================================== */

.wsw-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.wsw-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a73e8;
    border-radius: 50%;
    animation: wsw-spin 1s linear infinite;
}

@keyframes wsw-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.wsw-btn-primary:focus,
.wsw-btn-secondary:focus,
.wsw-btn-outline:focus {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

.wsw-vehiculo-imagen img:focus {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

/* Reducir animaciones para usuarios con preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .wsw-subasta-card,
    .wsw-vehiculo-imagen img,
    .wsw-btn-primary,
    .wsw-btn-secondary,
    .wsw-btn-outline {
        transition: none;
    }
    
    .wsw-subasta-card:hover {
        transform: none;
    }
    
    .wsw-vehiculo-imagen:hover img {
        transform: none;
    }
    
    .wsw-spinner {
        animation: none;
    }
}