:root {
    --text-color: #333;
    --primary-background: #F7F6F0;
    --primary-color: #B79A3A;
    --primary-color-hover: #8A742E;
    --border-radius: 10px;
    --secondary-color: #000000;
    --accent-color: #F7F6F0;
}

html,
body{
    overflow-x: hidden;
}

button:not(.link){
    border-radius: 5px;
    border: 1px solid;
    padding: 5px 10px;
    transition: all .3s;
}

.btn-0{
    /* Base button style */
}

.btn-1{
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

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

.btn-1.outlined{
    background-color: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-1.outlined:hover{
    background-color: var(--primary-color);
    color: #fff !important;
}

button.circular{
    border-radius: 50%;
}

button.text-color{
    color: var(--text-color) !important;
}

button.btn-trash{
    padding: 0;
    text-transform: uppercase;
    background-color: gray;
    color: #fff;
    padding: 2px 8px;
    border: 0;
    font-size: 13px;
}

@keyframes pulseRecording {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 20, 147, 0.4);
    }
    70% { 
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 20, 147, 0);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 20, 147, 0);
    }
}

#main-menu {
    padding-bottom: 0;
    background-color: var(--secondary-color);
}

#main-menu .col-12{
    display: grid;
    grid-template-columns: 85% 10% 5%;
}

#main-menu .col-12 ul{
    list-style: none;
    margin-bottom: 0;
    text-align: center;
    padding-left: 0;
    width: 100%;
}

#main-menu .col-12 ul li a{
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
}

#main-menu .col-12>div {
    background-color: transparent;
    margin-top: 0;
    padding-top: 7px;
    padding-bottom: 7px;
    border-radius: 0;
    display: flex;
    align-items: center;
}

#main-menu .btn-cart{
    display: none;
}

#main-menu-right button{
    position: relative;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 22px;
    border: 0;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    background-color: #fff;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

#main-menu-right button.btn-log{
    font-size: 24px;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    font-size: 9px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    border-radius: 50%;
}

#mob-menu{
    background-color: #fff;
    padding-top: 10px;
    padding-bottom: 10px;
}

#mob-menu .col-12>div{
    background-color: var(--accent-color);
    padding: 10px;
    border-radius: var(--border-radius);
}

#logo{
    width: 130px;
}

/* logo glacom di fallback: reso bianco per stare bene su qualsiasi header colorato */
#logo.logo-glacom{
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

/* freccia per tornare alla landing di risto.glacom.ai */
#back-to-site{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

#back-to-site:hover{
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
}

#assistant-section{
    /* Assistant section styles */
}

#assistant-container{
    background-color: var(--primary-background);
}

#assistant-sim-texts {
    background-color: #fff;
    height: calc(100dvh - 175px);
    border-radius: var(--border-radius);
    padding: 10px 20px 20px 20px;
    overflow: scroll;
}

#assistant-sim-texts .alert{
    width: max-content;
    margin: 0 auto;
    padding: 2px 15px;
    font-size: 14px;
    margin-bottom: 20px;
}

#assistant-textarea{
    width: 100%;
    border: 0;
    padding: 15px;
    padding-right: 80px;
    border-radius: var(--border-radius);
    resize: none;
    outline: 0;
    box-shadow: 0 0 0 0;
}

#assistant-sim-chat{
    position: relative;
    margin-top: 10px;
    background-color: #fff;
    border-radius: var(--border-radius);
}

#assistant-sim-chat .btn-send,
#assistant-sim-chat .btn-audio{
    position: absolute;
    bottom: 13px;
    right: 20px;
    background-color: #fff;
    color: #757575;
    border-radius: 50%;
    width: 33px;
    height: 33px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#assistant-sim-chat .btn-audio.hide,
#assistant-sim-chat .btn-send{
    display: none;
}

#assistant-sim-chat .btn-audio.hide+.btn-send{
    display: flex;
}

#assistant-sim-chat .btn-audio:hover{
    color: var(--primary-color);
}

#assistant-sim-chat .btn-audio.recording {
    background-color: var(--primary-color) !important;
    color: #fff;
    animation: pulseRecording 1.5s infinite !important;
}

.assistant-message-box.bot {
    width: 80%;
    display: grid;
    grid-template-columns: 50px calc(100% - 50px);
}

