* { box-sizing: border-box; }
:root {
    --primary: #00594a;
    --primary-dark: #004035;
    --secondary: #8fd84f;
    --surface: #f8f9fb;
    --surface-2: #ffffff;
    --surface-3: #edf0f2;
    --text: #19201f;
    --muted: #5d6865;
    --line: #cbd5d1;
    --danger: #b42318;
    --icon-butterfly: #c7007d;
    --bg-image1: url("https://images.unsplash.com/photo-1615671524827-c1fe3973b648?auto=format&fit=crop&w=1600&q=80");
    --bg-image2: url("https://images.unsplash.com/photo-1466692476868-aef1dfb1e735?auto=format&fit=crop&w=1600&q=80");
    --bg-image3: url("https://images.unsplash.com/photo-1569880153113-76e33fc52d5f?auto=format&fit=crop&w=1600&q=80");
    --bg-image4: url("/assets/background.jpg");
    --gdm-logo-small: url("/assets/ilgiardino-logo-small.svg");
    --gdm-logo-fly: url("/assets/icon-GDM.svg");
    --gdm-logo-circle: url("/assets/ilgiardino-logo-circle.svg");
    --gdm-logo-classic: url("/assets/ilgiardino-logo.svg");
}
body {
    margin: 0;
    min-height: 100vh;
    font-family: Asap, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--surface);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.material-symbols-outlined { font-size: 22px; vertical-align: middle; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--primary-dark);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 14px rgb(0 0 0 / 7%);
}
.site-header-main {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 180px;
    align-items: center;
    gap: 18px;
}
.site-header-mobile {
    display: none;
}
.topbar-menu-zone {
    display: flex;
    align-items: center;
    padding-left: clamp(24px, 5vw, 70px);
    background: var(--primary-dark);
}
.site-logo {
    position: relative;
    z-index: 11;
    text-indent: 101%;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    width: 142px;
    height: 97px;
    background-image: var(--gdm-logo-classic);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: auto;
}
.site-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.site-nav {
    grid-column: 2;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.4vw, 18px);
    min-width: 0;
    max-width: 100%;
    font-size: clamp(12px, 1.1vw, 14px);
    font-weight: 700;
    text-transform: uppercase;
}
.site-nav a {
    flex: 0 1 auto;
    padding: 10px 0;
    color: #fff;
    border-bottom: 2px solid transparent;
    text-align: center;
    line-height: 1.2;
    font-weight: 100;
    font-size: 1.2em;
}
.site-nav a:hover,
.site-nav a.is-active { border-color: var(--secondary); }
.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #fff;
    background: var(--primary-dark);
    font-weight: 700;
    font-size: 14px;
}
.mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    color: #fff;
    background: transparent;
}
.mobile-menu-toggle .material-symbols-outlined {
    font-size: 48px;
    line-height: 1;
}
.topbar-login {
    align-self: center;
    justify-self: center;
    display: inline-grid;
    justify-items: center;
    gap: 2px;
    color: var(--primary-dark);
    font-size: 19px;
    font-weight: 700;
    line-height: 1;
}
.topbar-login .material-symbols-outlined {
    font-size: 56px;
    line-height: 1;
}
.mobile-menu-panel {
    display: grid;
    gap: 0;
    /* width: min(420px, 100%); */
    padding: 8px 24px 22px;
    border-top: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 12px 30px rgb(0 0 0 / 14%);
}
.mobile-menu-panel[hidden] {
    display: none;
}
.mobile-menu-panel a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
}
.mobile-menu-panel a.is-active {
    color: var(--primary);
}
.site-header-categories {
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 11px 16px;
    color: #fff;
    background: var(--primary-dark);
    font-size: 1.125em;
    font-weight: 600;
    line-height: 1.5rem;
}
.site-header-categories a {
    flex: 0 0 auto;
}
.site-header-categories a:hover { text-decoration: underline; }
.hero {
    min-height: calc(100vh - 148px);
    display: grid;
    place-items: center;
    padding: 32px 16px 96px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.58)),
        var(--bg-image4) center / cover;
}
.search-panel {
    width: min(100%, 480px);
    padding: 24px;
    border-radius: 12px;
    background: #ffffffdb;
    box-shadow: 0 22px 60px rgb(0 0 0 / 28%);
    background-image: url(/assets/icon-GDM.svg);
    background-repeat: no-repeat;
    background-size: 25px;
    background-position-x: right;
    background-origin: content-box;
}
.search-panel h1 { margin: 0 0 8px; color: var(--primary); font-size: 28px; line-height: 1.15; }
.search-panel p { margin: 0 0 22px; color: var(--muted); line-height: 1.5; }
.search-form, .admin-form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
label { color: var(--muted); font-size: 13px; font-weight: 600; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px 14px;
    font: inherit;
    background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgb(0 89 74 / 22%); border-color: var(--primary); }
