/* Transportable Model Pages - grid and detail */

.models-section {
    padding: 10px 0 20px;
}

.models-section h1 {
    margin-bottom: 0;
}

.models-subtitle {
    text-align: center;
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.models-intro {
    max-width: 820px;
    margin: 0 auto 20px;
    text-align: center;
}

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

.model-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.model-card:hover,
.model-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.model-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}

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

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

.model-card-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.model-card-body h2 {
    text-align: left;
    margin: 0 0 6px;
    font-size: 1.4rem;
}

.model-card-summary {
    margin: 0 0 14px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.model-card-more {
    margin-top: auto;
    font-weight: 600;
    color: var(--primary-color);
}

/* Model detail page */
.model-detail {
    padding: 10px 0 20px;
}

.model-detail h1 {
    margin-bottom: 0;
}

.model-detail-area {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 14px;
}

/* Render and floor plan, side by side at the top */
.model-media {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 26px;
}

.model-figure {
    margin: 0;
}

.model-figure-btn {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    cursor: zoom-in;
    transition: box-shadow 0.3s, transform 0.3s;
}

.model-figure-btn:hover,
.model-figure-btn:focus-visible {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.model-figure-btn img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    display: block;
}

.model-figure figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-color);
    padding-top: 8px;
}

.model-columns {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 26px;
}

.model-columns h2 {
    text-align: left;
    margin-top: 0;
}

.model-features {
    background: var(--white);
    border-radius: 8px;
    padding: 22px 26px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.model-features ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.9;
}

.model-back {
    text-align: center;
    padding-bottom: 10px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 95%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 968px) {
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .model-columns {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .model-media {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .model-figure-btn img {
        height: 240px;
    }
}

@media (max-width: 600px) {
    .models-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-close {
        right: 20px;
        font-size: 30px;
    }
}

/* Two ways to build */
.build-options {
    background: var(--white);
    border-radius: 8px;
    padding: 24px 28px 26px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 26px;
}

.build-options h2 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 6px;
}

.build-options > p {
    margin-bottom: 18px;
}

.build-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.build-option h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.build-option p {
    margin: 0;
}

@media (max-width: 768px) {
    .build-options-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* Build method note on the range cards */
.model-card-note {
    margin: 0 0 14px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6b6b6b;
}

.model-card-note-yes {
    color: var(--primary-color);
}