.assistant-message-box.user {
    width: max-content;
    max-width: 75%;
    margin-left: auto;
    margin-right: 0;
    background-color: var(--accent-color);
    padding: 10px 20px;
    border-radius: 10px
}

.assistant-message-box.assistant-message-box{
    margin-top: 25px;
}

.assistant-avatar-box>div {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
}

.assistant-avatar-box>div img {
    width: 22px;
    height: 22px;
}

/* avatar a fonte unica: il testo dentro lo span è nascosto (arriva doppio
   dal PHP/JS), l'emoji visibile è SOLO quella del ::before dal branding */
.assistant-avatar-box>div span{
    font-size: 0;
    line-height: 1;
}

/* niente icona che ruota: durante il caricamento l'avatar "respira" dolcemente */
.assistant-avatar-box.loading>div span{
    animation: loadingBreathe 1.2s ease-in-out infinite;
    display: inline-block;
}

@keyframes loadingBreathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.82); opacity: 0.55; }
}

@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }

.message-container{
    padding-top: 2.5px;
}

.message-container>*{
    margin-top: 10px
}

.message-container>span {
    display: inline !important;
    opacity: 1 !important;
    animation: none !important;
    overflow: hidden;
    vertical-align: bottom;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
}

.message-container button{
    display: block;
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-size: 15.5px;
}

.message-container button:hover{
    background-color: var(--primary-color-hover);
}

.message-container button.btn-trash{
    margin-left: 50px;
}

button.quantity-btn,
.message-container button.quantity-btn{
    display: inline-block;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    padding: 0;
    background-color: var(--primary-color);
    color: #fff;
}

button.quantity-btn:hover,
.menu-item-quantity button.quantity-btn:hover{
    background-color: var(--primary-color-hover);
}

.message-container .action-buttons,
.message-orders-summary{
    max-width: 450px;
}

.message-orders-summary{
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #cbcbcb;
}

.message-container .action-buttons{
    padding-bottom: 20px;
    border-bottom: 1px solid #cbcbcb;
}

.message-container .action-buttons button{
    margin-top: 30px;
}

.message-single-order-summary.with-extra{
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    padding: 9px;
}

.message-single-order-summary button.dropdown-item,
.message-single-order-summary button.dropdown-toggle{
    width: 100%;
    text-align: left;
    padding: 10px;
    padding-right: 30px;
    background-color: transparent;
    border: 1px solid #cfcfcf;
    color: #000;
    border-radius: 10px;
    text-transform: capitalize;
}

.message-single-order-summary ul.dropdown-menu button.dropdown-item.selected,
.message-single-order-summary ul.dropdown-menu button.dropdown-item:hover,
.message-single-order-summary button.dropdown-toggle:not([disabled]):hover{
    border: 1px solid var(--primary-color);
    background-color: #fff;
}

.message-single-order-summary button.dropdown-toggle:after{
    position: absolute;
    top: 20px;
    right: 12px;
}

.message-single-order-summary button.dropdown-toggle[disabled]:after{
    display: none;
}

.message-single-order-summary ul.dropdown-menu{
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
}

.message-single-order-summary ul.dropdown-menu button.dropdown-item{
    border: 0;
    border-bottom: 1px solid #cfcfcf;
    border-radius: 0;
}

#assistant-resume-order .menu-item-extra>div,
.message-single-order-summary .menu-item-extra>div{
    color: #565656;
    font-weight: 400;
    font-size: 15px;
}

#assistant-resume-order .menu-item-extra>div{
    font-size: 14px;
}

#assistant-resume-order .menu-item-extra>div span+span{
    margin-left: 2px;
}

.message-single-order-summary .menu-item-extra>div:first-of-type{
    padding-top: 8px;
    margin-top: 10px;
    border-top: 1px solid rgb(235, 235, 235);
}

.message-single-order-summary .menu-item-extra>div+div{
    margin-top: 10px;
}

.message-single-order-summary select{
    border-radius: 5px;
    padding: 4px;
    border-color: #cfcfcf;
    margin-right: 10px;
}

.message-single-order-summary select[disabled]{
    color: #565656;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-indent: 1px;
    text-overflow: '';
}

.message-single-order-summary select[disabled]::-ms-expand {
    display: none;
}

.message-single-order-summary select[disabled]+div+button{
    display: none;
}

.message-single-order-summary .menu-item-exclusions-box>div + div,
.message-single-order-summary .menu-item-additions-box>div + div{
    margin-top: 5px;
}

