/* =========================================================
   CUSTOM.CSS – DomusChef / GCI
   - Stili generali sito
   - Sidebar categorie
   - Home
   - Categoria prodotti
   - Footer
   ========================================================= */

/* ---------------- Design tokens ---------------- */
:root{
    --border:#e6e6e6;
    --radius:16px;
    --muted:#6b7280;

    --olive:#97b35a;
    --olive-dark:#88a44b;
    --olive-ghost:rgba(151,179,90,.14);

    --shadow:0 10px 24px rgba(0,0,0,.06);
}

/* scala tipografia gestita da JS */
html{
    --font-scale:1;
    font-size:calc(100% * var(--font-scale));
}

body{
    background:#fff;
    margin:0;
    padding:0;
}

/* =========================================================
   BOTTONI SUCCESS = OLIVE
   ========================================================= */

.btn-success{
    background-color:var(--olive) !important;
    border-color:var(--olive) !important;
    color:#fff !important;
}

.btn-success:hover{
    filter:brightness(.95);
}

/* =========================================================
   SIDEBAR CATEGORIE
   IMPORTANT: NO STICKY, NO SCROLL INTERNO
   ========================================================= */

main.container{
    overflow:visible;
}

.row{
    overflow:visible;
}

.category-pane{
    border:1px solid var(--border);
    border-radius:18px;
    background:#fff;
    padding:.55rem;
    box-shadow:var(--shadow);

    position:static !important;
    top:auto !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
}

.catmenu,
.catmenu ul{
    list-style:none;
    margin:0;
    padding:0;
}

.catmenu > li{
    border-bottom:1px solid #f0f0f0;
}

.catmenu > li:last-child{
    border-bottom:none;
}

.catmenu a{
    display:flex;
    align-items:center;
    gap:.75rem;
    padding:.8rem .85rem;
    border-radius:14px;
    text-decoration:none !important;
    color:#4b5563 !important;
    font-weight:800;
    letter-spacing:.2px;
    justify-content:flex-start !important;
    text-align:left !important;
}

.catmenu a:hover{
    background:#f8fafc;
}

.catmenu a.active{
    background:rgba(151,179,90,.18);
    color:#3f5a0b !important;
}

.catmenu .dot{
    width:.7rem;
    height:.7rem;
    border-radius:999px;
    border:3px solid var(--olive);
    background:transparent;
    flex:0 0 auto;
}

.catmenu a .label,
.catmenu a .txt,
.catmenu a span:not(.dot):not(.chev):not(.arrow){
    flex:1 1 auto;
    text-align:left !important;
}

.catmenu a .chev,
.catmenu a .arrow,
.catmenu a i,
.catmenu a svg{
    margin-left:auto !important;
    flex:0 0 auto;
}

.catmenu-sub{
    display:none;
    margin:.30rem 0 .55rem;
    padding:.20rem 0 .20rem 0;
    border-left:2px solid #edf2f7;
}

.catmenu-sub.open{
    display:block;
}

.catmenu-sub > li > .catmenu-link{
    position:relative;
    font-weight:700;
    color:#6b7280 !important;
    border-radius:12px;
    padding-top:.55rem;
    padding-right:.7rem;
    padding-bottom:.55rem;
}

.catmenu-sub.level-1 > li > .catmenu-link{
    padding-left:1.55rem;
}

.catmenu-sub.level-2 > li > .catmenu-link{
    padding-left:2.25rem;
}

.catmenu-sub.level-3 > li > .catmenu-link{
    padding-left:2.95rem;
}

.catmenu-sub > li > .catmenu-link::before{
    content:"";
    position:absolute;
    left:.65rem;
    top:50%;
    width:.45rem;
    height:.45rem;
    border-radius:999px;
    background:#cfd8e3;
    transform:translateY(-50%);
}

.catmenu-sub.level-2 > li > .catmenu-link::before{
    left:1.35rem;
}

.catmenu-sub.level-3 > li > .catmenu-link::before{
    left:2.05rem;
}

/* =========================================================
   HERO HOME SOTTO MENU
   ========================================================= */

.domuschef-hero-box{
    margin-top:20px;
    margin-bottom:20px;
}

.domuschef-hero{
    width:100%;
    margin:0;
    padding:0;
    overflow:hidden;
    border-radius:18px;
    box-shadow:0 10px 24px rgba(0,0,0,.06);
}

