/* ============================================================
   GRUPPO DUE ERRE - STYLE.CSS
   Vendita & Noleggio Camper
   ============================================================ */

/* -- VARIABILI -- */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #7c3aed;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --white: #ffffff;
    --red: #ef4444;
    --green: #10b981;
    --orange: #f59e0b;
    --gold: #f59e0b;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
    --transition: all .25s ease;
}

/* -- RESET & BASE -- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -- BRAND COLORS -- */
.text-blue { color: var(--primary); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--gray-light); }
.text-warning { color: var(--orange); font-weight: 600; }


/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: var(--dark);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}

.logo-img {
    height: 100px;
    width: auto;
    border-radius: 8px;
}

.logo-fallback { display: none; }

.logo-icon {
    background: linear-gradient(135deg, #7ec846, #5ba832);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    position: relative;
}

.logo-icon span:first-child {
    font-weight: 900;
    font-size: 20px;
    color: var(--primary);
}

.logo-icon span:last-child {
    font-weight: 900;
    font-size: 20px;
    color: var(--red);
}

.logo-text {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.logo-text small {
    font-size: 11px;
    font-weight: 400;
    color: var(--gray-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-menu a {
    color: #cbd5e1;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--white);
    background: rgba(255,255,255,.08);
}

.btn-nav {
    background: var(--primary) !important;
    color: var(--white) !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600 !important;
    font-size: 13px;
    transition: var(--transition);
}

.btn-nav:hover {
    background: var(--primary-dark) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 50%, var(--dark) 100%);
    padding: 80px 20px;
    text-align: center;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 70%;
    opacity: 1;
    filter: none;
}

.hero-bg::after {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo-box {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 14px 28px;
    margin-bottom: 28px;
    border: 1px solid rgba(255,255,255,.1);
}

.hero-logo-img {
    height: 100px;
    width: auto;
    border-radius: 10px;
}

.hero-logo-text {
    text-align: left;
    font-weight: 700;
    font-size: 17px;
    color: var(--white);
    line-height: 1.2;
}

.hero-logo-text small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-light);
}

.hero h1 {
    color: var(--white);
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero h1 span {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--white);
    font-size: 19px;
    font-weight: 700;
    max-width: 540px;
    margin: 0 auto 36px;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,.35);
}

.btn-secondary {
    background: var(--primary);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-dark {
    background: var(--dark);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--dark-light);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,.25);
}

.btn-outline:hover {
    background: rgba(255,255,255,.1);
    color: var(--white);
    border-color: rgba(255,255,255,.4);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-block { width: 100%; justify-content: center; }

.btn-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--dark);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    margin-top: 16px;
    transition: var(--transition);
    text-decoration: none;
}

.btn-card:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}


/* ============================================================
   FEATURES
   ============================================================ */
.features {
    background: var(--bg);
    padding: 56px 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--gray);
    font-size: 14px;
}


/* ============================================================
   CATALOG
   ============================================================ */
.catalog {
    padding: 48px 20px;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.catalog-header h2 {
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background: var(--border);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--gray);
}

.search-bar {
    display: flex;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.search-bar input {
    border: none;
    padding: 10px 16px;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    width: 220px;
}

.search-bar button {
    background: var(--primary);
    border: none;
    color: var(--white);
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--primary-dark);
}

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

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-light);
}

.empty-state i {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
}


/* ============================================================
   CAMPER CARDS
   ============================================================ */
.camper-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.camper-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.camper-card.featured {
    box-shadow: 0 0 0 2px var(--primary), 0 8px 24px rgba(37,99,235,.15);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--white);
}

.featured-badge {
    background: linear-gradient(135deg, var(--orange), #f97316);
}

.card-stato {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
}

.card-stato.inline {
    position: static;
    display: inline-block;
    margin-bottom: 8px;
}

.stato-disponibile { background: var(--green); }
.stato-venduto { background: var(--red); }
.stato-noleggiato { background: var(--orange); }
.stato-riservato { background: #8b5cf6; }

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #e2e8f0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.camper-card:hover .card-image img {
    transform: scale(1.05);
}

.card-img-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,.65);
    color: var(--white);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border);
    color: var(--gray-light);
    font-size: 40px;
}

.no-image.lg { min-height: 350px; font-size: 60px; }

.card-body { padding: 18px; }

.card-tipo {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.tipo-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
}

.tipo-tag.vendita, .tipo-tag[class*="vendita"] {
    background: var(--primary-light);
    color: var(--primary);
}

.tipo-tag.noleggio, .tipo-tag[class*="noleggio"] {
    background: #fef3c7;
    color: #d97706;
}

.tipo-tag.entrambi {
    background: #e0e7ff;
    color: #4f46e5;
}