.message-single-order-summary .menu-item-exclusions-box>div button,
.message-single-order-summary .menu-item-additions-box>div button{
    margin-right: 0;
    margin-left: 10px;
    border-radius: 50%;
    padding: 0;
    width: 23px;
    height: 23px;
    border-color: var(--primary-color);
    background-color: #fff;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-single-order-summary+.message-single-order-summary{
    margin-top: 20px;
}

.message-orders-checkout{
    margin-top: 25px;
}

#assistant-resume{
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 20px 15px 10px 15px;
}

#assistant-resume-title{
    text-align: center;
}

#resume-edit-order button.link{
    padding: 0;
    font-size: 15px;
    background-color: transparent;
    border: 0;
    display: block;
    text-decoration: underline;
}

#resume-edit-order button.btn-1{
    display: none;
}

#assistant-resume-order>#resume-edit-order:nth-of-type(1) button.link{
    display: none;
}

#assistant-resume-checkout button{
    width: 100%;
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: #fff;
}

#assistant-resume-checkout button[disabled]{
    background-color: #fff;
    color: var(--text-color);
}

#assistant-resume-order{
    margin-top: 15px;
    max-height: 65%;
    overflow: scroll;
}

.menu-item-name-box{
    display: flex;
    align-items: flex-end;
    white-space: nowrap;
}

.resume-single-order{
    /* Base resume order styles */
}

.resume-single-order>div:first-of-type{
    display: flex;
    align-items: flex-end;
    white-space: nowrap;
}

.resume-single-order .menu-item-name {
    max-width: 75%;
}

.resume-single-order strong{
    margin-right: 5px;
    color: var(--primary-color);
}

.dotted-line{
    flex-grow: 1;
    height: 1px;
    border-bottom: 1px dashed var(--primary-color);
    margin-left: 4px;
    margin-right: 4px;
    align-self: flex-end;
    margin-bottom: 6px;
}

.resume-single-order .menu-item-cart{
    display: none;
    align-items: center;
    justify-content: unset;
}

.resume-single-order .add-to-cart-btn{
    margin-left: 5px;
}

.resume-single-order button.btn-trash{
    margin-left: auto;
    margin-right: 0;
}

.resume-single-order+.resume-single-order{
    margin-top: 10px;
}

#assistant-resume-order.editing .resume-single-order+.resume-single-order{
    margin-top: 25px;
}

#assistant-resume-order.editing .resume-single-order .menu-item-cart{
    display: flex;
}

#assistant-resume-order.editing #resume-edit-order button.link{
    display: none;
}

#assistant-resume-order.editing #resume-edit-order button.btn-1{
    display: block;
}

#assistant-resume-checkout{
    margin-top: auto;
    margin-bottom: 0;
}

#assistant-resume-price-box{
    display: flex;
    align-items: flex-end;
    background-color: whitesmoke;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

#assistant-resume-price-box #order-final-price{
    font-size: 19px;
    margin-left: auto;
    margin-right: 0;
}

#assistant-resume-checkout-btn{
    height: 45px;
    display: none;
}

#assistant-resume-checkout-btn.show{
    display: block;
}

#overlay-resume-section,
#overlay-menu-section{
    display: none;
    background-color: rgba(0,0,0,0.2);
    position: fixed;
    top: 70px;
    left: 0;
    z-index: 99;
    width: 100%;
    height: 100%;
}

#overlay-resume-section{
    z-index: 9999;
    top: 0;
}

#menu-section{
    background-color: #fff;
    position: fixed;
    bottom: 0;
    left: 22px;
    height: 88dvh;
    width: calc(78% - 32px);
    border-top-right-radius: var(--border-radius);
    border-top-left-radius: var(--border-radius);
    transition: all .7s;
    padding: 20px 20px 20px 20px;
    border: 2px solid var(--primary-color);
    transform: translateY(100%);
    z-index: 999;
}

#menu-section.open{
    transform: translateY(0);
}

#menu-section-close{
    position: absolute;
    top: 20px;
    right: 30px;
}

#menu-section .nav{
    margin-top: 35px;
}

#menu-section .nav .nav-item+.nav-item{
    margin-left: 6px;
}

#menu-section .nav .nav-link{
    color: var(--text-color);
}