.domuschef-hero__media{
    position:relative;
    width:100%;
    height:640px;
    overflow:hidden;
    background:#f3f3f3;
}

.domuschef-hero__media img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center center;
}

.domuschef-hero__media::after{
    content:"";
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.18);
    z-index:1;
}

.domuschef-hero__overlay{
    position:absolute;
    inset:0;
    z-index:2;
    display:flex;
    align-items:center;
}

.domuschef-hero__content{
    max-width:980px;
    padding-left:70px;
    padding-right:40px;
}

.domuschef-hero__title{
    margin:0 0 28px 0;
    color:#ffffff;
    font-size:56px;
    line-height:1.05;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:-1px;
    text-shadow:0 4px 14px rgba(0,0,0,.25);
}

.domuschef-hero__btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:64px;
    padding:0 34px;
    background:#a6d63f;
    color:#ffffff !important;
    text-decoration:none !important;
    font-size:20px;
    font-weight:900;
    text-transform:uppercase;
    border-radius:2px;
    box-shadow:0 8px 20px rgba(0,0,0,.10);
    transition:transform .2s ease, filter .2s ease;
}

.domuschef-hero__btn:hover{
    transform:translateY(-1px);
    filter:brightness(.97);
}

@media (max-width: 1199.98px){
    .domuschef-hero__media{
        height:540px;
    }

    .domuschef-hero__title{
        font-size:46px;
    }
}

@media (max-width: 991.98px){
    .domuschef-hero__media{
        height:460px;
    }

    .domuschef-hero__content{
        padding-left:24px;
        padding-right:24px;
        max-width:760px;
    }

    .domuschef-hero__title{
        font-size:36px;
        line-height:1.08;
    }

    .domuschef-hero__btn{
        min-height:56px;
        padding:0 26px;
        font-size:17px;
    }
}

@media (max-width: 575.98px){
    .domuschef-hero__media{
        height:360px;
    }

    .domuschef-hero__content{
        padding-left:14px;
        padding-right:14px;
    }

    .domuschef-hero__title{
        font-size:25px;
        line-height:1.1;
        margin-bottom:18px;
    }

    .domuschef-hero__btn{
        min-height:48px;
        padding:0 18px;
        font-size:14px;
    }
}

/* =========================================================
   HOME: MENU VERTICALE A SINISTRA + CONTENUTO A DESTRA
   ========================================================= */

.home-page--hero-with-vertical-menu main .col-lg-3{
    flex:0 0 28%;
    max-width:28%;
}

.home-page--hero-with-vertical-menu main .col-lg-9{
    flex:0 0 72%;
    max-width:72%;
    display:block;
}

.home-page--hero-with-vertical-menu .category-pane{
    margin-top:24px;
}

.home-right-panel{
    background:#fff;
    border:1px solid #e6e6e6;
    border-radius:18px;
    box-shadow:0 10px 24px rgba(0,0,0,.06);
    padding:28px 30px;
    margin-top:24px;
}

.home-section-title{
    margin:0 0 28px 0;
    font-size:20px;
    font-weight:800;
    letter-spacing:.4px;
    text-transform:uppercase;
    color:#3b4f63;
}

/* =========================================================
   HOME - GRIGLIA CATEGORIE
   ========================================================= */

.home-categories-grid{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:20px;
    align-items:stretch;
    margin-bottom:52px;
}

.home-category-card{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    text-align:center;
    padding:14px;
    background:#fff;
    border:1px solid #e6e6e6;
    border-radius:14px;
    text-decoration:none !important;
    overflow:hidden;
    min-height:220px;
    color:#3b4f63 !important;
    transition:transform .2s ease;
}

.home-category-card:hover{
    transform:translateY(-2px);
}

.home-category-card__icon{
    width:58px;
    height:58px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.home-category-card__icon img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    display:block;
}

.home-category-card__icon i{
    font-size:48px;
    line-height:1;
    color:#a9c95b;
}

.home-category-card__image{
    width:100%;
    height:140px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    margin-bottom:12px;
    flex:0 0 140px;
    border-radius:12px;
    background:#fff;
}

.home-category-card__image img{
    display:block;
    max-width:100%;
    max-height:100%;
    width:auto;
    height:auto;
    object-fit:contain;
}

