/* Auction Grid Styles */
.auction-grid {
    display: grid;
    /* Desktop: prefer 4 columns. Use minmax so layout gracefully collapses on smaller screens */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
    padding: 1.2rem 0;
}

@media (max-width: 1100px) {
    .auction-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .auction-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .auction-grid {
        grid-template-columns: 1fr;
    }
}

.auction-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transform: none;
    margin: 0;
    /* Reduce padding to make cards visually smaller */
    padding: 0.9rem;
}

.auction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(57, 255, 20, 0.1);
}

.auction-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.auction-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.countdown-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(57, 255, 20, 0.9);
    color: #111;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.auction-card-content {
    padding: 1.5rem;
}

.auction-title {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

.auction-title a {
    color: #fff;
    text-decoration: none;
}

.auction-title a:hover {
    color: #39FF14;
}

.auction-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #222;
    border-radius: 4px;
}

.current-bid {
    display: flex;
    flex-direction: column;
}

.bid-label {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.25rem;
}

.bid-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: #39FF14;
}

.bid-count {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-timer {
    color: #39FF14;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    background: #1a4a1a;
    border-radius: 8px;
    border: 1px solid #2a5a2a;
}

.countdown-timer.urgent {
    background: #4a2a1a;
    animation: pulse 1s infinite;
}

.countdown-timer.ended {
    background: #4a1a1a;
    color: #ff6b6b;
}

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

/* Bid Form Styles */
.bid-form {
    background: #2a2a2a;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.bid-form input {
    width: 100%;
    padding: 0.75rem;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.bid-form button {
    background: #39FF14;
    color: #111;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.bid-form button:hover {
    background: #2dd10f;
}

.bid-form button:disabled {
    background: #666;
    cursor: not-allowed;
}

.bid-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.bid-message.success {
    background: #1a4a1a;
    color: #39FF14;
    border: 1px solid #2a5a2a;
}

.bid-message.error {
    background: #4a1a1a;
    color: #ff6b6b;
    border: 1px solid #5a2a2a;
}

/* Archive Controls */
.auction-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.auction-controls select {
    padding: 0.5rem;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
}

/* Responsive */
/* Login Modal Styles */
.login-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    z-index: 99999 !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.login-modal.show {
    display: flex !important;
}

.login-modal-content {
    background: #1a1a1a !important;
    border: 2px solid #39FF14 !important;
    border-radius: 8px !important;
    padding: 2rem !important;
    max-width: 400px !important;
    width: 90% !important;
    position: relative !important;
    box-shadow: 0 10px 30px rgba(57, 255, 20, 0.3) !important;
    margin: auto !important;
}

.login-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #39FF14;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modal-close:hover {
    color: #fff;
}

.login-modal h3 {
    color: #39FF14;
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-modal .form-group {
    margin-bottom: 1rem;
}

.login-modal label {
    display: block;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.login-modal input {
    width: 100%;
    padding: 0.75rem;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-modal input:focus {
    border-color: #39FF14;
    outline: none;
}

.login-modal .btn {
    width: 100%;
    margin-bottom: 1rem;
}

.login-modal .auth-links {
    text-align: center;
    margin-top: 1rem;
}

.login-modal .auth-links a {
    color: #39FF14;
    text-decoration: none;
    margin: 0 0.5rem;
}

.login-modal .auth-links a:hover {
    text-decoration: underline;
}

/* Bid Modal Styles */
.bid-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    z-index: 99999 !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.bid-modal.show {
    display: flex !important;
}

.bid-modal-content {
    background: #1a1a1a !important;
    border: 2px solid #39FF14 !important;
    border-radius: 8px !important;
    padding: 2rem !important;
    max-width: 450px !important;
    width: 90% !important;
    position: relative !important;
    box-shadow: 0 10px 30px rgba(57, 255, 20, 0.3) !important;
    margin: auto !important;
}

.bid-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #39FF14;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bid-modal-close:hover {
    color: #fff;
}

.bid-modal h3 {
    color: #39FF14;
    margin-bottom: 1rem;
    text-align: center;
}

.bid-modal .auction-info {
    background: #222;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.bid-modal .current-bid {
    color: #39FF14;
    font-size: 1.2rem;
    font-weight: bold;
}

.bid-modal .min-bid {
    color: #ccc;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.bid-modal .form-group {
    margin-bottom: 1rem;
}

.bid-modal label {
    display: block;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.bid-modal input {
    width: 100%;
    padding: 0.75rem;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

.bid-modal input:focus {
    border-color: #39FF14;
    outline: none;
}

.bid-modal .btn {
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    padding: 1rem;
}

.bid-modal .bid-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.bid-modal .bid-message.success {
    background: #1a4a1a;
    color: #39FF14;
    border: 1px solid #2a5a2a;
}

.bid-modal .bid-message.error {
    background: #4a1a1a;
    color: #ff6b6b;
    border: 1px solid #5a2a2a;
}

/* Hero */
.hero-hero { background: #060606; padding: 48px; border-radius: 8px; }
.hero-title { color: var(--accent-primary); font-size: 36px; margin-bottom: 8px; }
.hero-sub { color: var(--muted); font-size: 18px; margin-bottom: 16px; }
.hero-cta { padding: 12px 20px; border-radius: 6px; font-weight: 700; text-decoration: none; display: inline-block; }
.hero-img { max-width: 100%; border-radius: 18px; box-shadow: 0 0 32px var(--accent-primary); display: block; }
.trust-row { margin-top: 22px; display: flex; gap: 18px; flex-wrap: wrap; }
.trust-item { display: flex; flex-direction: column; }
.trust-highlight { color: var(--accent-primary); }
.trust-sub { color: var(--muted); font-size: 0.9rem; }

/* Bid box */
.bid-box { background: #0f0f0f; padding: 18px; border-radius: 8px; }
.bid-box .current-high, .bid-box .min-next { margin-top: 12px; color: #999; }
.accent-primary { color: var(--accent-primary); }
.accent-secondary { color: var(--accent-secondary); }
.bid-box-form .bid-input { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid #333; background: #111; color: #fff; box-sizing: border-box; }
.bid-box-form .bid-submit-btn { width: 100%; margin-top: 8px; color: #111; border: none; padding: 10px; border-radius: 6px; font-weight: 700; }

/* Product banner */
.product-banner { background: #0b0b0b; padding: 12px; border-radius: 6px; margin-bottom: 12px; }
.product-banner-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* Utility */
.hidden { display: none !important; }
.small-muted { color: #999; }

/* Leading bidder */
.leading-bidder { margin-bottom: 1rem; color: #ccc; }
.leading-label { color: #999; font-size: 0.85rem; }
.leading-name { color: #39FF14; font-weight: 600; margin-left: 0.4rem; }

/* Modal/bid message classes already exist but ensure bid-message hidden state */
.bid-message.hidden { display: none; }

/* Ensure hero-buttons spacing */
.hero-buttons { display:flex; gap: 12px; justify-content:center; align-items:center; }

@media (max-width: 768px) {
    .auction-grid {
        grid-template-columns: 1fr;
    }
    
    .auction-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .login-modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}