#menu-section .nav .nav-link{
    border: 1px solid transparent;
    background-color: var(--accent-color);
    opacity: 0.7;
    padding: 5px 15px;
}

#menu-section .nav .nav-link.active{
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    opacity: 1;
}

#menu-section .nav .nav-link:hover{
    border: 1px solid var(--primary-color);
}

#menu-section .tab-pane>div{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column-gap: 50px;
    row-gap: 35px;
}

#menu-section .tab-content{
    border-top: 1px solid whitesmoke;
    padding-top: 25px;
    max-height: 66dvh;
    overflow: scroll;
}

.menu-item-box{
    display: flex;
}

.menu-item-image>div{
    background-color: whitesmoke;
    border-radius: 5px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-sizing: content-box;
}

.menu-item-image>div img{
    width: 60px;
}

#menu-section .menu-item-content{
    padding-left: 10px;
    width: -webkit-fill-available;
}

.menu-item-name{
    font-weight: 600;
    max-width: 70%;
    white-space: pre-wrap;
    line-height: normal;
}

#menu-section .menu-item-name{
    font-size: 18px;
}

.menu-item-ingredients{
    color: rgb(86, 86, 86);
    font-size: 14.5px;
    font-weight: 300;
    line-height: 18px;
    margin-top: 2px;
    white-space: normal;
    word-break: break-word;
}

.menu-item-cart{
    margin-top: 11px;
    display: flex;
    justify-content: space-between;
}

#menu-section .add-to-cart-btn{
    border-radius: 50%;
    width: 25px;
    height: 25px;
    padding: 0;
    background-color: var(--primary-color);
    color: #fff;
}

#menu-section .add-to-cart-btn.clicked{
    animation-name: addToCartConfirm;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

#menu-section .add-to-cart-btn i:last-of-type{
    display: none;
}

#menu-section button[data-bs-toggle="modal"]{
    background-color: transparent;
    border: 0;
    padding: 2px;
    text-decoration: underline;
    font-size: 15.5px;
}

@keyframes addToCartConfirm{
    0% { opacity: 1; }
    50% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

.menu-item-quantity{
    width: max-content;
    background-color: var(--accent-color);
    padding: 3px;
    border-radius: 20px;
}

.menu-item-quantity.added+.add-to-cart-btn{
    display: block;
}

.menu-item-quantity .quantity-display{
    display: inline-block;
    width: 0px;
    opacity: 0;
    text-align: center;    
    margin-left: -4px;
}

.menu-item-quantity.added>.quantity-btn:first-of-type{
    display: inline-block;
    text-align: center;
}

@keyframes openQuantity{
    from {
        width: 0;
        margin-left: -4px;
    }
    to {
        width: 40px;
        margin-left: 0;
        opacity: 1;
    }
}

.menu-item-quantity.added .quantity-display{
    animation-name: openQuantity;
    animation-duration: 0.3s;
    animation-fill-mode: forwards;
}

#modal-ingredients .btn-close{
    margin-left: 0;
}

#modal-ingredients .modal-title{
    margin: 0 auto;
}

#modal-ingredients .modal-title span{
    cursor: pointer;
}

#modal-ingredients .modal-title span.active{
    color: var(--primary-color);
}

#modal-ingredients .menu-item-content{
    min-width: 350px;
    max-width: 100%;
}

#modal-item-ingredients-list,
#modal-ingredients-list{
    display: grid;
    grid-template-columns: calc(33.33% - 5px) calc(33.33% - 5px) calc(33.33% - 5px);
    column-gap: 8px;
    row-gap: 5px;
}

#modal-item-ingredients-list>div,
#modal-ingredients-list>div{
    padding: 0px;
}

#modal-item-ingredients-list>div label,
#modal-ingredients-list>div label{
    width: 100%;
    padding: 10px 15px;
    cursor: pointer;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    font-size: 15.5px;
    line-height: 18px;
    height: 100%;
}

#modal-item-ingredients-list>div label span,
#modal-ingredients-list>div label span{
    display: block;
}

#modal-item-ingredients-list>div label span:first-letter,
#modal-ingredients-list>div label span:first-letter{
    text-transform: uppercase;
}

#modal-item-ingredients-list>div label i,
#modal-ingredients-list>div label i{
    color: #fff;
}

#modal-item-ingredients-list>div input:checked+label,
#modal-ingredients-list>div input:checked+label{
    border: 1px solid var(--primary-color);
}