.card-body h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card-specs {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.card-specs i { margin-right: 4px; color: var(--gray-light); }

.card-prezzi {
    display: flex;
    gap: 12px;
    align-items: baseline;
    flex-wrap: wrap;
}

.prezzo {
    font-weight: 800;
    font-size: 20px;
    color: var(--dark);
}

.prezzo.noleggio {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.prezzo small {
    font-size: 12px;
    font-weight: 400;
    color: var(--gray);
}


/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray);
    background: var(--white);
    border: 2px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
}

.page-link:hover, .page-link.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}


/* ============================================================
   DETTAGLIO
   ============================================================ */
.dettaglio {
    padding: 24px 0 56px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.back-link:hover { gap: 10px; }

.dettaglio-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 36px;
    align-items: start;
}

.dettaglio-info h1 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.2;
}

.dettaglio-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.dettaglio-anno {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

.subtitle {
    color: var(--gray);
    font-size: 15px;
    margin-bottom: 20px;
}

.prezzo-box {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.prezzo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prezzo-item + .prezzo-item {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.prezzo-item .label {
    color: var(--gray);
    font-size: 14px;
}

.prezzo-item .valore {
    font-weight: 800;
    font-size: 24px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.spec {
    background: var(--bg);
    border-radius: 10px;
    padding: 14px 16px;
}

.spec i {
    color: var(--primary);
    margin-bottom: 4px;
    font-size: 16px;
}

.spec span {
    display: block;
    font-size: 11px;
    color: var(--gray-light);
    margin-top: 2px;
}

.spec strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
}

.btn-call {
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 16px 28px;
}

.descrizione {
    margin-bottom: 20px;
}

.descrizione h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.descrizione p, .descrizione {
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}

.dettaglio-descrizione {
    margin-top: 40px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.desc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.desc-header i {
    color: var(--primary);
    font-size: 18px;
}

.desc-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.desc-content {
    color: #475569;
    font-size: 15px;
    line-height: 1.8;
}

.contatti-rapidi a {
    text-decoration: none;
}


/* ============================================================
   GALLERIA (FIX RESPONSIVE)
   ============================================================ */
.galleria-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #e2e8f0;
    max-width: 600px;
    aspect-ratio: 4 / 3;
}

.galleria-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.galleria-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,.65);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.galleria-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,.5);
    color: var(--white);
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.galleria-nav:hover { background: rgba(0,0,0,.8); }
.galleria-nav.prev { left: 10px; }
.galleria-nav.next { right: 10px; }

.galleria-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.galleria-thumbs img {
    width: 72px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    opacity: .6;
    transition: var(--transition);
    flex-shrink: 0;
}

.galleria-thumbs img:hover { opacity: .85; }

.galleria-thumbs img.active {
    border-color: var(--primary);
    opacity: 1;
}


/* ============================================================
   CONTATTI PAGE
   ============================================================ */
.page-header {
    background: linear-gradient(135deg, var(--dark), var(--dark-light));
    padding: 56px 20px;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--gray-light);
    font-size: 15px;
}

.contatti-section {
    padding: 48px 20px;
}

.contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.contatti-info-block {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.info-block-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.info-block-logo {
    height: 100px;
    width: auto;
    border-radius: 10px;
}

.info-block-logo-fallback .logo-icon {
    width: 52px;
    height: 52px;
}

.info-block-header h2 {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.info-block-header p {
    color: rgba(255,255,255,.7);
    font-size: 13px;
}

.info-items {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.info-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.info-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 3px;
}

.info-card p {
    color: var(--gray);
    font-size: 13px;
    line-height: 1.5;
}

.info-card a {
    color: var(--gray);
    text-decoration: none;
}

.info-card a:hover {
    color: var(--primary);
}

.info-buttons {
    padding: 0 32px 24px;
    display: flex;
    gap: 10px;
}

.info-buttons .btn {
    flex: 1;
    justify-content: center;
}

.info-social {
    padding: 0 32px 28px;
}

.info-social h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 10px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
}

.social-btn.facebook {
    background: #1877f2;
    color: var(--white);
}

.social-btn.facebook:hover {
    background: #1565d8;
    color: var(--white);
}

.contatti-mappa {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mappa-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 460px;
}

.mappa-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.btn-maps {
    border: 2px solid var(--border);
    color: var(--gray);
    background: var(--white);
    justify-content: center;
}

.btn-maps:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}


/* ============================================================
   CONTACT FORM
   ============================================================ */
.contatto-form-section {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 2px solid var(--border);
}

.contatto-form-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.contact-form, .card-form {
    max-width: 700px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--dark);
    color: var(--gray-light);
    padding: 56px 20px 24px;
    margin-top: 56px;
}

.footer-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
}

.footer-logo {
    height: 44px;
    width: auto;
    border-radius: 8px;
}

.footer-logo-fallback .logo-icon {
    width: 44px;
    height: 44px;
}

.footer-brand h3 {
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
}

