:root {
    /* Palette Outdoor */
    --forest-green: #2d5a27;
    --sand: #d4a373;
    --asphalt-gray: #333533;
    --off-white: #f8f9fa;
    --text-color: #212529;
    --accent: #d4a373; /* Usiamo sand come accent base o definiamo un terracotta */
    --terracotta: #b05d44;
    
    /* UI Elements */
    --radius: 16px;       /* Per card e foto */
    --radius-btn: 50px;   /* Per pulsanti e badge (Pill style) */
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    
    /* Spaziature */
    --gap-sm: 0.5rem;
    --gap-md: 1rem;
    --gap-lg: 2rem;
    --container-width: 1100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--off-white);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gap-md);
}

/* Typography */
h1, h2, h3 {
    color: var(--asphalt-gray);
    line-height: 1.2;
}

/* Header/Hero */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('/static/img/al_tramonto_esterno_davanti_fianco_destro_camper.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    border-bottom: 8px solid var(--forest-green);
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: var(--gap-md);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    margin-bottom: var(--gap-md);
}

.price-tag-hero {
    display: inline-block;
    background: var(--terracotta);
    color: white;
    padding: 10px 25px;
    border-radius: var(--radius-btn);
    font-size: 2rem;
    font-weight: bold;
    box-shadow: var(--shadow);
    border: 2px solid white;
    margin-top: var(--gap-md);
}

.for-sale-badge {
    background: var(--sand);
    color: var(--asphalt-gray);
    padding: 5px 15px;
    border-radius: var(--radius-btn);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: var(--gap-sm);
    display: inline-block;
}

.cta-button {
    display: inline-block;
    margin-top: var(--gap-lg);
    padding: 15px 35px;
    background-color: var(--forest-green);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-btn);
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    background-color: #3d7a35;
}

/* Sections */
section {
    padding: var(--gap-lg) 0;
}

.section-title {
    border-left: 5px solid var(--sand);
    padding-left: var(--gap-md);
    margin-bottom: var(--gap-lg);
}

/* Gallery Tabs */
.gallery-tabs {
    display: flex;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-md);
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    /* Mask per indicare lo scroll su mobile */
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

@media (min-width: 769px) {
    .gallery-tabs {
        -webkit-mask-image: none;
        mask-image: none;
        overflow: visible;
    }
}

.tab-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 8px 22px;
    background: white;
    border: 1px solid #ddd;
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    color: var(--asphalt-gray);
}

.tab-btn:hover {
    border-color: var(--forest-green);
    color: var(--forest-green);
}

.tab-btn.active {
    background: var(--forest-green);
    color: white;
    border-color: var(--forest-green);
    box-shadow: 0 2px 8px rgba(45, 90, 39, 0.3);
}

/* Gallery - Mobile First */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
}

.main-photo img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: opacity 0.3s ease;
}

.thumbnails {
    display: flex;
    flex-direction: row;
    gap: var(--gap-sm);
    overflow-x: auto;
    padding-bottom: var(--gap-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--sand) transparent;
}

.thumbnails::-webkit-scrollbar {
    height: 6px;
}

.thumbnails::-webkit-scrollbar-thumb {
    background-color: var(--sand);
    border-radius: 10px;
}

.thumbnails img {
    flex: 0 0 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.thumbnails img:hover, .thumbnails img.active {
    opacity: 1;
    border-color: var(--forest-green);
    transform: scale(1.02);
}

/* Desktop Overrides */
@media (min-width: 769px) {
    .gallery-container {
        display: grid;
        grid-template-columns: 1fr 300px;
    }

    .main-photo img {
        height: 500px;
        aspect-ratio: auto;
    }

    .thumbnails {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 100px;
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        max-height: 500px;
        padding-right: 5px;
    }

    .thumbnails img {
        flex: none;
        width: 100%;
        height: 100%;
    }
}

/* Timeline */
.timeline {
    border-left: 3px solid var(--forest-green);
    margin-left: 20px;
    padding-left: 30px;
    position: relative;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

/* Il Pallino (Dot) */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -38.5px; /* Centrato sulla linea da 3px */
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--sand);
    border: 3px solid var(--off-white);
    box-shadow: 0 0 0 3px var(--forest-green);
}

