/**
 * REDLINER — Auction System Stylesheet
 * Dark, luxury, high-octane aesthetic tailored for collectible auctions.
 */

:root {
    --auc-bg: #0a0a0c;
    --auc-card-bg: rgba(18, 18, 22, 0.85);
    --auc-border: rgba(255, 255, 255, 0.08);
    --auc-border-hover: rgba(244, 63, 94, 0.4);
    --auc-red: #f43f5e;
    --auc-red-dark: #be123c;
    --auc-gold: #fbbf24;
    --auc-gold-glow: rgba(251, 191, 36, 0.25);
    --auc-green: #10b981;
    --auc-text: #f8fafc;
    --auc-text-muted: #94a3b8;
}

/* ── Container & Hero ── */
.auc-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}

.auc-hero {
    background: linear-gradient(135deg, rgba(244,63,94,0.12) 0%, rgba(20,20,26,0.9) 60%, rgba(10,10,12,1) 100%);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 16px;
    padding: 32px 24px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.auc-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(244,63,94,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.auc-hero-title {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #fff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auc-hero-badge {
    background: linear-gradient(135deg, #f43f5e, #be123c);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.auc-hero-desc {
    color: var(--auc-text-muted);
    font-size: 0.92rem;
    max-width: 680px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.auc-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Filter & Search Bar ── */
.auc-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--auc-card-bg);
    border: 1px solid var(--auc-border);
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.auc-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.auc-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--auc-text-muted);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auc-tab-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.auc-tab-btn.active {
    background: rgba(244, 63, 94, 0.15);
    color: var(--auc-red);
    border-color: rgba(244, 63, 94, 0.35);
}

.auc-search-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--auc-border);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    outline: none;
    min-width: 220px;
    transition: border 0.2s ease;
}

.auc-search-input:focus {
    border-color: var(--auc-red);
}

/* ── Grid of Auction Cards ── */
.auc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.auc-card {
    background: var(--auc-card-bg);
    border: 1px solid var(--auc-border);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.auc-card:hover {
    transform: translateY(-4px);
    border-color: var(--auc-border-hover);
    box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

.auc-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    overflow: hidden;
}

.auc-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.auc-card:hover .auc-card-img {
    transform: scale(1.04);
}

.auc-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    z-index: 2;
}

.auc-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.auc-badge-live {
    background: rgba(225, 29, 72, 0.9);
    color: #fff;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); }
}

.auc-badge-ended {
    background: rgba(100, 116, 139, 0.85);
    color: #f1f5f9;
}

.auc-badge-sold {
    background: rgba(16, 185, 129, 0.85);
    color: #fff;
}

.auc-badge-backedout {
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
}

.auc-card-timer {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: monospace;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.auc-card-timer.urgent {
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.4);
    background: rgba(225, 29, 72, 0.25);
}

.auc-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.auc-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.auc-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--auc-text-muted);
    margin-bottom: 12px;
}

.auc-card-pricing {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--auc-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.auc-price-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--auc-text-muted);
    font-weight: 600;
}

.auc-price-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.auc-price-val.leading {
    color: var(--auc-gold);
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}

.auc-card-negotiate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 8px;
    text-decoration: none !important;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease;
    cursor: pointer;
}

.auc-card-negotiate-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.auc-bids-count {
    font-size: 0.72rem;
    color: var(--auc-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── Single Auction View Detail Page ── */
.auc-detail-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .auc-detail-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.auc-gallery-main {
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--auc-border);
    margin-bottom: 12px;
    position: relative;
}

.auc-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auc-gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.auc-gallery-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    background: #111;
}

.auc-gallery-thumb.active {
    border-color: var(--auc-red);
}

.auc-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Bid Control Box ── */
.auc-bid-box {
    background: var(--auc-card-bg);
    border: 1px solid var(--auc-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.auc-countdown-banner {
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auc-countdown-clock {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: monospace;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auc-current-bid-display {
    text-align: center;
    padding: 18px 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border: 1px solid var(--auc-border);
    margin-bottom: 20px;
}

.auc-current-bid-amount {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--auc-gold);
    letter-spacing: -0.5px;
    margin: 4px 0;
}

.auc-quick-increments {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.auc-increment-btn {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--auc-border);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auc-increment-btn:hover {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.4);
    color: var(--auc-red);
}

.auc-increment-btn:active {
    transform: scale(0.96);
    background: rgba(244, 63, 94, 0.25);
}

.auc-bid-form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.auc-bid-input {
    flex: 1;
    background: rgba(0,0,0,0.4);
    border: 1.5px solid var(--auc-border);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, transform 0.2s;
}

@keyframes bidPulse {
    0% { transform: scale(1); border-color: var(--auc-border); }
    50% { transform: scale(1.02); border-color: var(--auc-gold, #ffd700); box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    100% { transform: scale(1); border-color: var(--auc-border); }
}

.auc-bid-input.pulse {
    animation: bidPulse 0.22s ease-out;
}

.auc-bid-input:focus {
    border-color: var(--auc-red);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

.auc-btn-submit-bid {
    background: linear-gradient(135deg, #f43f5e, #be123c);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}

.auc-btn-submit-bid:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
}

.auc-disclaimer {
    font-size: 0.72rem;
    color: var(--auc-text-muted);
    line-height: 1.45;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 10px 12px;
    border-left: 3px solid #fbbf24;
}

/* ── Live Bids Stream ── */
.auc-bid-history-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.auc-bid-history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    font-size: 0.78rem;
    border: 1px solid rgba(255,255,255,0.04);
}

.auc-bid-history-row.winning {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
}

/* ── Modal Dialogs ── */
.auc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.auc-modal-overlay.active {
    display: flex;
}

.auc-modal {
    background: #141419;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    max-width: 460px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.auc-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auc-modal-body {
    color: var(--auc-text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.auc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.auc-btn-cancel {
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.auc-btn-danger {
    background: #e11d48;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}