#modal-item-ingredients-list>div input:checked+label i,
#modal-ingredients-list>div input:checked+label i{
    color: var(--primary-color);
}

/* Media Queries */
@media (min-width: 767.98px){
    #main-menu-right ul li+li{
        margin-left: 8px;
    }
    #mob-menu{
        display: none;
    }
    #assistant-container{
        grid-template-columns: 78% calc(22% - 10px);
        grid-column-gap: 10px;
        border-radius: var(--border-radius);
        padding: 10px;
    }
}

@media (min-width: 1200px){
    #assistant-container{
        grid-template-columns: 78% calc(22% - 10px);
        grid-column-gap: 10px;
        border-radius: var(--border-radius);
        padding: 10px;
    }
}

@media (max-width: 1200px){
    #main-menu .col-12{
        grid-template-columns: 20% 37% 43%;
    }
    #menu-section .tab-pane>div{
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-column-gap: 50px;
        row-gap: 45px;
    }
    #assistant-container {
        grid-template-columns: 74% calc(26% - 10px);
        grid-column-gap: 10px;
        border-radius: var(--border-radius);
        padding: 10px;
    }
    #menu-section {
        width: calc(74% - 35px);
    }
    .resume-single-order{
        font-size: 15.5px;
    }
}

@media (max-width: 1100px){
    #assistant-container {
        grid-template-columns: 72% calc(28% - 10px);
    }
    #menu-section {
        width: calc(72% - 35px);
    }
}

@media (max-width: 991.98px){
    html,
    body{
        overflow: hidden;
    }
    #main-menu{
        border-bottom: 2px solid whitesmoke;
    }
    #logo{
        width: 100px;
    }
    #main-menu .col-12{
        grid-template-columns: 25% 50% 25%;
    }
    #main-menu .btn-cart{
        display: block;
    }
    #assistant-container {
        display: block !important;
        grid-template-columns: unset;
        row-gap: unset;
        column-gap: unset;
    }
    #assistant-resume{
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        height: 100dvh;
        z-index: 99999;
        transform: translateX(120dvh);
    }
    #assistant-resume.open{
        display: flex;
        animation: slideIn 0.3s linear forwards;
    }
    @keyframes slideIn {
        0% {
            transform: translateX(100dvh);
        }
        100% {
            transform: translateX(0);
        }
    }
    #mob-menu{
        padding-bottom: 0;
    }
    #mob-menu .row>.col-12{
        padding-left: 0;
        padding-right: 0;
    }
    #assistant-container,
    #assistant-section>.row>.col-12{
        padding-left: 0;
        padding-right: 0;
    }
    #assistant-container{
        padding-bottom: 0;
        padding-top: 0;
        background-color: #fff;
    }
    #assistant-sim-texts {
        height: calc(100dvh - 130px);
    }
    .assistant-message-box.bot{
        display: block;
        grid-template-columns: unset;
    }
    .assistant-message-box.user+.assistant-message-box.bot .assistant-avatar-box:not(.loading){
        display: none;
    }
    #assistant-sim-texts{
        border-radius: 0;
        z-index: 8;
    }
    #assistant-sim-chat{
        width: calc(100% - 1px);
        color: #000;
        z-index: 999;
        margin-left: 0.5px;
        margin-top: 0px;
        border: 1.5px 1.5px 0px 1.5px;
        border-style: solid;
        border-color: #d8d8d8;
        border-radius: 7px 7px 0px 0px;
    }
    #assistant-textarea-box{
        padding-left: 5px;
        padding-right: 5px;
    }
    #assistant-textarea{
        background-color: transparent;
        border-radius: 0;
        padding-right: 70px;
    }
    #assistant-textarea::placeholder{
        color: rgb(112, 112, 112);
    }
    #assistant-sim-chat .btn-send,
    #assistant-sim-chat .btn-audio{
        background-color: transparent;
        border: 0;
        font-size: 22px;
    }
    #assistant-sim-chat .btn-audio.recording {
        background-color: #fff !important;
        color: var(--primary-color);
        animation: pulseRecording 1.5s infinite !important;
    }
    #overlay-resume-section.show,
    #overlay-menu-section.show{
        display: block;
    }
    #overlay-resume-section.show{
        transform: translateX(0);
    }
    #menu-section{
        width: 100%;
        left: 0;
        height: 83dvh;
        border-top-right-radius: 30px;
        border-top-left-radius: 30px;
        background-color: #FFFAF4;
        border: 0;
        padding-right: 0;
        padding-bottom: 50px !important;
    }
    #menu-section .nav{
        overflow: scroll;
        white-space: nowrap;
        display: flex;
        align-items: center;
        width: 100%;
        max-width: 100%;
        flex-wrap: nowrap;
        padding-bottom: 20px;
    }
    #menu-section .nav .nav-link{
        background-color: #fff;
        border-radius: 20px;
        padding: 6px 16px;
        font-weight: 300;
        font-size: 15.5px;
    }
    #menu-section-title{
        padding-right: 25px;
    }
    #menu-section .tab-content{
        max-height: 60dvh;
        overflow: scroll;
        padding-right: 25px;
        border-top: 0;
        padding-top: 0px;
    }
    #menu-section .tab-pane>div{
        padding-bottom: 55px;
        row-gap: 30px;
    }
    .menu-item-quantity,
    .menu-item-image>div{
        background-color: #fff;
    }
    #modal-item-ingredients-list,
    #modal-ingredients-list{
        grid-template-columns: calc(50% - 5px) calc(50% - 5px);
        column-gap: 5px;
        row-gap: 5px;
    }
}

