/* Auto Trader Vehicles — Public Styles */

/* -----------------------------------------------------------------------
   Filter bar
----------------------------------------------------------------------- */
.atv-filter-form {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 32px;
}
.atv-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}
.atv-filter-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 160px;
}
.atv-filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
    color: #555;
}
.atv-filter-group select,
.atv-filter-group input {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.95rem;
    background: #fff;
}
.atv-filter-group select:focus,
.atv-filter-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}
.atv-filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* -----------------------------------------------------------------------
   Buttons
----------------------------------------------------------------------- */
.atv-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s;
}
.atv-btn:active { transform: scale(0.97); }
.atv-btn-primary {
    background: #0073aa;
    color: #fff;
}
.atv-btn-primary:hover  { background: #005a87; color: #fff; }
.atv-btn-secondary {
    background: #e0e0e0;
    color: #333;
}
.atv-btn-secondary:hover { background: #c8c8c8; color: #333; }

/* -----------------------------------------------------------------------
   Vehicle grid
----------------------------------------------------------------------- */
.atv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.atv-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
}
.atv-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.atv-card__image-link {
    display: block;
    position: relative;
}
.atv-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.atv-card__no-image {
    width: 100%;
    height: 200px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

.atv-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
}
.atv-card__badge--sold     { background: #555; }
.atv-card__badge--reserved { background: #e65100; }

.atv-card__body {
    padding: 16px;
}
.atv-card__title {
    font-size: 1.1rem;
    margin: 0 0 4px;
}
.atv-card__title a {
    text-decoration: none;
    color: inherit;
}
.atv-card__title a:hover { color: #0073aa; }

.atv-card__variant {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 12px;
}

.atv-card__specs {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.atv-card__specs li {
    background: #f0f0f0;
    border-radius: 4px;
    padding: 3px 9px;
    font-size: 0.8rem;
    color: #444;
}

.atv-card__price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0073aa;
    margin: 0 0 14px;
}

/* -----------------------------------------------------------------------
   Vehicle detail
----------------------------------------------------------------------- */
.atv-detail { max-width: 960px; margin: 0 auto; }

.atv-gallery { margin-bottom: 28px; }
.atv-gallery__main img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 8px;
}
.atv-gallery__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.atv-gallery__thumb {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s;
}
.atv-gallery__thumb:hover { border-color: #0073aa; }

.atv-detail__title {
    font-size: 1.8rem;
    margin: 0 0 6px;
}
.atv-detail__variant {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
    display: block;
    margin-top: 4px;
}
.atv-detail__price {
    font-size: 2rem;
    font-weight: 700;
    color: #0073aa;
    margin: 10px 0 16px;
}

.atv-detail__status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 16px;
}
.atv-status--sold     { background: #eee; color: #333; }
.atv-status--reserved { background: #fff3e0; color: #e65100; }

.atv-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 28px;
}
.atv-specs-table th,
.atv-specs-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}
.atv-specs-table th {
    font-weight: 600;
    color: #555;
    width: 200px;
    background: #f9f9f9;
}

.atv-detail__description,
.atv-detail__features {
    margin-bottom: 28px;
}
.atv-detail__description h2,
.atv-detail__features h2 {
    font-size: 1.2rem;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.atv-features-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.atv-features-list li {
    padding: 6px 10px 6px 24px;
    position: relative;
    font-size: 0.9rem;
}
.atv-features-list li::before {
    content: '✓';
    position: absolute;
    left: 6px;
    color: #2e7d32;
    font-weight: 700;
}

/* -----------------------------------------------------------------------
   Misc
----------------------------------------------------------------------- */
.atv-no-results { color: #666; font-style: italic; }
.atv-error      { color: #c62828; }

/* Admin fee and price indicator */
.atv-detail__pricing-notes { margin: -10px 0 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.atv-admin-fee  { font-size: 0.85rem; color: #666; margin: 0; }
.atv-price-indicator {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.atv-price-indicator--low   { background: #c8e6c9; color: #1b5e20; }
.atv-price-indicator--great { background: #bbdefb; color: #0d47a1; }
.atv-price-indicator--good  { background: #dcedc8; color: #33691e; }
.atv-price-indicator--fair  { background: #fff9c4; color: #f57f17; }
.atv-price-indicator--high  { background: #ffcdd2; color: #b71c1c; }

@media (max-width: 600px) {
    .atv-filter-row    { flex-direction: column; }
    .atv-filter-group  { flex: 1 1 100%; }
    .atv-filter-actions { flex-direction: column; }
    .atv-btn           { width: 100%; text-align: center; }
    .atv-grid          { grid-template-columns: 1fr; }
    .atv-gallery__thumbs .atv-gallery__thumb { width: 72px; height: 52px; }
}
