/* Casa Floresta mobile: refinement scoped to <= 600px. Desktop unchanged. */
@media (max-width: 600px) {
  /* Keep the contact bar accessible but compact instead of consuming 76px. */
  .mpcf-home .mpcf-utility { min-height: 0 !important; }
  .mpcf-home .mpcf-utility-inner {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 32px !important;
    height: auto !important;
    padding: 5px 12px !important;
    gap: 0 !important;
  }
  .mpcf-home .mpcf-utility-contacts {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.25 !important;
  }
  .mpcf-home .mpcf-utility-location,
  .mpcf-home .mpcf-utility-email,
  .mpcf-home .mpcf-utility-links { display: none !important; }
  .mpcf-home .cf-utility-phone { display: inline-flex !important; align-items: center !important; gap: 6px !important; font-size: 11px !important; line-height: 1.35 !important; white-space: nowrap !important; margin: 0 !important; }
  .mpcf-home .cf-utility-phone svg { width: 13px !important; height: 13px !important; }
  /* The header must retain room for the logo, search, account, basket and menu. */
  .mpcf-home .mpcf-header-inner { min-height: 60px; }
  .mpcf-home .mpcf-header-tools { gap: 8px; }
  /* Prevent long textual buttons from shrinking to illegible columns. */
  .mpcf-home .mpcf-hero-actions { flex-wrap: wrap; gap: 10px; }
  .mpcf-home .mpcf-hero-actions > a { min-width: 0; }
  /* Do not constrain catalogue controls with desktop widths. */
  .mpcfp-products-page .mpcfp-catalogue-banner { max-width: 100%; }
  .mpcfp-products-page input,
  .mpcfp-products-page select,
  .mpcfp-commercial-shell input,
  .mpcfp-commercial-shell textarea,
  .mpcfp-commercial-shell select { max-width: 100%; }
}
@media (max-width: 360px) {
  .mpcf-home .mpcf-header-tools { gap: 4px; }
  .mpcf-home .mpcf-hero-actions > a { font-size: 12px; }
}

/* v1.1: measured follow-up for small phone viewports. */
@media (max-width: 600px) {
  .mpcf-home .mpcf-hero {
    height: min(620px, calc(100svh - 96px)) !important;
    min-height: 560px !important;
  }
  .mpcf-home .mpcf-hero-media,
  .mpcf-home .mpcf-hero-slide { height: 100% !important; }
  .mpcf-home .mpcf-hero-actions > a {
    max-width: calc(50% - 5px);
    line-height: 1.45;
    text-align: center;
  }
}
@media (max-width: 360px) {
  .mpcf-home .mpcf-hero-actions > a { padding-inline: 10px; }
}

/* v1.2: keep support CTA clear of fields and catalogue cards on small phones. */
@media (max-width: 600px) {
 body a.mpcf-floating-whatsapp { bottom: calc(17px + env(safe-area-inset-bottom,0px)) !important; right: 13px !important; width: 47px !important; height: 47px !important; min-width: 47px !important; min-height: 47px !important; }
 body a.mpcf-floating-whatsapp svg { width: 24px !important; height: 24px !important; }
 .mpcfp-products-page .mpcfp-product-card { min-width: 0; }
 .mpcfp-products-page .mpcfp-product-card img { max-width: 100%; }
 .mpcfp-commercial-shell .mpcfp-pdf-card-copy { min-width: 0; overflow-wrap: anywhere; }
 .mpcfp-commercial-shell .mpcfp-pdf-cover-text { overflow-wrap: anywhere; }
 .mpcfp-commercial-shell input:not([type=checkbox]), .mpcfp-commercial-shell textarea, .mpcfp-commercial-shell select { font-size: 16px; }
}

/* v1.3: wider product cards at narrow mobile widths, keep desktop untouched. */
@media(max-width:600px){
 .mpcfp-products-page .mpcfp-catalogue-layout{
   margin-left:0!important;
   margin-right:0!important;
   max-width:none!important;
   width:100%!important;
 }
 .mpcfp-products-page .mpcfp-product-content{
   padding:12px 10px!important;
 }
}