@media (max-width: 767.98px){
    #main-menu .col-12 {
        grid-template-columns: 30% 40% 30%;
    }
    #main-menu .col-12>div{
        padding-bottom: 0;
    }
    #main-menu-right button{
        font-size: 20px;
        border: 0;
    }
    .cart-badge {
        top: 0px;
        right: 0px;
    }
    #overlay-menu-section{
        top: 64px;
    }
    #menu-section-title{
        text-align: center;
    }
    #menu-section-close{
        padding: 2px 7px;
        border: 0;
    }
    #menu-section-close span{
        display: none;
    }
    #menu-section .tab-pane>div {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        grid-column-gap: 0px;
        row-gap: 20px;
    }
}

@media (max-width: 575.98px){
    #assistant-sim-texts {
        padding: 10px 10px 20px 10px;
    }
    .assistant-avatar-box>div {
        width: 25px;
        height: 25px;
        margin-bottom: 3px;
        font-size: 15px;
    }
    #assistant-textarea{
        padding-left: 10px;
        font-size: 16.5px;
    }
}

@media (max-width: 768px) {
    .mobile-actions {
        position: fixed;
        bottom: 100px;
        right: 12px;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }
    .mobile-actions .btn-1,
    .mobile-actions .btn-cart {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        padding: 0;
        background-color: #f8f9fa;
        border: none;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        color: #333;
        font-size: 1.25rem;
    }
    .mobile-actions .btn-cart .cart-badge {
        position: absolute;
        top: -6px;
        right: -6px;
        background-color: #dc3545;
        color: white;
        font-size: 0.7rem;
        font-weight: bold;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-actions .btn-1 .cart-badge {
        display: none;
    }
}

/* Stili per elementi dopo l'aggiunta al carrello */
.static-product-display {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: default;
}

.static-quantity-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.25rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    font-weight: 500;
}

.static-quantity-display span {
    font-weight: bold;
    color: #198754;
}

.order-added-to-cart {
    position: relative;
    border-left: 3px solid #198754;
    padding-left: 0.5rem;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.cart-confirmation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #d1e7dd;
    color: #0f5132;
    border-radius: 0.25rem;
    font-weight: 500;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stile per le select disabilitate */
select:disabled {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
}

/* Stile per indicare che non è più modificabile */
.order-added-to-cart:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(248, 249, 250, 0.1);
    pointer-events: none;
}

/* Bubble BOT in attesa */
.assistant-message-box.bot.waiting .assistant-avatar-box.loading div{
    animation: gentle-pulse 2s ease-in-out infinite;
}

