/* ============================================
   AUCTION LISTING PAGE STYLES
   Modern card-based design for vehicle/property listings
   ============================================ */

/* Brand Colors */
:root {
    --brand-aqua: #0C7490;
    --brand-aqua-light: #1fb7cf;
    --brand-aqua-dark: #064a57;
}

/* Compact Hero Section */
.listing-hero-compact {
    background: linear-gradient(90deg, var(--brand-aqua) 0%, var(--brand-aqua-dark) 100%);
    padding: 18px 0 14px;
    color: #ffffff;
}

.listing-hero-compact .auction-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    background: transparent;
    color: #ffffff;
    border-radius: 0;
    box-shadow: none;
}

.listing-hero-title-compact {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.3;
    color: #ffffff;
}

.listing-hero-subtitle-compact {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    opacity: 0.95;
}

/* Page background & container */
.listing-page-bg {
    background: #f1f5f9;
    padding: 32px 0 15px;
}

.auction-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Filters Section */
.listing-filters-wrapper {
    background: #f1f5f9;
    padding: 16px 16px 24px;
}

.listing-filters-wrapper .auction-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    padding: 16px;
}

.listing-filters-form {
    max-width: 100%;
    margin: 0;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 12px;
    align-items: center;
}

@media (max-width: 1200px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: var(--brand-aqua);
}

.filter-select:focus {
    outline: none;
    border-color: var(--brand-aqua);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.filter-button {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--brand-aqua) 0%, var(--brand-aqua-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 140px;
}

.filter-button:hover {
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.4);
    transform: translateY(-1px);
}

/* Stats Bar */
.listing-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 0 0 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-label {
    color: #6b7280;
    font-size: 14px;
}

.stats-value {
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

/* Auction Cards Grid */
.auction-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.auction-card-item {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.auction-card-item:hover {
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    transform: translateY(-4px);
}

/* Card Image */
.auction-card-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f3f4f6;
    display: block;
}

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

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

.auction-card-noimage {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0e7590;
    color: #ffffff;
}

.noimage-icon {
    font-size: 52px;
    margin-bottom: 12px;
    opacity: 0.98;
}

.noimage-text {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
}

/* Price Badge */
.auction-card-price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 999px;
    border: 2px solid var(--brand-aqua-dark);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.price-badge-amount {
    color: var(--brand-aqua-dark);
    font-size: 14px;
    font-weight: 700;
}

/* Status Badge */
.auction-card-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--brand-aqua);
    color: #ffffff;
}

.status-active {
    background: #10b981;
    color: white;
}

.status-ending-soon {
    background: #f59e0b;
    color: white;
}

.status-registration {
    background: #3b82f6;
    color: white;
}

.status-ended {
    background: #6b7280;
    color: white;
}

/* Rating Badge (bottom-left on image) */
.auction-card-rating-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fbbf24; /* amber stars */
}

.auction-card-rating-badge .rating-value {
    font-size: 13px;
    color: #fef9c3;
    font-weight: 600;
}

/* Shared layered star rendering (supports half-stars) */
.rating-stars {
    position: relative;
    display: inline-block;
    line-height: 1;
}

.rating-stars-base,
.rating-stars-fill {
    letter-spacing: 2px;
}

.rating-stars-base {
    color: rgba(248, 250, 252, 0.25); /* light background stars */
}

.rating-stars-fill {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    overflow: hidden;
    color: #fbbf24; /* filled stars */
}

/* Listing card: make stars visually larger (~+30%) */
.auction-card-rating-badge .rating-stars {
    font-size: 18px;
}

/* Card Content */
.auction-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.auction-card-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.auction-card-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auction-card-title a:hover {
    color: var(--brand-aqua);
}

.auction-card-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex: 1;
}

/* Meta Info */
.auction-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}

.meta-icon {
    font-size: 16px;
}

.meta-text {
    font-weight: 500;
}

.meta-item-countdown {
    color: #dc2626;
    font-weight: 600;
}

/* Actions */
.auction-card-actions {
    display: flex;
    gap: 8px;
}

.card-button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.card-button-primary {
    background: linear-gradient(135deg, var(--brand-aqua) 0%, var(--brand-aqua-dark) 100%);
    color: #ffffff !important;
}

.card-button-primary:hover {
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.4);
    transform: translateY(-1px);
}

.card-button-secondary {
    background: white;
    color: var(--brand-aqua);
    border: 2px solid var(--brand-aqua);
}

.card-button-secondary:hover {
    background: var(--brand-aqua);
    color: white;
}

.card-button-full {
    width: 100%;
}

/* Pagination */
.listing-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pagination-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: var(--brand-aqua);
    border: 2px solid var(--brand-aqua);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-button:hover {
    background: var(--brand-aqua);
    color: white;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    color: #6b7280;
    background: white;
    transition: all 0.2s ease;
}

.pagination-number:hover {
    background: #f3f4f6;
    color: #111827;
}

.pagination-current {
    background: linear-gradient(135deg, var(--brand-aqua) 0%, var(--brand-aqua-dark) 100%);
    color: white;
}

.pagination-dots {
    color: #9ca3af;
    padding: 0 4px;
}

/* SEO Content Block */
.listing-seo-content {
    background: white;
    padding: 60px 24px;
    border-top: 1px solid #e5e7eb;
}

.seo-content-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
    text-align: center;
}

.seo-content-text {
    max-width: 900px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

.seo-content-text p {
    margin: 0 0 16px 0;
}

.seo-content-text strong {
    color: #111827;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .listing-hero-compact {
        padding: 16px 20px;
    }

    .listing-hero-title-compact {
        font-size: 18px;
    }

    .listing-hero-subtitle-compact {
        font-size: 13px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-button {
        width: 100%;
        min-width: unset;
    }

    .listing-filters-wrapper {
        padding: 16px;
    }

    .auction-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .listing-stats-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .pagination-button {
        padding: 10px 16px;
        font-size: 14px;
    }

    .seo-content-title {
        font-size: 22px;
    }

    .seo-content-text {
        font-size: 15px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .auction-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1400px) {
    .auction-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
