/* Root Variables - Ensure these match your style.css */
:root {
    --green: #2d5a27;
    --dark-green: #1e3d1a;
    --sage-green: #b8bea0;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.2);
}

.auction-container {
    padding: 120px 5% 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.auction-header {
    text-align: center;
    margin-bottom: 50px;
}

.hero-h2 {
    font-size: 2.5rem;
    margin: 10px 0;
    color: var(--black);
}

/* The Main Grid */
.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* Art Card Styling */
.art-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.art-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Image Container - This defines the "box" size for the image */
/* 1. Fix the grid image size */
.img-container {
    position: relative;
    /* CRITICAL: This anchors the timer */
    width: 100%;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
    /* Fallback color */
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Crops to fill the box perfectly */
    transition: transform 0.3s ease;
}

.img-container:hover img {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

/* 2. The Full-Screen Modal (Hidden by default) */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.timer-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    /* Ensure it starts from the left */
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 0.9rem;
    font-family: 'Courier Prime', monospace;
    z-index: 10;
    /* Ensure it stays above the image */
}

/* Content Inside Card */
.art-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.art-info h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.bid-status {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.current-price {
    color: var(--black);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Inputs and Buttons */
.bid-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.bid-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.bid-input:focus {
    border-color: var(--black);
    outline: none;
}

.bid-btn {
    background: var(--black);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.bid-btn:hover {
    background: var(--dark-green);
}

.buy-btn {
    background: black;
    /* Gold/Yellow for contrast */
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-top: auto;
    /* Pushes to bottom */
}

.buy-btn:hover {
    background: black;
}

/* Animation for real-time updates */
@keyframes pricePop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        color: #e74c3c;
    }

    100% {
        transform: scale(1);
    }
}

.price-updated {
    animation: pricePop 0.6s ease;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001; /* Higher than the modal background */
}

.close-modal:hover {
    color: #bbb;
}