/* --- VARIABILI E BASE --- */
:root {
    --verde: #4a5d4e;
    --rosso: #c0392b;
    --crema: #fdfaf5;
    --tortora: #d2c8bc;
    --dark: #1a1a1a;
    --header-height: 145px;
    --footer-height: 70px;
    --container-max-width: 1200px;
}

/* Spinner Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--rosso);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
    background-color: var(--crema);
    line-height: 1.8;
}

.font-prata {
    font-family: 'Prata', serif;
    font-weight: 400;
}

.sticky-layout-main {
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
}

/* --- HEADER --- */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2000;
    padding: 35px 40px;
    background-color: var(--crema);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: var(--header-height);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max-width);
    margin: 0 auto;
    height: 100%;
}

.header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.btn-minimal-shop {
    text-decoration: none;
    background-color: var(--rosso);
    color: #fff;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 400;
    transition: 0.3s;
    border: 1px solid var(--rosso);
    padding: 8px 18px;
    border-radius: 30px;
    display: inline-block;
    line-height: 1;
}

.btn-minimal-shop:hover {
    background-color: #fff;
    color: var(--dark);
    border-color: #eee;
}

.d-mobile {
    display: none;
}

.d-desktop {
    display: inline;
}

.menu-toggle {
    width: 40px;
}

.logo img {
    height: 75px;
    width: auto;
    display: block;
}

/* --- MENU OVERLAY --- */
.menu-toggle {
    cursor: pointer;
    height: 16px;
    position: relative;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bar {
    width: 100%;
    height: 2px;
    background: var(--dark);
    transition: 0.3s;
}

.menu-toggle.open .bar:first-child {
    transform: rotate(45deg) translateY(7px);
}

.menu-toggle.open .bar:last-child {
    transform: rotate(-45deg) translateY(-7px);
}

.full-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--crema);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.5s;
    z-index: 1900;
}

.full-menu.visible {
    visibility: visible;
    opacity: 1;
}

.full-menu ul {
    list-style: none;
    text-align: center;
}

.full-menu a {
    font-family: 'Prata', serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    text-decoration: none;
    color: var(--dark);
    display: block;
    margin: 15px 0;
    transition: 0.3s;
    letter-spacing: 1px;
}

.full-menu a:hover {
    color: var(--rosso);
    transform: scale(1.05);
}

/* --- HERO & SCROLL INDICATOR --- */
.hero-section {
    position: relative;
    scroll-margin-top: var(--header-height);
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

@media (max-width: 768px) {

    .hero-slider,
    .hero-slide {
        aspect-ratio: auto;
        /* Rimosso 1/1 per un look più immersivo */
        height: 100%;
    }

    .hero-section {
        height: calc(100vh - var(--header-height));
    }

    .hero-content {
        padding: 0 30px;
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 0.85rem;
        letter-spacing: 2px;
        line-height: 1.5;
    }
}

.hero-content {
    height: calc(100vh - var(--header-height));
    /* Centered in the current visible window space */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: #fff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    /* Ombra più definita per leggibilità */
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Mouse Animato */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: 0.3s;
    position: relative;
    margin-top: 20px;
}

.mouse {
    width: 26px;
    height: 44px;
    border: 2px solid #fff;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
    margin-bottom: 5px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    animation: scroll-wheel 2s infinite;
}

.arrow span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg);
    margin: -4px 0;
    animation: scroll-arrow 2s infinite;
}

@keyframes scroll-wheel {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(15px);
    }
}

@keyframes scroll-arrow {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* --- SECTIONS --- */
.content-section {
    padding: 80px 0;
    /* Remove 10% side padding */
    display: flex;
    align-items: center;
    min-height: 80vh;
    position: relative;
    scroll-margin-top: var(--header-height);
}

.container-split {
    display: flex;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    align-items: center;
    gap: 80px;
    position: relative;
    /* Added to contain arrows */
}

.reverse .container-split {
    flex-direction: row-reverse;
}

.text-box {
    flex: 1;
}

.text-box h2 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin-bottom: 10px;
    line-height: 1.1;
}

.text-box h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #636253;
    font-weight: 300;
}

.text-box b {
    font-weight: 600;
    color: var(--dark);
}