/* Casa Floresta v1.6: approved Home and shop mobile-only corrections */
@media(max-width:767px){
.mpcf-home:not(.mpcfp-market) .mpcf-hero-content{position:absolute!important;inset:0!important;width:auto!important;height:100%!important;min-height:0!important;margin:0!important;padding:38px 18px 64px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important}
.mpcf-home:not(.mpcfp-market) .mpcf-hero-content h1{font-size:clamp(28px,8vw,34px)!important;line-height:1.12!important;max-width:350px!important;text-align:center!important;margin-left:auto!important;margin-right:auto!important}
.mpcf-home:not(.mpcfp-market) .mpcf-hero-content p{font-size:14px!important;line-height:1.5!important;max-width:340px!important;text-align:center!important;margin-left:auto!important;margin-right:auto!important}
.mpcf-home:not(.mpcfp-market) .mpcf-hero-actions{width:100%!important;max-width:340px!important;display:flex!important;justify-content:center!important;gap:9px!important;margin:20px auto 0!important;align-items:center!important}
.mpcf-home:not(.mpcfp-market) .mpcf-hero-actions>a{min-width:0!important;max-width:158px!important;min-height:42px!important;padding:10px 11px!important;font-size:12px!important;line-height:1.3!important;flex:0 1 148px!important}
.mpcf-home:not(.mpcfp-market) .mpcf-story-media{height:auto!important;min-height:0!important}
.mpcf-home:not(.mpcfp-market) .mpcf-story-media img{width:100%!important;height:auto!important;display:block!important;object-fit:contain!important;object-position:center!important}
.mpcfp-market .mpcfp-products-page{margin-left:auto!important;margin-right:auto!important}
.mpcf-home .mpcf-mobile-menu[open]>nav{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;overflow-y:auto!important;box-sizing:border-box!important;display:flex!important;flex-direction:column!important;gap:0!important;padding:82px 26px max(32px,env(safe-area-inset-bottom))!important;background:#103e29!important;z-index:99998!important;box-shadow:none!important;border:0!important;transform:none!important}
.mpcf-home .mpcf-mobile-menu[open]>summary{position:fixed!important;top:13px!important;right:15px!important;z-index:99999!important;color:#fff!important;background:transparent!important}
.mpcf-home .mpcf-mobile-menu[open]>summary svg{display:none!important}
.mpcf-home .mpcf-mobile-menu[open]>summary:before{content:"×";display:block;color:white;font-size:32px;line-height:28px;font-weight:300}
.mpcf-home .mpcf-mobile-menu[open]>nav>a,.mpcf-home .mpcf-mobile-menu[open]>nav>details{width:100%!important;flex:none!important}
.mpcf-home .mpcf-mobile-menu[open]>nav a,.mpcf-home .mpcf-mobile-menu[open]>nav summary{display:block!important;color:#fff!important;text-align:left!important;font-size:16px!important;line-height:1.45!important;padding:13px 2px!important;border-bottom:1px solid rgba(255,255,255,.15)!important;text-decoration:none!important}
.mpcf-home .mpcf-mobile-menu[open]>nav details a{padding-left:18px!important;font-size:14px!important}
body:has(.mpcf-mobile-menu[open]){overflow:hidden!important}
}

/* v1.6.1 footer mobile */
@media(max-width:767px){
.mpcf-site-footer .mpcf-footer-columns{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;column-gap:20px!important;row-gap:0!important;align-items:start!important}
.mpcf-site-footer .mpcf-footer-columns>.mpcf-footer-brand{grid-column:1/-1!important;grid-row:1!important;margin-bottom:28px!important}
.mpcf-site-footer .mpcf-footer-columns>div:nth-child(2){grid-column:1!important;grid-row:2/span 2!important;min-width:0!important}
.mpcf-site-footer .mpcf-footer-columns>div:nth-child(4){grid-column:2!important;grid-row:2!important;min-width:0!important;margin-bottom:28px!important}
.mpcf-site-footer .mpcf-footer-columns>div:nth-child(3){grid-column:2!important;grid-row:3!important;min-width:0!important}
.mpcf-site-footer .mpcf-footer-columns .cf-footer-contact{overflow-wrap:anywhere!important;word-break:normal!important}
.mpcf-site-footer .mpcf-footer-bottom{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:7px!important}
.mpcf-site-footer .mpcf-footer-bottom span{display:block!important;text-align:center!important;width:100%!important}
}@media(max-width:767px){.mpcf-site-footer .mpcf-footer-bottom{padding-bottom:76px!important}}


/* v1.6.2: mobile search dropdown fits viewport and preserves desktop */
@media(max-width:767px){
.mpcf-home .mpcf-site-search[open]>form{position:fixed!important;top:calc(96px + env(safe-area-inset-top,0px))!important;left:12px!important;right:12px!important;width:auto!important;max-width:none!important;min-width:0!important;box-sizing:border-box!important;transform:none!important;margin:0!important;padding:14px!important;z-index:9998!important}
.mpcf-home .mpcf-site-search form .mpcf-search-fields{display:flex!important;flex-wrap:nowrap!important;width:100%!important;min-width:0!important;gap:8px!important;box-sizing:border-box!important}
.mpcf-home .mpcf-site-search form input[type=search]{flex:1 1 auto!important;width:0!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;font-size:16px!important}
.mpcf-home .mpcf-site-search form button[type=submit]{flex:0 0 auto!important;max-width:40%!important;min-width:0!important;padding-inline:12px!important;font-size:12px!important;white-space:nowrap!important}
}
@media(max-width:360px){.mpcf-home .mpcf-site-search[open]>form{left:10px!important;right:10px!important;padding:12px!important}.mpcf-home .mpcf-site-search form button[type=submit]{padding-inline:9px!important}}