.home-category-card__label{
    display:block;
    font-size:13px;
    line-height:1.35;
    font-weight:700;
    color:#22324a;
    text-transform:uppercase;
}

/* =========================================================
   HOME - PERCHÉ SCEGLIERCI
   ========================================================= */

.home-why-grid{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:30px 24px;
}

.home-why-card{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    gap:14px;
    min-height:120px;
}

.home-why-card__icon{
    width:54px;
    height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.home-why-card__icon img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    display:block;
}

.home-why-card__icon i{
    font-size:44px;
    line-height:1;
    color:#a9c95b;
}

.home-why-card__label{
    font-size:13px;
    font-weight:700;
    line-height:1.25;
    text-transform:uppercase;
    color:#3b4f63;
}

/* =========================================================
   RESPONSIVE HOME
   ========================================================= */

@media (max-width: 1199.98px){
    .home-categories-grid{
        grid-template-columns:repeat(3, minmax(0, 1fr));
    }

    .home-why-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px){
    .home-page--hero-with-vertical-menu main .col-lg-3,
    .home-page--hero-with-vertical-menu main .col-lg-9{
        flex:0 0 100%;
        max-width:100%;
    }

    .home-right-panel{
        margin-top:18px;
        padding:22px 18px;
    }

    .home-categories-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:22px 16px;
    }
}

@media (max-width: 575.98px){
    .home-categories-grid,
    .home-why-grid{
        grid-template-columns:1fr;
    }

    .home-category-card{
        min-height:200px;
    }

    .home-category-card__image{
        height:120px;
        flex-basis:120px;
    }
}

/* =========================================================
   LAYOUT CATALOGO - sidebar come home/index
   Usato da:
   - categoria.php
   - dettaglio prodotto
   ========================================================= */

@media (min-width: 992px){
    body.page-catalog-layout .dc-category-layout-row{
        display:grid !important;
        grid-template-columns:28% minmax(0, 1fr);
        gap:24px;
        align-items:start;
    }

    body.page-catalog-layout .dc-category-sidebar-col,
    body.page-catalog-layout .dc-category-content-col{
        width:auto !important;
        max-width:none !important;
        flex:initial !important;
        padding-left:0 !important;
        padding-right:0 !important;
    }

    body.page-catalog-layout .category-pane{
        width:100% !important;
        padding:0 !important;
        border:0 !important;
        border-radius:0 !important;
        background:transparent !important;
        box-shadow:none !important;
    }
}

/* =========================================================
   PAGINA CATEGORIA - CARD PRODOTTI
   ========================================================= */

.page-categoria .card.position-relative{
    cursor:pointer;
}

.page-categoria .card-cover-link{
    position:absolute;
    inset:0;
    z-index:1;
    border-radius:inherit;
}

.page-categoria .card .btn,
.page-categoria .card a.btn,
.page-categoria .card .aggiungi-carrello,
.page-categoria .card .dropdown,
.page-categoria .card .form-check{
    position:relative;
    z-index:2;
}

.page-categoria .card.position-relative:hover{
    box-shadow:0 .5rem 1rem rgba(0,0,0,.08);
}

.page-categoria #product-grid .product-grid-card{
    overflow:hidden;
    border-radius:20px;
    transition:box-shadow .2s ease, transform .2s ease;
}

.page-categoria #product-grid .product-grid-card:hover{
    box-shadow:0 .5rem 1rem rgba(0,0,0,.08);
}

.page-categoria #product-grid .product-grid-card .badge-chip{
    top:14px;
    right:14px;
    z-index:3;
    pointer-events:none;
    padding:.55rem 1rem;
    border-radius:999px;
    font-weight:600;
    font-size:.95rem;
}

.page-categoria #product-grid .product-grid-card__header{
    background:#fff;
    border-bottom:1px solid #e9e9e9;
    padding:4.2rem 1.25rem 1rem 1.25rem;
    height:11rem;
    display:flex;
    align-items:flex-start;
}

.page-categoria #product-grid .product-grid-card__title{
    width:100%;
    font-size:.95rem;
    line-height:1.35;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:4;
    line-clamp:4;
    overflow:hidden;
    text-overflow:ellipsis;
    word-break:break-word;
    min-height:calc(1.35em * 4);
    max-height:calc(1.35em * 4);
    text-align:justify;
    text-align-last:left;
    text-justify:inter-word;
    hyphens:auto;
}

