/* Base layout */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f4f4f4;
}
:root {
    /* Shared heading size and color so subtitle can match h2 exactly */
    --h2-size: clamp(1.35rem, 2.2vw + 0.2rem, 1.75rem);
    --h2-color: #2c5aa0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f7f7f7; /* slightly darker than white to soften contrast */
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #ddd;
}
h1 {
    color: #2c5aa0;
    margin: 0;
}
/* Ensure a consistent h2 size across the site */
h2 { font-size: var(--h2-size); }
.price {
    font-size: 2em;
    font-weight: bold;
    color: #d32f2f;
    margin: 10px 0;
}
.meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 10px 0;
}
.meta div {
    margin: 5px;
}
.cta {
    text-align: center;
    margin-top: 10px;
}
/* Provide spacing only between adjacent buttons in a CTA */
.cta .btn + .btn { margin-left: 0.5rem; }
.badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.badge {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.9em;
}
.section {
    margin: 24px 0;
}
.section h2 {
    margin-bottom: 6px;
    color: var(--h2-color);
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
ul {
    margin-top: 6px;
}
.seller {
    background-color: #e3f2fd;
    padding: 15px;
    border-left: 4px solid #2196f3;
    margin: 20px 0;
}
.contact {
    text-align: center;
    padding: 20px;
    background-color: #fff3e0;
    border-radius: 8px;
}
.contact a.btn, button.btn {
    display: inline-block;
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
}
.contact a.btn:hover, button.btn:hover {
    background-color: #45a049;
}
footer {
    text-align: center;
    padding: 10px;
    font-size: 0.9em;
    color: #666;
}
.note {
    font-size: 0.95em;
    color: #444;
}
/* Carousel styles */
.carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f8f8f8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.carousel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #0000000a;
}
.carousel .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.carousel .nav:hover { background: rgba(0,0,0,0.6); }
.carousel .prev { left: 10px; }
.carousel .next { right: 10px; }
.carousel .counter {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85em;
}
.carousel .dots {
    position: absolute;
    left: 0; right: 0; bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}
.carousel .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    pointer-events: all;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.2);
}
.carousel .dot.active { background: #fff; }
.gallery-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.gallery-subtitle { color: var(--h2-color); font-size: var(--h2-size); font-family: inherit; font-weight: bold; }

/* Video embed */
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Consolidated from inline page styles */
/* Media grid used to place carousel and video side-by-side on wide screens */
.media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}
@media (min-width: 900px) {
    .media-grid { grid-template-columns: 1fr 1fr; }
}
.media-item { display: flex; }

/* Generic responsive media wrapper for iframes and carousels */
.responsive-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}
.responsive-media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.responsive-media .carousel {
    position: absolute;
    inset: 0;
    height: 100%;
}
.responsive-media .carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* override base contain when inside responsive-media */
    cursor: zoom-in;
}

/* Lightbox modal */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.lightbox .close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: 0;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

/* Specs grid (motorhome page) */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 900px) {
    .specs-grid { grid-template-columns: 1fr 1fr; }
}