/* --- CAROUSEL --- */
.img-box-wrapper {
    flex: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.img-box {
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
    border-radius: 25px;
    height: 550px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-container img {
    min-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}

.carousel-dots {
    display: flex;
    gap: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: var(--rosso);
    transform: scale(1.3);
}

/* --- CONTATTI BOTTONI --- */
.contact-buttons-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    border: 1px solid var(--dark);
    color: var(--dark);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 50px;
    transition: 0.3s;
}

.btn-contact:hover {
    background: var(--dark);
    color: #fff;
    transform: translateY(-3px);
}

.map-box-small {
    flex: 1;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Mobile credit - hidden on desktop */
.mobile-credit {
    display: none;
}

/* --- NAVIGATION ARROWS --- */
.scroll-nav {
    position: absolute;
    font-size: 1.6rem;
    color: var(--dark);
    opacity: 0.4;
    transition: 0.3s;
    z-index: 1500;
    text-decoration: none;
}

.scroll-nav:hover {
    opacity: 1;
    color: var(--rosso);
}

.scroll-nav.next {
    bottom: 90px;
    right: 20px;
    animation: bounceDown 2s infinite;
}

.scroll-nav.prev {
    top: 20px;
    right: 20px;
    animation: bounceUp 2s infinite;
}

/* Ensure arrows stay within the 1200px content area on wide screens */
@media (min-width: 1240px) {

    .scroll-nav.next,
    .scroll-nav.prev {
        right: calc(50% - 600px - 80px);
        /* Moved 100px further right from +20px to -80px */
    }
}

/* Palette Colors */
.palette-crema {
    background-color: var(--crema);
}

.palette-tortora {
    background-color: var(--tortora);
}

.palette-verde {
    background-color: var(--verde);
    color: #fff;
}

.palette-verde h3,
.palette-verde .scroll-nav,
#shop .scroll-nav,
.palette-verde b {
    color: #fff;
}

.palette-verde .btn-contact {
    border-color: #fff;
    color: #fff;
}

.palette-verde .btn-contact:hover {
    background: #fff;
    color: var(--verde);
}

/* --- FOOTER STICKY --- */
.main-footer.sticky-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: var(--footer-height);
    background: var(--dark);
    color: #fff;
    z-index: 2000;
    padding: 0 40px;
    display: flex;
    align-items: center;
    /* Vertically center logo and icons */
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.footer-logo img {
    height: 30px;
    display: block;
}

.footer-info {
    font-size: 0.8rem;
    opacity: 0.8;
    flex-grow: 1;
    text-align: center;
    margin-top: 10px;
    /* Aligns text with the bottom baseline of the logo */
}

.footer-info a.gv-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    border-bottom: 1px solid transparent;
}

.footer-info a.gv-link:hover {
    color: var(--verde);
    border-bottom: 1px solid var(--verde);
}

/* Footer text variants */
.footer-text-mobile {
    display: none !important;
}

.footer-text-desktop {
    display: inline !important;
}

.footer-social {
    display: flex;
    gap: 15px;
    flex: 0 0 200px;
    justify-content: flex-end;
}

.footer-link {
    color: #fff;
    font-size: 1.4rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    /* Center icons vertically */
    justify-content: center;
    width: 35px;
    height: 35px;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--verde);
    transform: translateY(-3px);
}

/* Fine-tuning icon sizes for visual parity */
.footer-link .fa-paypal {
    font-size: 1.6rem;
}

.footer-link .fa-credit-card {
    font-size: 1.35rem;
}

.footer-link .fa-whatsapp {
    font-size: 1.45rem;
}

.footer-link .fa-instagram {
    font-size: 1.45rem;
}

/* --- RESPONSIVE --- */
@media (min-width: 992px) {
    .hero-image-container {
        aspect-ratio: auto;
        min-height: calc(100vh - var(--header-height));
    }
}

