/**
 * Estilos para listagem de leilões
 */

.auctions-section {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auctions-section .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0;
}

.auctions-section .card-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.auctions-count {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.count-text {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== GRID DE LEILÕES ===== */
.auctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 0;
}

@media (min-width: 768px) {
    .auctions-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .auctions-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }
}

/* ===== CARD DE LEILÃO ===== */
.auction-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.auction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.auction-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* ===== IMAGEM ===== */
.auction-image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f3f4f6;
}

.auction-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.auction-card:hover .auction-image {
    transform: scale(1.05);
}

.auction-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

/* ===== BADGES ===== */
.auction-badges {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.auction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #111827;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.badge-bids {
    color: #1e40af;
}

.badge-urgent {
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
    animation: pulse 2s infinite;
}

.badge-finished {
    background: rgba(107, 114, 128, 0.95);
    color: #ffffff;
}

.badge-scheduled {
    background: rgba(59, 130, 246, 0.95);
    color: #ffffff;
}

/* Estilos para leilões finalizados */
.auction-card.auction-finished {
    opacity: 0.75;
    border-color: #d1d5db;
}

.auction-card.auction-finished:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.auction-card.auction-finished .auction-image {
    filter: grayscale(0.5);
}

/* Estilos para leilões agendados */
.auction-card.auction-scheduled {
    border-color: #93c5fd;
    background: linear-gradient(to bottom, #ffffff 0%, #f0f9ff 100%);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ===== CONTEÚDO ===== */
.auction-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.auction-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.2em;
}

/* ===== VENDEDOR ===== */
.auction-seller {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.seller-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.seller-name {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== DATAS ===== */
.auction-dates {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.875rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
}

.date-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.date-info svg {
    flex-shrink: 0;
    color: #0369a1;
}

.date-label {
    color: #6b7280;
    font-weight: 500;
    min-width: 70px;
}

.date-value {
    color: #111827;
    font-weight: 600;
    flex: 1;
}

/* ===== INFORMAÇÕES DE LANCES ===== */
.auction-bids-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0.875rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.bids-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bids-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bids-value {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.bids-value.price {
    color: #059669;
    font-size: 1.125rem;
}

/* ===== PREÇO ===== */
.auction-price-section {
    padding: 1rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.price-label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.price-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

/* ===== TIMER ===== */
.auction-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 0.5rem;
    color: #92400e;
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: auto;
}

.timer-urgent {
    background: #fee2e2;
    border-color: #f87171;
    color: #991b1b;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% {
        border-color: #f87171;
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.4);
    }
    50% {
        border-color: #ef4444;
        box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
    }
}

.timer-text {
    font-weight: 600;
}

/* ===== ESTADO VAZIO ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-state svg {
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: #6b7280;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 640px) {
    .auctions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .auction-image-wrapper {
        height: 200px;
    }
    
    .auctions-section .card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .auctions-section .card-title {
        font-size: 1.5rem;
    }
    
    .auction-content {
        padding: 1.25rem;
    }
    
    .price-value {
        font-size: 1.5rem;
    }
    
    .auction-dates {
        padding: 0.75rem;
    }
    
    .date-info {
        font-size: 0.75rem;
    }
    
    .date-label {
        min-width: 60px;
    }
    
    .auction-bids-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .bids-value {
        font-size: 0.9375rem;
    }
    
    .bids-value.price {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .auctions-section {
        padding: 0 0.75rem;
    }
    
    .auction-image-wrapper {
        height: 180px;
    }
    
    .auction-content {
        padding: 1rem;
        gap: 0.75rem;
    }
}

/* ===== ANIMAÇÕES ===== */
.auction-card {
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.auction-card:nth-child(1) { animation-delay: 0.05s; }
.auction-card:nth-child(2) { animation-delay: 0.1s; }
.auction-card:nth-child(3) { animation-delay: 0.15s; }
.auction-card:nth-child(4) { animation-delay: 0.2s; }
.auction-card:nth-child(5) { animation-delay: 0.25s; }
.auction-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