.button, button {
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.button.primary, button.primary { color: #fff; background: var(--primary); }
.button.secondary, button.secondary { color: #173800; background: var(--secondary); }
.button.ghost { color: var(--primary); border: 1px solid var(--primary); background: #fff; }
.button.danger { color: #fff; background: var(--danger); }
.container { width: min(1120px, 100%); margin: 0 auto; padding: 24px 16px 96px; }
.page-head { display: grid; gap: 10px; margin-bottom: 20px; }
.page-head h1 { margin: 0; color: var(--primary-dark); font-size: 30px; }
.page-head p { margin: 0; color: var(--muted); }
.content-page {
    width: min(920px, 100%);
}
.text-page {
    display: grid;
    gap: 28px;
    color: var(--text);
}
.text-page section {
    display: grid;
    gap: 10px;
}
.text-page h2 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 22px;
}
.text-page p,
.text-page li {
    line-height: 1.65;
}
.text-page p,
.text-page ul {
    margin: 0;
}
.text-page ul {
    padding-left: 20px;
}
.public-form {
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.bot-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.upload-status {
    color: var(--muted);
    font-size: 14px;
}
.uploaded-photo-list {
    display: grid;
    gap: 8px;
}
.uploaded-photo-item,
.uploaded-photo-error {
    padding: 10px;
    border-radius: 8px;
    background: var(--surface-3);
    overflow-wrap: anywhere;
    font-size: 14px;
}
.uploaded-photo-error {
    color: var(--danger);
}
.toolbar {
    position: sticky;
    top: 148px;
    z-index: 10;
    margin: -24px -16px 50px;
    padding: 16px;
    background: rgb(255 255 255 / 92%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.inline-search { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dealer-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px 0px 28px 28px;
    background: #fff;
    box-shadow: 5px 6px 13px 4px rgba(0, 0, 0, 0.1);
}
.dealer-card-body { padding: 16px; }
.dealer-card-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    gap: 12px;
    padding-right: 36px;
}
.dealer-title-content {
    min-width: 0;
}
.dealer-card-title > .dealer-title-content:first-child {
    grid-column: 1 / -1;
}
.dealer-thumb-small {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-3);
}
.dealer-thumb-small img { width: 100%; height: 100%; object-fit: cover; }
.dealer-card h2 {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 20px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: auto-phrase;
    hyphens: auto;
}
.dealer-card h2 a {
    display: inline;
}
.dealer-card p { margin: 10px 0px 10px 0px; line-height: 1.45; }
.text-on-surface-variant {
    --tw-text-opacity: 1;
    color: rgb(67 70 84 / var(--tw-text-opacity, 1));
}
.text-label-sm {
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}
.font-label-sm {font-family: Asap;}
.muted { color: var(--muted); }
.dealer-card .muted { display: flex; align-items: center; gap: 6px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.detail-gallery-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 16px;
    margin-bottom: 24px;
    scroll-snap-type: x mandatory;
}
.strip-photo {
    flex: 0 0 min(72vw, 260px);
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-3);
    scroll-snap-align: start;
}
.strip-photo-1 { aspect-ratio: 4 / 5; }
.strip-photo-2 { aspect-ratio: 16 / 10; }
.strip-photo-3 { aspect-ratio: 1 / 1; }
.strip-photo img { width: 100%; height: 100%; object-fit: cover; }
.full-photo-masonry {
    column-count: 3;
    column-gap: 12px;
    margin-top: 36px;
}
.full-photo-masonry img {
    width: 100%;
    margin: 0 0 12px;
    border-radius: 8px;
    break-inside: avoid;
    background: var(--surface-3);
}
.placeholder-photo {
    display: grid;
    place-items: center;
    min-height: 220px;
    margin-bottom: 24px;
    border-radius: 8px;
    color: var(--muted);
    background: var(--surface-3);
}
.detail h1 { 
    margin: 0 0 8px; 
    font-size: 34px; 
    color: var(--primary-dark);
    background-image: url(/assets/icon-GDM.svg);
    background-repeat: no-repeat;
    background-size: 25px;
    background-position-x: right;
    background-origin: content-box; }
.detail-description { color: var(--muted); line-height: 1.65; }
.detail-premium {text-align: center; color: var(--surface-3); background-color: var(--icon-butterfly); line-height: 2.75; font-size: larger; letter-spacing: 1.5px;}
.info-list { display: grid; gap: 18px; margin-top: 28px; }
.info-item { display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.info-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--primary);
    background: var(--surface-3);
}
.info-item h2 { margin: 0 0 6px; font-size: 15px; }
.info-item p { margin: 0; color: var(--muted); line-height: 1.5; }
.side-panel {
    position: sticky;
    top: 88px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.side-panel .actions { grid-template-columns: 1fr; }
.map-box {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    margin-top: 16px;
    border-radius: 8px;
    color: #fff;
    background: radial-gradient(circle at 50% 50%, #ffffff 0 2px, transparent 3px), linear-gradient(135deg, #dfe6e3, #b9c9c3);
    background-size: 34px 34px, cover;
}
.map-pin {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 8px 24px rgb(0 0 0 / 24%);
    animation: bounce 1s infinite;
}
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.add-storefront{
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="%23CCCCCC"><path d="M841-518v318q0 33-23.5 56.5T761-120H201q-33 0-56.5-23.5T121-200v-318q-23-21-35.5-54t-.5-72l42-136q8-26 28.5-43t47.5-17h556q27 0 47 16.5t29 43.5l42 136q12 39-.5 71T841-518Zm-272-42q27 0 41-18.5t11-41.5l-22-140h-78v148q0 21 14 36.5t34 15.5Zm-180 0q23 0 37.5-15.5T441-612v-148h-78l-22 140q-4 24 10.5 42t37.5 18Zm-178 0q18 0 31.5-13t16.5-33l22-154h-78l-40 134q-6 20 6.5 43t41.5 23Zm540 0q29 0 42-23t6-43l-42-134h-76l22 154q3 20 16.5 33t31.5 13ZM201-200h560v-282q-5 2-6.5 2H751q-27 0-47.5-9T663-518q-18 18-41 28t-49 10q-27 0-50.5-10T481-518q-17 18-39.5 28T393-480q-29 0-52.5-10T299-518q-21 21-41.5 29.5T211-480h-4.5q-2.5 0-5.5-2v282Zm560 0H201h560Z"/></svg>');
    background-repeat: no-repeat;
    background-size: 25px;
    background-position-x: right;
    background-origin: content-box;
}

.mini-button{padding: 6px 4px;
    font-size: small;}


.admin-shell { width: min(960px, 100%); margin: 0 auto; padding: 24px 16px 96px; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.admin-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 18px;
}
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.table th, .table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-size: 13px; }
.control_button_flex {display: inline-flex;}
.notice { padding: 12px 14px; border-radius: 8px; background: #ecfdf3; color: #05603a; margin-bottom: 16px; }
.error { padding: 12px 14px; border-radius: 8px; background: #fef3f2; color: var(--danger); margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.span-2 { grid-column: 1 / -1; }
.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.admin-photo-option {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.admin-photo-option img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.admin-photo-controls {
    display: grid;
    gap: 8px;
    padding: 10px;
}
.admin-photo-controls label,
.admin-photo-option span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}
.admin-photo-controls label[for] {
    display: block;
    margin-top: 2px;
    font-weight: 700;
}
.admin-photo-controls input[type="text"],
.admin-photo-controls input:not([type]) {
    width: 100%;
}
.admin-photo-option input[type="radio"],
.admin-photo-option input[type="checkbox"] { width: auto; }
.delete-photo-control {
    color: var(--danger) !important;
}
.site-footer {
    color: #eef8f5;
    background: var(--primary-dark);
}
.site-footer-grid {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 42px 16px 34px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr 1fr;
    gap: 32px;
}
.site-footer h2 {
    margin: 0 0 12px;
    color: var(--secondary);
    font-size: 15px;
    text-transform: uppercase;
}
.site-footer p {
    margin: 0 0 14px;
    color: #d5e5df;
    line-height: 1.55;
}
.site-footer ul {
    display: grid;
    gap: 9px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.site-footer a { color: #fff; }
.site-footer a:hover { text-decoration: underline; }
.footer-logo {
    height: 170px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: #fff;
}
.footer-note { font-size: 14px; }
.footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--primary);
    background: var(--surface-3);
}
.footer-social a:hover { background: var(--surface-2);     
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    -ms-transform: scale(1.2);
    -o-transform: scale(1.2);
    transform: scale(1.2)}

.site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    padding: 16px;
    border-top: 1px solid rgb(255 255 255 / 18%);
    color: #fff;
    font-size: 13px;
}
.logo-box {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgb(255 255 255 / 92%);
    text-align: center;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.svg-container {
    width: 150px;
    height: 150px;
}

.draw-svg {
    width: 100%;
    height: 100%;
}

/* Animazione del tracciato */
.css-logo-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 950; 
    animation: disegnaLogo 2s linear;
}

@keyframes disegnaLogo {
    0% {
        stroke-dashoffset: 1000; /* Nascosto */
    }
    100% {
        stroke-dashoffset: 950; /* Completamente disegnato */
    }
}

.formato-info-item {
    display: grid;
    grid-template-columns: auto auto auto auto auto;
    width: fit-content;
}

.dealer-card-premium{
    text-align: center;
    background-color: var(--icon-butterfly);
    margin: auto;
    font-weight: 600;
    color: var(--surface-2);
    letter-spacing: 2px;
    line-height: 1.45;
}


/* MEDIA CONDITIONS FOR RESPONSIVE */
@media (max-width: 1060px) {
    .site-header {
        background: #fff;
    }
    .site-header-desktop {
        display: none;
    }
    .site-header-mobile {
        display: grid;
        width: 100%;
        margin: 0;
        align-items: stretch;
        gap: 0;
    }
    .site-header-main {
        grid-template-columns: minmax(170px, 30%) minmax(0, 1fr) minmax(110px, 18%);
        min-height: 104px;
    }
    .site-logo {
        align-self: center;
        justify-self: center;
        position: static;
        width: min(220px, 40vw);
        height: 78px;
        background-size: contain;
        background-image: var(--gdm-logo-small);
        
    }
}
@media (max-width: 860px) { 
    .site-header { position: sticky; }
    .site-header-main {
        grid-template-columns: 96px minmax(0, 1fr) 78px;
        min-height: 82px;
    }
    .site-logo {
        width: min(190px, 48vw);
        height: 64px;
        background-image: var(--gdm-logo-small);
        background-size: contain;
        
    }
    .topbar-menu-zone {
        padding-left: 20px;
    }
    .mobile-menu-toggle {
        width: 48px;
        height: 48px;
    }
    .mobile-menu-toggle .material-symbols-outlined {
        font-size: 42px;
    }
    .topbar-login {
        font-size: 14px;
    }
    .topbar-login .material-symbols-outlined {
        font-size: 42px;
    }
    .mobile-menu-panel {
        padding: 6px 16px 16px;
    }
    .inline-search, .detail-layout, .form-grid, .admin-search { grid-template-columns: 1fr; }
    .grid, .admin-photo-grid { grid-template-columns: 1fr; }
    .full-photo-masonry { column-count: 2; }
    .side-panel { position: static; }
    .span-2 { grid-column: auto; }
    .toolbar { top: 0; }
    .site-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
    .site-header-main {
        grid-template-columns: 74px minmax(0, 1fr) 62px;
        min-height: 72px;
    }
    .site-logo {
        width: min(150px, 45vw);
        height: 50px;
    }
    .topbar-menu-zone {
        padding-left: 12px;
    }
    .mobile-menu-toggle {
        width: 42px;
        height: 42px;
    }
    .mobile-menu-toggle .material-symbols-outlined {
        font-size: 36px;
    }
    .topbar-login span:last-child {
        display: none;
    }
    .topbar-login .material-symbols-outlined {
        font-size: 38px;
    }
}