@media (max-width: 992px) {
    :root {
        --header-height: 90px;
        --footer-height: 140px;
    }

    /* Header */
    .main-header {
        padding: 20px 25px;
    }

    .logo img {
        height: 45px;
    }

    .btn-minimal-shop {
        font-size: 0.7rem;
        padding: 5px 12px;
        letter-spacing: 1px;
    }

    .d-desktop {
        display: none;
    }

    .d-mobile {
        display: inline;
    }

    /* Hero section - smaller text */
    .hero-content h1 {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }

    .hero-content p {
        font-size: 0.85rem !important;
        letter-spacing: 2px;
    }

    /* Sections */
    .content-section {
        padding: 50px 25px;
        min-height: auto;
    }

    .container-split {
        flex-direction: column;
        text-align: center;
        gap: 35px;
    }

    /* Override reverse class on mobile - always show text on top */
    .reverse .container-split {
        flex-direction: column;
    }

    /* Text adjustments */
    .text-box h2 {
        font-size: clamp(2rem, 8vw, 2.5rem);
        margin-bottom: 15px;
    }

    .text-box h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .text-box p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* Carousel - optimized for mobile */
    .img-box-wrapper {
        width: 100%;
    }

    .img-box {
        height: 350px;
        border-radius: 20px;
    }

    .carousel-dots {
        gap: 10px;
        margin-top: 5px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    /* Contact section */
    .contact-buttons-row {
        justify-content: center;
    }

    .btn-contact {
        font-size: 0.8rem;
        padding: 10px 18px;
    }

    .map-box-small {
        width: 100%;
        height: 300px;
    }

    /* Show mobile credit */
    .mobile-credit {
        display: block;
        text-align: center;
        margin-top: 20px;
        font-size: 0.85rem;
        color: var(--dark);
        opacity: 0.8;
    }

    .mobile-credit .gv-link {
        color: var(--dark);
        text-decoration: none;
        font-weight: 600;
        border-bottom: 1px solid transparent;
        transition: 0.3s;
    }

    .mobile-credit .gv-link:hover {
        color: var(--verde);
        border-bottom: 1px solid var(--verde);
    }

    /* Hide navigation arrows on mobile */
    .scroll-nav {
        display: none;
    }

    /* Footer - stacked vertical layout */
    .main-footer.sticky-footer {
        height: var(--footer-height);
        padding: 20px 25px;
    }

    .footer-container {
        flex-direction: column;
        gap: 15px;
        justify-content: center;
    }

    .footer-logo {
        order: 1;
        text-align: center;
    }

    .footer-logo img {
        height: 28px;
    }

    .footer-info {
        order: 2;
        font-size: 0.7rem;
        line-height: 1.5;
        text-align: center;
        flex-grow: 0;
    }

    /* Show mobile text, hide desktop text */
    .footer-text-mobile {
        display: inline !important;
    }

    .footer-text-desktop {
        display: none !important;
    }

    .footer-social {
        order: 3;
        justify-content: center;
        gap: 25px;
        flex: 0;
    }

    .footer-social a {
        font-size: 1.3rem;
    }

    /* Shop Header Responsive */
    .shop-header h2 {
        font-size: clamp(2.5rem, 10vw, 3rem) !important;
        letter-spacing: 1px;
    }

    .shop-header .subtitle-main {
        font-size: 0.9rem !important;
        letter-spacing: 2px !important;
    }

    .shop-header .subtitle-sub {
        font-size: 0.85rem !important;
    }
}

/* Additional mobile optimization for very small screens */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .img-box {
        height: 300px;
    }

    .footer-info {
        font-size: 0.65rem;
    }

    .footer-info span {
        display: block;
    }

    .shop-header h2 {
        font-size: 2.2rem !important;
    }

    .shop-header .subtitle-main {
        letter-spacing: 1px !important;
    }
}

/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--dark);
    color: #fff;
    padding: 15px 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s ease;
}

.cookie-banner.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.cookie-banner p {
    margin: 0;
    line-height: 1.4;
}

.cookie-banner button {
    background: #fff;
    color: var(--dark);
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    white-space: nowrap;
}

.cookie-banner button:hover {
    background: var(--verde);
    color: #fff;
    transform: scale(1.05);
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        border-radius: 20px;
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 20px;
    }
}

/* --- MENU HIGHLIGHT --- */
.menu-highlight-red {
    color: #d32f2f !important;
}

/* --- SHOP SECTION --- */
#shop {
    padding: 60px 20px;
    background-color: var(--verde);
    scroll-margin-top: var(--header-height);
    position: relative;
}

.shop-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
}

.shop-header h2 {
    font-size: 4.2rem;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: 2px;
    line-height: 1;
}

.shop-header .subtitle-main {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.shop-header .subtitle-sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 0.2px;
    margin: 0;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

@media (min-width: 1200px) {
    .shop-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1199px) and (min-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        justify-content: center;
    }
}