.page-categoria #product-grid .product-grid-card__img{
    height:200px;
    width:100%;
    object-fit:contain;
    display:block;
    background:#fff;
}

.page-categoria #product-grid .product-grid-card__body{
    display:flex;
    flex-direction:column;
    flex:1 1 auto;
}

.page-categoria #product-grid .product-grid-card__price{
    font-size:1.1rem;
}

.page-categoria #product-grid .product-grid-card__actions{
    margin-top:auto;
}

@media (max-width: 991.98px){
    .page-categoria #product-grid .product-grid-card__header{
        height:10.6rem;
        padding:4rem 1rem .9rem 1rem;
    }

    .page-categoria #product-grid .product-grid-card__title{
        font-size:.93rem;
    }

    .page-categoria #product-grid .product-grid-card__img{
        height:180px;
    }
}

@media (max-width: 575.98px){
    .page-categoria #product-grid .product-grid-card__header{
        height:auto;
        min-height:10.4rem;
    }
}

/* =========================================================
   PAGINA CATEGORIA - FILTRI
   ========================================================= */

.page-categoria .filtro-wrap{
    position:relative;
}

.page-categoria .filtro-trigger{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border:2px solid #7ba61b;
    border-radius:8px;
    padding:.45rem .75rem;
    font-size:.95rem;
    background:#fff;
    color:#333;
    cursor:pointer;
    transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.page-categoria .filtro-trigger:hover{
    border-color:#5fa80f;
    background-color:#f8ffe9;
}

.page-categoria .filtro-trigger:focus{
    border-color:#5fa80f;
    box-shadow:0 0 0 .15rem rgba(95,168,15,.25);
    outline:0;
}

.page-categoria .filtro-trigger-text{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    padding-right:8px;
}

.page-categoria .filtro-panel{
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    right:0;
    z-index:9999;
    background:#fff;
    border:1px solid #e6e6e6;
    border-radius:10px;
    box-shadow:0 .5rem 1rem rgba(0,0,0,.08);
    padding:10px;
    display:none;
}

.page-categoria .filtro-panel.is-open{
    display:block;
}

.page-categoria .filtro-options{
    max-height:240px;
    overflow:auto;
    padding-right:4px;
    margin-bottom:10px;
}

.page-categoria .filtro-option{
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 4px;
    cursor:pointer;
}

.page-categoria .filtro-option input{
    flex:0 0 auto;
    width:18px;
    height:18px;
}

.page-categoria .filtro-option-name{
    flex:1 1 auto;
}

.page-categoria .filtro-option-cnt{
    flex:0 0 auto;
    font-size:.8rem;
    font-weight:700;
    color:#fff;
    background:#7ba61b;
    border-radius:999px;
    padding:2px 8px;
}

.page-categoria .filters-panel,
.page-categoria .filters-panel .row,
.page-categoria .filters-panel .col{
    overflow:visible !important;
}

/* =========================================================
   SWITCHER LINGUA VECCHIO / FALLBACK
   Non tocca il nuovo header .domuschef-lang-switcher
   ========================================================= */

.header-lang-switcher{
    display:flex;
    align-items:center;
    gap:10px;
    margin-right:18px;
}

.header-lang-switcher__link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    font-size:22px;
    line-height:1;
    padding:4px;
    border-radius:999px;
    opacity:.75;
    transition:all .2s ease;
}

.header-lang-switcher__link:hover{
    opacity:1;
    transform:translateY(-1px);
}

.header-lang-switcher__link.is-active{
    opacity:1;
    box-shadow:0 0 0 2px #92ad4b inset;
}

.header-lang-switcher__flag{
    display:block;
}

/* =========================================================
   FOOTER DOMUSCHEF
   ========================================================= */

