/* Car Auction New Page Styles (based on bike-test.css) */

.car-auction-page {
    min-height: 100vh;
    background: #f5f7fa;
    padding-bottom: 2rem;
}

/* Breadcrumbs */
.car-auction-page .breadcrumbs.block {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .car-auction-page .breadcrumbs.block {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* A little breathing room above breadcrumbs on mobile so they don't tuck
   under the fixed header. */
@media (max-width: 767px) {
    .car-auction-page .breadcrumbs.block {
        margin-top: 14px;
    }
}

/* Filter Section */
.car-auction-page .filter-section {
    background: #ffffff;
    padding: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.car-auction-page .filter-form {
    max-width: 100%;
}

.car-auction-page .filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.car-auction-page .filter-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.car-auction-page .filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.car-auction-page .range-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.car-auction-page .range-input input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
}

.car-auction-page .range-separator {
    color: #999;
    font-weight: 600;
}

.car-auction-page .filter-action {
    grid-column: span 1;
}

.car-auction-page .search-button {
    height: 100%;
    min-height: 42px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Results Header */
.car-auction-page .results-header {
    background: linear-gradient(135deg, #fe4847 0%, #b21e1e 100%);
    color: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.car-auction-page .results-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.car-auction-page .results-title .count {
    font-weight: 700;
    font-size: 1.75rem;
}

/* Listing Section */
.car-auction-page .listing-section {
    margin-bottom: 2rem;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 0;
}

/* Car Card */
.car-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.car-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image Section */
.car-image-section {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.car-images {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.car-image {
    flex: 1;
    width: 50%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    background: #f8f8f8;
}

.car-image-primary {
    border-right: 2px solid #fff;
}

.car-card:hover .car-image {
    transform: scale(1.04);
}

.car-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.2) 100%);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.car-card:hover .car-overlay {
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.car-status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    pointer-events: auto;
}

.car-status-badge.status-green {
    background: #10b981;
}

.car-status-badge.status-blue {
    background: #fe4847;
}

.car-status-badge.status-yellow {
    background: #f59e0b;
}

.car-status-badge.status-red {
    background: #ef4444;
}

/* Content Section */
.car-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.car-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    gap: 0.5rem;
}

.car-lot-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.car-auction-name {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.car-lot-number {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.car-date {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.car-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.car-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.car-title a:hover {
    color: #d13035;
}

.car-grade {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 1rem;
    min-height: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Specs Grid */
.car-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.car-specs .spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.car-specs .spec-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.car-specs .spec-value {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.car-specs .serial-value {
    font-size: 0.75rem;
    color: #6b7280;
}

.car-specs .rating-green {
    color: #10b981;
    font-weight: 700;
}

.car-specs .rating-blue {
    color: #fe4847;
    font-weight: 700;
}

.car-specs .rating-yellow {
    color: #f59e0b;
    font-weight: 700;
}

.car-specs .rating-red {
    color: #ef4444;
    font-weight: 700;
}

/* Price Section */
.car-price-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fe4847 0%, #b21e1e 100%);
    border-radius: 8px;
    color: white;
}

.car-price-section .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.car-price-section .price-row:last-child {
    margin-bottom: 0;
}

.car-price-section .price-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.car-price-section .price-value {
    font-size: 1.125rem;
    font-weight: 700;
}

.car-price-section .end-price {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.3);
}

/* Actions */
.car-actions {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.car-bid-section {
    margin-bottom: 0.75rem;
}

.car-bid-section .ui.form {
    margin: 0;
}

.car-bid-section .field {
    margin-bottom: 0.5rem;
}

.car-bid-section .ui.button {
    width: 100%;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.car-watchlist {
    text-align: center;
}

.car-watchlist .watchlist-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    cursor: pointer;
}

.car-watchlist .watchlist-link:hover {
    color: #fbbf24;
}

.car-watchlist .watchlist-link .icon.yellow {
    color: #fbbf24;
}

/* Pagination */
.car-auction-page .pagination-section {
    margin-top: 3rem;
    padding: 2rem 0;
}

.car-auction-page .pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.car-auction-page .pagination-btn {
    min-width: 100px;
}

.car-auction-page .page-selector {
    min-width: 80px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .car-auction-page .filter-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .car-auction-page .filter-group.filter-full,
    .car-auction-page .filter-group.filter-action {
        grid-column: 1 / -1;
    }

    .car-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .car-image-section {
        height: 200px;
    }

    .car-auction-page .results-title {
        font-size: 1.25rem;
    }

    .car-auction-page .results-title .count {
        font-size: 1.5rem;
    }

    .car-auction-page .pagination-wrapper {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .car-auction-page .filter-section {
        padding: 1.25rem 0;
    }

    .car-auction-page .filter-grid {
        grid-template-columns: 1fr;
    }

    .car-content {
        padding: 1rem;
    }

    .car-image-section {
        height: 180px;
    }

    .car-title {
        font-size: 1rem;
    }

    /* Keep specs as a compact 2-column grid even on small screens */
    .car-specs {
        grid-template-columns: 1fr 1fr;
        padding: 0.85rem;
        gap: 0.6rem;
    }
}

/* Loading State */
.car-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

.car-card.loading .car-image-section {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: carLoading 1.5s infinite;
}

@keyframes carLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