.shop-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.shop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.shop-img-container {
    width: 100%;
    height: 150px;
    /* Ridotto ulteriormente da 180px */
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--rosso);
}

.shop-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.shop-card:hover .shop-img-container img {
    transform: scale(1.08);
}

.shop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
    text-align: center;
}

.shop-overlay p {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    font-weight: 300;
}

.shop-card:hover .shop-overlay {
    opacity: 1;
}

.shop-card-body {
    padding: 12px;
    /* Ridotto da 15px */
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Ridotto da 12px per compattare */
    flex-grow: 1;
}

.shop-card-body h4 {
    font-family: 'Prata', serif;
    font-size: 1.25rem;
    /* Leggermente più piccolo */
    color: var(--dark);
    margin: 0;
    font-weight: 400;
}

.price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.starting-from {
    font-size: 0.8rem;
    font-style: italic;
    color: #999;
}

.price-display {
    font-family: 'Prata', serif;
    font-size: 1.2rem;
    /* Più armonioso */
    font-weight: 500;
    color: var(--verde);
}

/* Nascondi prezzo zero per ordine telefonico finché non viene digitato */
#display-price-prodotto_custom:empty,
#display-price-prodotto_custom[data-value="0"] {
    display: none;
}

.shop-options select {
    width: 100%;
    padding: 8px;
    /* Ridotto da 10px */
    border: 1px solid #eee;
    background: #fdfdfd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    outline: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qty-control button {
    width: 28px;
    /* Ridotto da 32px */
    height: 28px;
    border-radius: 50%;
    border: 1px solid #eee;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark);
    transition: 0.2s;
    font-size: 0.8rem;
}

.qty-control button:hover {
    background: var(--verde);
    color: #fff;
    border-color: var(--verde);
}

.qty-control input {
    width: 40px;
    text-align: center;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

.btn-shop {
    margin-top: auto;
    /* Ripristinato per allineare i pulsanti in fondo alla riga */
    width: 100%;
    padding: 10px;
    /* Ridotto da 12px */
    background: var(--dark);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    /* Ridotto da 0.85rem */
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* --- IN-PAGE CART VIEW --- */
.cart-header-inpage {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 15px;
}

.cart-title-small {
    font-size: 1.2rem;
    color: #fff;
    margin: 0;
    font-weight: 400;
}

.cart-step-container {
    background: #fff;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto 50px;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.close-cart-inpage {
    background: #fff;
    color: var(--dark);
    border: none;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.close-cart-inpage:hover {
    background: var(--crema);
    transform: translateY(-2px);
}

.close-cart-inpage i {
    font-size: 0.85rem;
}

#cart-step-1,
#cart-step-2 {
    display: flex;
    flex-direction: column;
}

/* Delivery Selection Styling */
.delivery-selection {
    background: #fdfaf5;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--tortora);
}

.delivery-selection label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 400;
}

.delivery-selection select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
    font-family: inherit;
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 90px;
    left: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.3s;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    color: #fff;
}

@media (max-width: 768px) {
    .whatsapp-float {
        display: none;
    }
}

/* On wide screens, keep WhatsApp inside the 1200px logic */
@media (min-width: 1240px) {
    .whatsapp-float {
        left: calc(50% - 600px - 80px);
        /* Moved 100px further left from +20px to -80px */
    }
}

/* Qty Buttons in Items */
.cart-item-qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: 0.2s;
}

.cart-qty-btn:hover {
    background: var(--crema);
}

/* Summary Lines */
.cart-summary-lines {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #666;
}

.cart-total-main {
    display: flex;
    justify-content: space-between;
    font-family: 'Prata', serif;
    font-size: 1.4rem;
    color: var(--dark);
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}

/* Form Styling */
.customer-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 0;
}

.customer-form .form-row {
    display: flex;
    gap: 15px;
}

.customer-form input,
.customer-form select,
.customer-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #eee;
    background: #fafafa;
    font-family: inherit;
    transition: 0.3s;
    font-size: 0.95rem;
}

.customer-form input:focus,
.customer-form select:focus,
.customer-form textarea:focus {
    border-color: var(--verde);
    background: #fff;
    outline: none;
}

.customer-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
}

.customer-form textarea {
    resize: vertical;
    min-height: 80px;
}

.date-selection-pills {
    display: flex;
    gap: 10px;
    margin: 10px 0 20px;
    flex-wrap: wrap;
}

