/* ============================================================
   TIDAHOLMS CARS — Frontend Styles
   ============================================================ */

/* ---- Car listing grid ---------------------------------------- */

.tc-cars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 32px;
}

.tc-no-cars {
    margin-top: 24px;
    color: #555;
    font-style: italic;
}

/* Card */

.tc-car-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.tc-car-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Card image */

.tc-car-card__image-link {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f0f0f0;
    text-decoration: none;
}

.tc-car-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.tc-car-card:hover .tc-car-card__image {
    transform: scale(1.03);
}

.tc-car-card__image--placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 25%, #d8d8d8 100%);
}

/* Status badges */

.tc-car-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tc-car-card__badge--reserved {
    background: #e07b00;
    color: #fff;
}

.tc-car-card__badge--sold {
    background: #c0021a;
    color: #fff;
}

/* Card body */

.tc-car-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
}

.tc-car-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
}

.tc-car-card__specs {
    font-size: 0.82rem;
    color: #888;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tc-car-card__excerpt {
    font-size: 0.9rem;
    color: #555;
    flex: 1;
    margin: 0 0 12px;
    line-height: 1.5;
}

.tc-car-card__price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 14px;
}

.tc-car-card__link {
    display: inline-block;
    align-self: flex-start;
    padding: 8px 18px;
    background: #111;
    color: #fff !important;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.15s;
}

.tc-car-card__link:hover {
    background: #333;
    color: #fff !important;
    text-decoration: none !important;
}

/* Grid responsive */

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

@media (max-width: 540px) {
    .tc-cars-grid { grid-template-columns: 1fr; }
}

/* ---- Single car page ----------------------------------------- */

.tc-single-car {
    max-width: 960px;
    margin: 0 auto;
    padding-bottom: 48px;
}

/* Header: title + price */

.tc-single-car__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tc-single-car__title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tc-single-car__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.tc-single-car__status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.tc-single-car__status--reserverad {
    background: #e07b00;
    color: #fff;
}

.tc-single-car__status--sald {
    background: #c0021a;
    color: #fff;
}

.tc-single-car__price {
    font-size: 1.7rem;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    margin: 0;
}

/* Hero image */

.tc-single-car__hero {
    margin-bottom: 32px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
    line-height: 0;
}

.tc-single-car__hero-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 520px;
    object-fit: cover;
}

/* Content area: two-column grid */

.tc-single-car__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
}

.tc-single-car__section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e5e5;
}

/* Specs table */

.tc-single-car__specs-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 20px;
    margin: 0;
}

.tc-single-car__spec {
    display: contents;
}

.tc-single-car__spec dt {
    font-size: 0.85rem;
    color: #888;
    font-weight: 400;
    white-space: nowrap;
}

.tc-single-car__spec dd {
    font-size: 0.9rem;
    color: #111;
    font-weight: 600;
    margin: 0;
}

/* Equipment list */

.tc-single-car__equipment-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.tc-single-car__equipment-list li {
    font-size: 0.88rem;
    color: #333;
    padding-left: 18px;
    position: relative;
    line-height: 1.4;
}

.tc-single-car__equipment-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #3a8a3a;
    font-weight: 700;
}

/* Description */

.tc-single-car__description {
    grid-column: 1 / -1;
}

/* CTA block */

.tc-single-car__cta {
    grid-column: 1 / -1;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 28px 24px;
    text-align: center;
}

.tc-single-car__cta p {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 16px;
}

.tc-single-car__cta-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #111;
    color: #fff;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
    margin-right: 16px;
}

.tc-single-car__cta-btn:hover {
    background: #333;
    color: #fff;
}

.tc-single-car__back {
    font-size: 0.88rem;
    color: #666;
    text-decoration: underline;
}

.tc-single-car__back:hover {
    color: #111;
}

/* Lightbox */

#tc-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#tc-lightbox.tc-lightbox--open {
    display: flex;
}

#tc-lightbox-img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
    display: block;
}

#tc-lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    opacity: 0.7;
    transition: opacity 0.15s;
}

#tc-lightbox-close:hover {
    opacity: 1;
}

#tc-hero-img {
    cursor: zoom-in;
}

/* Hero arrows */

#tc-hero-wrap {
    position: relative;
}

.tc-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    width: 44px;
    height: 64px;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s, background 0.15s;
    padding: 0;
}

#tc-hero-wrap:hover .tc-hero-arrow {
    opacity: 1;
}

.tc-hero-arrow:hover {
    background: rgba(0, 0, 0, 0.65);
}

.tc-hero-prev { left: 10px; }
.tc-hero-next { right: 10px; }

/* Thumbnail strip */

.tc-single-car__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 32px;
    scroll-behavior: smooth;
    /* Hide scrollbar but keep scrollability */
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.tc-thumb {
    flex: 0 0 auto;
    width: 96px;
    height: 68px;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
}

.tc-thumb:hover {
    border-color: #aaa;
}

.tc-thumb--active {
    border-color: #f0a500;
}

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

/* Single car responsive */

@media (max-width: 700px) {
    .tc-single-car__content       { grid-template-columns: 1fr; }
    .tc-single-car__description,
    .tc-single-car__cta           { grid-column: 1; }
    .tc-single-car__equipment-list { grid-template-columns: 1fr; }
    .tc-single-car__header        { flex-direction: column; }
    .tc-single-car__title         { font-size: 1.4rem; }
    .tc-single-car__price         { font-size: 1.4rem; }
    .tc-single-car__cta-btn       { margin-right: 0; margin-bottom: 12px; display: block; }
}
