﻿/* =========================================
   Winner Bar
   ========================================= */
.winner-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 0;
}

/* Header row */
.auction-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff0f0;
    border: 1px solid #ffd0d0;
    color: #c0392b;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c3947;
    text-decoration: none;
    white-space: nowrap;
}

    .view-all-link svg {
        width: 16px;
        height: 16px;
        transition: transform .2s;
    }

    .view-all-link:hover svg {
        transform: translateX(3px);
    }

/* =========================================
   Winner Card — Horizontal layout (default)
   ========================================= */
.winner-card {
    display: flex;
    flex-direction: row;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(44, 57, 71, 0.12);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    height: 100%;
}

    .winner-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    }

.winner-card--featured {
    border-color: rgba(44, 57, 71, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Image panel */
.winner-card__image {
    position: relative;
    width: 150px;
    height:150px;  
    flex-shrink: 0;
    overflow: hidden;
}

    .winner-card__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .4s ease;
    }

.winner-card:hover .winner-card__image img {
    transform: scale(1.05);
}

.trending-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #e67e22;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 2;
    white-space: nowrap;
}

.bid-count-badge {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3947;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Body panel */
.winner-card__body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 16px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* Bidder row */
.bidder-stack {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.bidder-dots {
    display: flex;
    gap: 3px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #27ae60;
    animation: dot-pulse 1.5s infinite;
}

    .dot:nth-child(2) {
        animation-delay: .3s;
    }

    .dot:nth-child(3) {
        animation-delay: .6s;
    }

@keyframes dot-pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .25;
    }
}

.bidder-count-text {
    font-size: 0.72rem;
    color: #5d6d7e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .bidder-count-text strong {
        color: #2c3947;
    }

/* Title */
.winner-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.35;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer: price + button */
.winner-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap; /* wraps on narrow bodies */
}

.current-price-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.price-label {
    font-size: 0.6rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}

.price-value {
    font-size: 1rem;
    font-weight: 800;
    color: #2c3947;
    white-space: nowrap;
}

.bid-btn {
    flex-shrink: 0;
    display: inline-block;
    background: #2c3947;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, transform .15s;
}

    .bid-btn:hover {
        background: #3e4f61;
        color: #fff;
        transform: translateY(-1px);
    }

/* =========================================
   Responsive
   ========================================= */

/* Tablet: cards are in 3 cols → body too narrow → stack footer */
@media (max-width: 1199px) {
    .winner-card__image {
        width: 120px;
    }

    .winner-card__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .bid-btn {
        width: 100%;
        text-align: center;
    }
}

/* Small tablet / large phone: switch to 1 col, restore horizontal */
@media (max-width: 767px) {
    .winner-card__image {
        width: 140px;
    }

    .winner-card__footer {
        flex-direction: row;
        align-items: flex-end;
    }

    .bid-btn {
        width: auto;
    }
}

/* Small phone: go fully vertical */
@media (max-width: 480px) {
    .winner-card {
        flex-direction: column;
    }

    .winner-card__image {
        width: 100%;
        height: 160px;
    }

    .winner-card__footer {
        flex-direction: row;
        align-items: flex-end;
        flex-wrap: nowrap;
    }

    .bid-btn {
        width: auto;
        flex-shrink: 0;
    }
}