.date-pill {
    padding: 10px 20px;
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.3s;
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.date-pill:hover {
    background: #eee;
}

.date-pill.active {
    background: var(--verde);
    color: #fff;
    border-color: var(--verde);
}

.form-divider {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 25px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.form-divider:first-child {
    margin-top: 0;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.back-btn {
    flex: 1;
    padding: 15px;
    background: #eee;
    color: #555;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.back-btn:hover {
    background: #ddd;
}

.checkout-btn {
    flex: 2;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cart-header h3 {
    font-family: 'Prata', serif;
    font-size: 1.5rem;
    color: var(--dark);
    margin: 0;
    font-weight: 400;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: 0.2s;
}

.close-cart:hover {
    color: var(--dark);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 5px;
    min-height: 0;
}

/* Scrollbar for cart items */
.cart-items::-webkit-scrollbar {
    width: 5px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f9f9f9;
}

.item-info h4 {
    margin: 0 0 5px;
    font-size: 1rem;
    color: var(--dark);
    font-weight: 400;
}

.item-info span {
    font-size: 0.85rem;
    color: #888;
}

.item-right {
    text-align: right;
}

.item-price {
    font-weight: 400;
    color: var(--verde);
    display: block;
    margin-bottom: 5px;
}

.remove-item {
    background: none;
    border: none;
    color: #e57373;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.cart-footer-inpage {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-family: 'Prata', serif;
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--dark);
    font-weight: 400;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--dark);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- CUSTOM PRICE INPUT --- */
.custom-price-container {
    margin: 10px 0;
}

.custom-price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid var(--tortora);
    border-radius: 12px;
    padding: 2px 15px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.custom-price-input-wrapper:focus-within {
    border-color: var(--verde);
    box-shadow: 0 0 0 4px rgba(74, 93, 78, 0.1);
}

.currency-symbol {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--verde);
    margin-right: 10px;
}

.custom-price-input-wrapper input {
    border: none !important;
    background: transparent !important;
    padding: 10px 0 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: var(--dark) !important;
    width: 100% !important;
    outline: none !important;
    margin: 0 !important;
}

.custom-price-input-wrapper input::placeholder {
    color: #ccc;
    font-weight: 400;
}

/* Rimuovi freccette spin sui browser */
.custom-price-input-wrapper input::-webkit-outer-spin-button,
.custom-price-input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.custom-price-input-wrapper input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* --- PRODUCT DESCRIPTION STATIC --- */
.product-description-static {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin: 5px 0 15px;
    font-weight: 400;
}

/* --- HEADER ACTIONS (CART ICON) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: flex-end;
}

.cart-icon-btn {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.cart-icon-btn:hover {
    color: var(--verde);
}

.cart-badge-header {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--rosso);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* --- TOAST NOTIFICATION --- */
.cart-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(26, 26, 26, 0.95);
    color: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    z-index: 3000;
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    font-size: 0.95rem;
}

.toast-content i {
    color: #4CAF50;
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .cart-toast {
        width: 90%;
        bottom: 20px;
        padding: 12px 20px;
    }

    .toast-content {
        font-size: 0.85rem;
    }
}

/* --- CALENDAR MODAL --- */
#calendar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.calendar-container {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', sans-serif;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-family: 'Prata', serif;
    font-size: 1.5rem;
    color: var(--dark);
    margin: 0;
    text-transform: capitalize;
}

.calendar-nav-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--dark);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: #f0f0f0;
    color: var(--rosso);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.calendar-day-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
    padding-bottom: 10px;
    text-transform: uppercase;
}

.calendar-date {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    transition: 0.2s;
    position: relative;
}

.calendar-date:hover:not(.disabled) {
    background-color: var(--verde);
    color: #fff;
}

.calendar-date.selected {
    background-color: var(--rosso) !important;
    color: #fff !important;
    font-weight: 600;
}

.calendar-date.disabled {
    color: #ddd;
    cursor: not-allowed;
}

.calendar-date.today::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    background: var(--rosso);
    border-radius: 50%;
}

.close-calendar {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    z-index: 10;
}

.close-calendar:hover {
    color: var(--rosso);
}

/* Validation Error Highlight */
.input-error {
    border: 1px solid #d80707 !important;
    background-color: #fff0f0 !important;
}