/* Animazione più delicata per l'avatar */
@keyframes gentle-pulse{
    0%, 100% { 
        transform: scale(1);
        opacity: 0.7;
    }
    50% { 
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Messaggio di progresso */
.message-container .progress-msg{
    color: #6c6c6c;
    font-style: italic;
    display: inline-block;
    position: relative;
    animation: subtle-breathe 3s ease-in-out infinite;
}

/* Animazione "respiratoria" delicata */
@keyframes subtle-breathe{
    0%, 100% { 
        opacity: 0.6;
        transform: translateY(0px) scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: translateY(-1px) scale(1.01);
    }
}

/* Effetto puntini progressivi */
.progress-msg::after {
    content: '';
    display: inline-block;
    width: 20px;
    text-align: left;
    animation: dots-loading 1.5s infinite;
}

@keyframes dots-loading {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}
/* ════════ demo-extras: carousel, eta viva, tracking rider, profilo login ════════ */

#demo-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 12px;
    background: var(--primary-color);
}

.dx-car-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(.4, 0, .2, 1);
}

.dx-car-slide {
    min-width: 100%;
    position: relative;
    min-height: 130px;
    display: flex;
    align-items: center;
}

.dx-car-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* velo scuro da sinistra: foto ben visibile a destra, testo leggibile a sinistra */
.dx-car-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.45) 55%, rgba(0,0,0,0.12) 100%);
}

.dx-car-body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,0.55);
}

.dx-car-icon { font-size: 2.2rem; }
.dx-car-text { font-size: 1.25rem; line-height: 1.3; letter-spacing: 0.01em; }

@media (max-width: 600px) {
    .dx-car-slide { min-height: 100px; }
    .dx-car-text { font-size: 1.02rem; }
    .dx-car-icon { font-size: 1.7rem; }
}

.dx-car-dots {
    position: absolute;
    right: 10px;
    bottom: 6px;
    display: flex;
    gap: 5px;
}

.dx-car-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    transition: background 0.3s;
}

.dx-car-dot.active { background: #fff; }

#live-eta { display: inline-block; font-weight: 700; }

.dx-eta-pulse { animation: dxEtaPulse 0.8s ease; }

@keyframes dxEtaPulse {
    0% { transform: scale(1); }
    35% { transform: scale(1.35); color: var(--primary-color); }
    100% { transform: scale(1); }
}

/* tracking rider nel riepilogo */
#rider-tracking {
    margin: 14px 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    font-size: 0.9rem;
}

.dx-track-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dx-track-title { font-weight: 700; }

.dx-track-live {
    color: #e53935;
    font-size: 0.72rem;
    font-weight: 700;
    animation: dxBlink 1.6s infinite;
}

@keyframes dxBlink { 50% { opacity: 0.35; } }

.dx-track-bar {
    position: relative;
    height: 8px;
    background: #f0ece6;
    border-radius: 6px;
    margin: 16px 0 10px;
}

.dx-track-fill {
    height: 100%;
    width: 8%;
    border-radius: 6px;
    background: var(--primary-color);
    transition: width 1.2s cubic-bezier(.4, 0, .2, 1);
}

.dx-track-rider {
    position: absolute;
    top: -17px;
    left: calc(8% - 14px);
    font-size: 1.25rem;
    transition: left 1.2s cubic-bezier(.4, 0, .2, 1);
    transform: scaleX(-1);
}

.dx-track-stage { font-weight: 600; margin-bottom: 2px; }

.dx-track-eta { color: #777; font-size: 0.82rem; }

#rider-tracking.dx-delivered .dx-track-fill { background: #2e7d32; }

/* profilo login demo */
.dx-prof-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.dx-prof-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
}

