/* OneFlow Collection List & Detail Styles
 * Uses OneFlow CSS custom properties for automatic light/dark theme fit.
 */

.collection-section {
    padding: clamp(3rem, 6vw, 5rem) var(--container-padding, clamp(1.25rem, 4vw, 2.5rem));
}

.collection-container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.collection-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent, #c5a059);
    margin: 0 0 0.4rem;
    font-weight: 600;
}

.collection-headline {
    margin: 0 0 0.5rem;
    color: var(--color-text, inherit);
}

.collection-intro {
    max-width: 65ch;
    color: var(--color-text-muted, inherit);
    opacity: 0.88;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}

.collection-card {
    background: rgba(127, 127, 127, 0.06);
    border: 1px solid rgba(127, 127, 127, 0.22);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.collection-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent, #c5a059);
}

.collection-card.is-sold {
    opacity: 0.78;
}

.collection-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.collection-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: rgba(127, 127, 127, 0.12);
    overflow: hidden;
}

.collection-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.collection-card.is-sold .collection-card-media img {
    filter: grayscale(35%);
}

.collection-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

.collection-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: #1f2937;
    color: #ffffff;
}

.collection-badge.status-available {
    background: #166534;
    color: #ffffff;
}

.collection-badge.status-reserved {
    background: #92400e;
    color: #ffffff;
}

.collection-badge.status-sold {
    background: #4b5563;
    color: #ffffff;
}

.collection-badge.status-draft {
    background: #6b21a8;
    color: #ffffff;
}

.collection-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.85rem;
}

.collection-card-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
}

.collection-card-specs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    font-size: 0.88rem;
    opacity: 0.85;
}

.collection-card-specs li::before {
    content: "\2022";
    margin-right: 0.45rem;
    opacity: 0.5;
}

.collection-card-specs li:first-child::before {
    display: none;
}

.collection-card-footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(127, 127, 127, 0.18);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.collection-card-price strong {
    display: block;
    font-size: 1.2rem;
    color: var(--color-accent, inherit);
}

.collection-card-tax {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.15rem;
}

.collection-card-more {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.collection-empty {
    padding: 2.5rem 2rem;
    border: 1px dashed rgba(127, 127, 127, 0.35);
    border-radius: 10px;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.collection-empty h3 {
    margin-top: 0;
}

.collection-empty-text {
    margin: 0.75rem 0 1.5rem;
    opacity: 0.88;
}

.collection-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.35rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.collection-btn:hover {
    opacity: 0.9;
}

.collection-btn-primary {
    background: var(--color-accent, var(--color-primary, #1f2937));
    color: var(--color-on-accent, #ffffff);
}

.collection-btn-secondary {
    background: transparent;
    color: inherit;
    border-color: rgba(127, 127, 127, 0.45);
}

.collection-btn-admin {
    background: #1f2937;
    color: #ffffff;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* Detail page */
.vehicle-detail {
    padding: 2.5rem var(--container-padding, clamp(1.25rem, 4vw, 2.5rem)) 4rem;
}

.vehicle-detail .container,
.collection-footer .container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--container-padding, 0);
}

.vehicle-detail-top {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 2.25rem;
    align-items: start;
}

.vehicle-gallery-main {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(127, 127, 127, 0.12);
}

.vehicle-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vehicle-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.vehicle-thumb-btn {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    cursor: pointer;
    background: none;
}

.vehicle-thumb-btn.is-active {
    border-color: var(--color-accent, #c5a059);
}

.vehicle-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vehicle-summary {
    background: rgba(127, 127, 127, 0.06);
    border: 1px solid rgba(127, 127, 127, 0.22);
    border-radius: 10px;
    padding: 1.5rem;
}

.vehicle-summary-badge {
    position: static;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.vehicle-detail-title {
    margin: 0 0 0.75rem;
    font-size: 1.7rem;
    line-height: 1.25;
}

.vehicle-detail-price {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--color-accent, inherit);
    margin: 0;
}

.vehicle-detail-tax {
    font-size: 0.85rem;
    opacity: 0.78;
    margin: 0.25rem 0 1.25rem;
}

.vehicle-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.95rem;
}

.vehicle-specs-table th,
.vehicle-specs-table td {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(127, 127, 127, 0.18);
    text-align: left;
}

.vehicle-specs-table th {
    opacity: 0.75;
    font-weight: 500;
    width: 45%;
}

.vehicle-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.vehicle-wa-note {
    font-size: 0.78rem;
    opacity: 0.72;
    margin: 0;
    line-height: 1.4;
}

.vehicle-details-grid {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.vehicle-detail-block {
    background: rgba(127, 127, 127, 0.05);
    border: 1px solid rgba(127, 127, 127, 0.2);
    border-radius: 10px;
    padding: 1.4rem;
}

.vehicle-detail-block h2 {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
}

.vehicle-equipment-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.35rem 1rem;
}

.vehicle-back-link {
    display: inline-block;
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    text-decoration: none;
    color: inherit;
    opacity: 0.8;
}

.vehicle-back-link:hover {
    opacity: 1;
}

.vehicle-envkv {
    margin-top: 1.5rem;
    font-size: 0.82rem;
    opacity: 0.75;
    line-height: 1.5;
}

@media (max-width: 860px) {
    .vehicle-detail-top {
        grid-template-columns: 1fr;
    }
}
