/* APIMIEL v1.3.1 - responsive runtime rules independent from PHP/User-Agent cache */
.apimiel-home-slider-mobile { display: none; }
.apimiel-home-slider-desktop { display: block; }
.apimiel-gallery-slide-product {
    position: relative;
    width: 100%;
    height: 42vw;
    overflow: hidden;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* Smartphone portrait: same visual rules as the original production theme. */
@media screen and (max-width: 767px) {
    .apimiel-home-slider-desktop { display: none !important; }
    .apimiel-home-slider-mobile { display: block !important; }
    .apimiel-gallery-slide-product { height: 80vw; }
}

/* Physical phone in landscape: keep the mobile source underneath the mandatory overlay. */
@media screen and (orientation: landscape) and (max-height: 767px) and (pointer: coarse) {
    .apimiel-home-slider-desktop { display: none !important; }
    .apimiel-home-slider-mobile { display: block !important; }
    #portrait_view_mob_device { display: block !important; }
}

/* Footer/feed layout formerly selected server-side. */
#facebook_feed {
    padding: 4% !important;
    background-color: rgba(255,255,255,.68) !important;
}
#facebook_feed h2 { text-align:center; color:#c20c2e !important; }
.cff-wrapper-ctn { height:auto !important; }
.cff-post-text { width:100%; float:left; font-size:.8em; }
#cff.cff-light .cff-album-item,
#cff.cff-light .cff-item,
#cff.cff-light .cff-item.cff-box,
#cff.cff-light .cff-item.cff-box:first-child {
    background-color:rgba(255,255,255,.6);
    color:rgba(0,0,0,.8);
    border-radius:20px;
}
#cff.cff-masonry.masonry-5-desktop .cff-item { width:18.5% !important; margin:0 .2% !important; }

@media screen and (min-width:768px) and (max-width:1366px) and (pointer:coarse) {
    #cff.cff-masonry.masonry-5-desktop .cff-item { width:44% !important; margin:2% !important; }
}
@media screen and (min-width:768px) and (max-width:1366px) and (pointer:coarse) and (orientation:landscape) {
    #cff.cff-masonry.masonry-5-desktop .cff-item { width:30% !important; margin:.2% !important; }
}
@media screen and (max-width:767px), screen and (orientation:landscape) and (max-height:767px) and (pointer:coarse) {
    #fascia_descrizione { opacity:1 !important; }
    #cff.cff-masonry.masonry-5-desktop .cff-item { width:96% !important; margin:2% !important; }
}
@media screen and (orientation:landscape) and (max-height:767px) and (pointer:coarse) {
    #cff.cff-masonry.masonry-5-desktop .cff-item { width:44% !important; margin:1% !important; }
}