.dx-prof-name { font-weight: 700; font-size: 1.05rem; }
.dx-prof-pts { color: #777; font-size: 0.85rem; }
.dx-prof-title { font-weight: 700; margin: 10px 0 8px; font-size: 0.92rem; }

.dx-ord {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dx-ord-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.dx-ord-mid { flex: 1; min-width: 0; }

.dx-ord-names {
    font-weight: 600;
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dx-ord-date { color: #999; font-size: 0.76rem; }

.dx-ord-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.dx-ord-tot { font-weight: 700; font-size: 0.88rem; }

.dx-ord-badge {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

/* ═══════ Carousel multi-card (4 visibili su desktop, scorrimento continuo) ═══════ */
#demo-carousel.dx2 {
    background: transparent;
    overflow: hidden;
    border-radius: 0;
    position: relative;
    margin-bottom: 14px;
}

.dx2-track {
    display: flex;
    gap: 10px;
    width: max-content;
    animation: dx2scroll calc(var(--dx2-n, 10) * 3.2s) linear infinite;
}

#demo-carousel.dx2:hover .dx2-track { animation-play-state: paused; }

@keyframes dx2scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.dx2-card {
    flex: 0 0 auto;
    width: 168px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.dx2-card img {
    width: 100%;
    height: 92px;
    object-fit: cover;
    display: block;
}

.dx2-card.dx2-noimg img { display: none; }

.dx2-body {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dx2-name {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2em;
}

.dx2-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.dx2-promo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.3;
    border-color: var(--primary-color);
}

@media (max-width: 600px) {
    .dx2-card { width: 138px; }
    .dx2-card img { height: 76px; }
}

/* ═══════ Regia di cucina (forni/coda/rider → attesa) + offerte nel carrello ═══════ */
#kitchen-strip {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px 14px;
    justify-content: center;
    width: auto !important;
    max-width: 96%;
}

.dx-kchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 13px;
}

.dx-kchip i { opacity: 0.75; }
.dx-kchip b { font-weight: 700; }

#dx-offers {
    margin: 10px 12px 4px;
    padding: 10px 12px;
    background: #fff;
    border: 1px dashed var(--primary-color);
    border-radius: 10px;
    font-size: 0.85rem;
}

.dx-off-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 3px 0;
}

.dx-off-row small { color: #999; font-weight: 400; }
.dx-off-ok { color: #2e7d32; }
.dx-off-muted { opacity: 0.55; }

/* box offerte: righe compatte nella sidebar */
#dx-offers { font-size: 0.78rem; }
#dx-offers .dx-off-row { flex-wrap: wrap; }
#dx-offers small { display: block; font-size: 0.68rem; line-height: 1.2; }

/* bottoncino "personalizza ingredienti" nelle card del menu */
.edit-ingredients-btn {
    margin-right: 6px;
}

.menu-item-cart {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

/* bottone + sulle card del carousel */
.dx2-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.dx2-add {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.dx2-add:hover { transform: scale(1.12); }
.dx2-add .bi-check2 { display: none; }
.dx2-add.dx2-added { background: #2e7d32; }
.dx2-add.dx2-added .bi-plus-lg { display: none; }
.dx2-add.dx2-added .bi-check2 { display: inline; }

/* ═══════ Colonna canali (desktop): chatweb + QR WhatsApp ═══════ */
#channel-rail { display: none; }

@media (min-width: 1200px) {
    #assistant-container {
        grid-template-columns: 200px calc(78% - 210px) calc(22% - 10px);
        grid-column-gap: 10px;
    }

    #channel-rail {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

.rail-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    padding: 4px 2px 0;
}

.rail-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 14px;
    text-align: center;
}

.rail-head {
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 8px;
}

.rail-head i { color: var(--primary-color); }

.rail-ok {
    font-size: 0.82rem;
    color: #2e7d32;
    font-weight: 600;
}

.rail-qr {
    width: 100%;
    max-width: 150px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 5px;
    background: #fff;
}

.rail-hint {
    margin-top: 6px;
    font-size: 0.72rem;
    color: #999;
}

/* WhatsApp su mobile: bottone verde accanto a menu e carrello */
.rail-wa-mobile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background-color: #25D366 !important;
    border-color: #25D366 !important;
    color: #fff !important;
    text-decoration: none;
}

/* snippet widget nella card "Chat sul sito" */
.rail-snippet {
    display: block;
    background: #f6f5f1;
    border: 1px solid #e5e2da;
    border-radius: 8px;
    padding: 8px;
    font-size: 0.62rem;
    line-height: 1.35;
    color: #555;
    text-align: left;
    word-break: break-all;
    max-height: 96px;
    overflow: hidden;
}

.rail-copy {
    margin-top: 8px;
    width: 100%;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.rail-widget-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    animation: railBounce 1.6s ease-in-out infinite;
    line-height: 1;
    margin-top: 4px;
}

@keyframes railBounce {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5px, 5px); }
}

/* iframe del widget demo: bolla in basso a SINISTRA, si allarga quando la chat è aperta */
#demo-widget-frame {
    position: fixed;
    left: 14px;
    bottom: 14px;
    width: 96px;
    height: 96px;
    border: 0;
    z-index: 99990;
    background: transparent;
    transition: width 0.25s ease, height 0.25s ease;
}

#demo-widget-frame.open {
    width: min(420px, 96vw);
    height: min(640px, 88vh);
}