.domuschef-footer{
    background:linear-gradient(90deg, #7cab28 0%, #86b52f 45%, #8abc34 100%);
    padding:56px 0 52px;
    margin-top:40px;
}

.domuschef-footer__inner{
    display:grid;
    grid-template-columns:1fr 1.35fr 1fr;
    gap:56px;
    align-items:start;
}

.domuschef-footer__title{
    margin:0 0 18px 0;
    color:#ffffff;
    font-size:19px;
    line-height:1.1;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.4px;
}

.domuschef-footer__links{
    list-style:none;
    margin:0;
    padding:0;
    display:grid;
    gap:8px;
}

.domuschef-footer__links a{
    color:rgba(255,255,255,.95);
    text-decoration:none !important;
    font-size:15px;
    line-height:1.35;
    font-weight:600;
}

.domuschef-footer__links a:hover{
    color:#ffffff;
    opacity:.95;
}

.domuschef-footer__newsletter{
    display:flex;
    align-items:center;
    gap:16px;
    flex-wrap:nowrap;
}

.domuschef-footer__input{
    flex:1 1 auto;
    min-width:0;
    height:56px;
    border:0;
    outline:0;
    border-radius:2px;
    background:#ffffff;
    color:#4b5563;
    font-size:17px;
    padding:0 18px;
    box-shadow:none;
}

.domuschef-footer__input::placeholder{
    color:#9ca3af;
}

.domuschef-footer__button{
    flex:0 0 auto;
    height:56px;
    padding:0 26px;
    border:0;
    border-radius:2px;
    background:rgba(255,255,255,.18);
    color:#ffffff;
    font-size:16px;
    font-weight:800;
    letter-spacing:.3px;
    text-transform:uppercase;
    cursor:pointer;
    transition:background .2s ease, transform .2s ease;
}

.domuschef-footer__button:hover{
    background:rgba(255,255,255,.24);
    transform:translateY(-1px);
}

.domuschef-footer__contact-line{
    margin-bottom:8px;
}

.domuschef-footer__contact-line a{
    color:rgba(255,255,255,.96);
    text-decoration:none !important;
    font-size:15px;
    line-height:1.4;
    font-weight:700;
}

.domuschef-footer__contact-line a:hover{
    color:#ffffff;
}

.domuschef-footer__socials{
    display:flex;
    align-items:center;
    gap:14px;
    margin-top:18px;
}

.domuschef-footer__social{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#ffffff !important;
    text-decoration:none !important;
    font-size:26px;
    line-height:1;
    transition:transform .2s ease, opacity .2s ease;
}

.domuschef-footer__social:hover{
    transform:translateY(-1px);
    opacity:.92;
}

@media (max-width: 1199.98px){
    .domuschef-footer__inner{
        grid-template-columns:1fr 1fr;
        gap:34px 28px;
    }

    .domuschef-footer__col--newsletter{
        grid-column:1 / -1;
    }
}

@media (max-width: 767.98px){
    .domuschef-footer{
        padding:42px 0 40px;
    }

    .domuschef-footer__inner{
        grid-template-columns:1fr;
        gap:28px;
    }

    .domuschef-footer__newsletter{
        flex-direction:column;
        align-items:stretch;
    }

    .domuschef-footer__input,
    .domuschef-footer__button{
        width:100%;
    }

    .domuschef-footer__title{
        font-size:17px;
    }
}
/* =========================================================
   HOME BANNER - testo sopra immagine caricata da backend
   ========================================================= */

.dc-home-banner {
    position: relative;
    width: 100%;
    min-height: 620px;
    border-radius: 28px;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dc-home-banner__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.dc-home-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.45);
}

.dc-home-banner__content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 60px 30px;
    text-align: center;
    color: #fff;
}

.dc-home-banner-text h1 {
    margin: 0 auto 34px;
    max-width: 1250px;
    color: #ffffff;
    font-size: clamp(34px, 4.6vw, 78px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.dc-home-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0 44px;
    border-radius: 999px;
    background: #59ae00;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 19px;
    font-weight: 950;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 16px 34px rgba(89, 174, 0, 0.35);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.dc-home-banner-btn:hover {
    background: #438d00;
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(89, 174, 0, 0.42);
}

@media (max-width: 991.98px) {
    .dc-home-banner {
        min-height: 520px;
        border-radius: 22px;
    }

    .dc-home-banner-text h1 {
        font-size: clamp(30px, 7vw, 52px);
    }
}

@media (max-width: 575.98px) {
    .dc-home-banner {
        min-height: 440px;
        border-radius: 18px;
    }

    .dc-home-banner__content {
        padding: 42px 18px;
    }

    .dc-home-banner-text h1 {
        font-size: 28px;
        line-height: 1.15;
    }

    .dc-home-banner-btn {
        min-height: 50px;
        padding: 0 28px;
        font-size: 15px;
    }
}