.timeline-item h3 {
    font-size: 1.1rem;
    color: var(--forest-green);
    margin-bottom: 5px;
}

.timeline-item p {
    margin-bottom: var(--gap-sm);
    color: var(--text-color);
}

.maintenance-evidence {
    display: flex;
    gap: var(--gap-sm);
    margin-top: var(--gap-sm);
}

.maintenance-evidence img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.btn-request {
    display: inline-block;
    margin-top: var(--gap-md);
    padding: 12px 25px;
    background-color: var(--asphalt-gray);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-btn);
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-request:hover {
    background-color: var(--forest-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Technical Specs Table */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--gap-md);
    background: white;
    padding: var(--gap-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.spec-item {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #eee;
    padding-bottom: var(--gap-sm);
}

.spec-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spec-value {
    font-weight: bold;
    color: var(--asphalt-gray);
    font-size: 1.1rem;
}

/* New Classes for Inline Style Refactor */
.card-white {
    background: white;
    padding: var(--gap-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: var(--gap-lg);
}

.text-mt-md {
    margin-top: var(--gap-md);
}

.text-mb-md {
    margin-bottom: var(--gap-md);
}

.divider-dashed {
    margin-top: var(--gap-lg);
    padding-top: var(--gap-md);
    border-top: 1px dashed var(--sand);
}

.spec-item-highlight {
    border-bottom: 2px solid var(--accent);
    background: #fffcf0;
    padding: 10px;
    border-radius: var(--radius);
}

.spec-label-accent {
    color: var(--accent);
    font-weight: bold;
}

.spec-value-accent {
    font-size: 1.5rem;
    color: var(--accent);
}

.maintenance-notice {
    background: #eee;
    padding: var(--gap-md);
    border-radius: var(--radius);
    margin-top: var(--gap-lg);
    text-align: center;
}

.status-message {
    margin-top: 10px;
}

.contact-section {
    text-align: center;
    background: #e9edc9; /* Verde pastello naturale molto leggero */
    color: var(--text-color);
    padding: var(--gap-lg);
    border-radius: var(--radius);
    border: 2px solid var(--forest-green);
    margin-top: var(--gap-lg);
}

.contact-title {
    border-left-color: var(--forest-green);
}

.contact-h2 {
    color: var(--forest-green);
}

.contact-buttons {
    display: flex;
    gap: var(--gap-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--gap-lg);
}

.contact-buttons .cta-button {
    margin-top: 0;
    min-width: 200px;
}

@media (max-width: 768px) {
    .contact-buttons .cta-button {
        width: 100%;
        text-align: center;
        margin-bottom: var(--gap-sm);
    }
}

.btn-email {
    background-color: var(--forest-green) !important;
    color: white !important;
}

.btn-whatsapp {
    background-color: #25d366 !important; /* Verde WhatsApp originale */
    color: white !important;
}

.footer {
    text-align: center;
    padding: var(--gap-lg);
    color: var(--asphalt-gray);
    border-top: 1px solid #ddd;
    margin-top: var(--gap-lg);
}

.footer-link {
    color: var(--forest-green);
    text-decoration: none;
    font-weight: bold;
}

.read-more-btn {
    color: var(--forest-green);
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
    display: inline-block;
    margin-top: 5px;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
}

.gifts-list {
    list-style: none;
    padding-left: 0;
}

.gifts-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.gifts-list li::before {
    content: '🎁';
    margin-right: 15px;
    font-size: 1.2rem;
}

.gifts-list li:last-child {
    border-bottom: none;
}