.footer-brand p {
    font-size: 13px;
    color: var(--gray-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 36px;
}

.footer-grid p {
    font-size: 13px;
    line-height: 1.7;
}

.footer-grid h4 {
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid ul li + li { margin-top: 8px; }

.footer-grid ul a {
    color: var(--gray-light);
    font-size: 13px;
    transition: var(--transition);
}

.footer-grid ul a:hover {
    color: var(--white);
}

.footer-grid a {
    color: var(--gray-light);
    text-decoration: none;
}

.footer-grid a:hover { color: var(--white); }

.footer-grid i {
    margin-right: 6px;
    width: 16px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
    font-size: 15px;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
}


/* ============================================================
   ADMIN
   ============================================================ */
.admin-body {
    background: var(--bg);
}

.admin-nav {
    background: linear-gradient(135deg, var(--dark), var(--dark-light));
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.admin-nav .nav-container {
    height: 64px;
}

.admin-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-user {
    color: var(--gray-light);
    font-size: 13px;
}

.admin-nav .btn-nav.logout {
    background: var(--red) !important;
}

.admin-main {
    padding: 28px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.blue { background: rgba(37,99,235,.1); color: var(--primary); }
.stat-icon.green { background: rgba(16,185,129,.1); color: var(--green); }
.stat-icon.orange { background: rgba(245,158,11,.1); color: var(--orange); }
.stat-icon.red { background: rgba(239,68,68,.1); color: var(--red); }

.stat-card h4 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.stat-card p {
    font-size: 13px;
    color: var(--gray);
    margin-top: 2px;
}

.admin-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 28px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table thead {
    background: var(--bg);
}

.admin-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table .thumb {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.thumb-placeholder {
    width: 56px;
    height: 40px;
    background: var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-light);
}

.row-inactive { opacity: .5; }

.row-unread {
    background: #fffbeb;
}

.stato-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
}

.actions {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    transition: var(--transition);
    text-decoration: none;
}

.btn-icon.edit {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-icon.edit:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-icon.delete {
    background: #fee2e2;
    color: var(--red);
}

.btn-icon.delete:hover {
    background: var(--red);
    color: var(--white);
}


/* ============================================================
   ADMIN FORM
   ============================================================ */
.admin-form .form-section {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.admin-form .form-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.checkbox-group label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 12px;
}

.dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius);
    padding: 44px 20px;
    text-align: center;
    cursor: pointer;
    background: var(--white);
    transition: var(--transition);
    position: relative;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dropzone-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 10px;
}

.dropzone h4 {
    margin-bottom: 4px;
    font-size: 15px;
}

.dropzone p {
    color: var(--gray);
    font-size: 13px;
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.img-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--border);
}

.img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-item.is-main {
    box-shadow: 0 0 0 3px var(--gold);
}

.img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    padding: 20px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.img-label {
    color: var(--white);
    font-size: 10px;
    opacity: .8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.img-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.img-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition);
}

.star-btn {
    background: rgba(255,255,255,.2);
    color: var(--white);
}

.star-btn.active, .star-btn:hover {
    background: var(--gold);
    color: var(--white);
}

.del-btn {
    background: rgba(239,68,68,.8);
    color: var(--white);
}

.del-btn:hover {
    background: var(--red);
}


/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark), var(--dark-light));
}

.login-box {
    background: var(--white);
    padding: 44px;
    border-radius: 20px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo-img {
    height: 64px;
    width: auto;
    margin: 0 auto 16px;
    border-radius: 12px;
}

.login-logo-icon {
    background: linear-gradient(135deg, #7ec846, #5ba832);
    border-radius: 12px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin: 0 auto 16px;
}

.login-logo-icon span:first-child {
    font-weight: 900;
    font-size: 26px;
    color: var(--primary);
}

.login-logo-icon span:last-child {
    font-weight: 900;
    font-size: 26px;
    color: var(--red);
}

.login-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-header p {
    color: var(--gray);
    font-size: 14px;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--white);
    padding: 14px 24px;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .dettaglio-grid {
        grid-template-columns: 1fr;
    }

    .galleria-main {
        max-width: 100%;
    }

    .contatti-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }

    .nav-menu {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--dark);
        flex-direction: column;
        padding: 12px 20px;
        border-top: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 8px 24px rgba(0,0,0,.3);
    }

    .nav-menu.active { display: flex; }

    .nav-menu a {
        padding: 12px 16px;
        width: 100%;
    }

    .hero { padding: 60px 20px; min-height: auto; }

    .hero h1 { font-size: 32px; }
    .hero p { font-size: 15px; }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn { width: 100%; justify-content: center; }

    .camper-grid {
        grid-template-columns: 1fr;
    }

    .catalog-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar input { width: 100%; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card h4 { font-size: 22px; }

    .admin-table { font-size: 12px; }

    .form-row {
        grid-template-columns: 1fr;
    }

    .info-buttons {
        flex-direction: column;
    }

    .mappa-container {
        height: 300px;
    }

    .galleria-main {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 26px; }

    .hero-logo-box {
        padding: 10px 16px;
    }

    .hero-logo-img { height: 40px; }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .prezzo-item .valore {
        font-size: 20px;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 28px;
    }

    .img-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}