/* Home - Amafarmacia two-branch six-button cards, 21 October 2026.
   Full original approved 4:3 façades, logo/address/photo/actions in this order.
   Scoped to the existing Home boxes; the rest of the approved visual system stays intact. */
body.ama-site .ama-branches-unified .ama-branch-six{
 display:grid!important;
 grid-template-columns:minmax(0,1fr)!important;
 grid-template-areas:"logo" "address" "photo" "actions"!important;
 grid-template-rows:auto auto auto auto!important;
 height:auto!important;min-height:0!important;
 gap:clamp(10px,1vw,16px)!important;
 padding:clamp(12px,1.15vw,20px)!important;
 align-items:stretch!important;align-content:start!important;
}
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__logo{
 grid-area:logo!important;
 width:100%!important;min-width:0!important;
 height:clamp(108px,9vw,152px)!important;
 padding:clamp(12px,1.5vw,23px)!important;
 place-items:center!important;
 border-radius:16px!important;
}
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__logo img{
 display:block!important;width:100%!important;height:100%!important;
 max-width:100%!important;max-height:100%!important;
 object-fit:contain!important;object-position:center!important;
}
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__address{
 grid-area:address!important;min-width:0!important;
 margin:0!important;padding:3px 0 2px!important;
 text-align:center!important;color:#243a2c!important;
 font-weight:750!important;font-size:clamp(1.05rem,1.2vw,1.3rem)!important;
 line-height:1.4!important;letter-spacing:-.01em!important;
}
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__photo{
 grid-area:photo!important;display:block!important;width:100%!important;height:auto!important;
 min-width:0!important;min-height:0!important;max-height:none!important;
 overflow:visible!important;aspect-ratio:auto!important;
 margin:0!important;padding:0!important;
 background:transparent!important;border-radius:14px!important;
}
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__photo img{
 display:block!important;width:100%!important;height:auto!important;
 min-width:0!important;min-height:0!important;max-height:none!important;
 aspect-ratio:auto!important;object-fit:contain!important;object-position:center!important;
 border-radius:14px!important;margin:0!important;padding:0!important;
 transform:none!important;filter:none!important;
}
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__actions{
 grid-area:actions!important;
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
 grid-template-rows:repeat(2,minmax(70px,auto))!important;
 width:100%!important;min-width:0!important;
 gap:clamp(7px,.85vw,13px)!important;
 align-items:stretch!important;justify-items:stretch!important;
}
body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__actions>.ama-button{
 grid-area:auto!important;
 width:100%!important;height:100%!important;min-width:0!important;max-width:none!important;
 min-height:70px!important;margin:0!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 padding:10px clamp(5px,.55vw,11px)!important;
 gap:clamp(5px,.48vw,9px)!important;
 font-size:clamp(.76rem,.84vw,1rem)!important;
 line-height:1.23!important;text-align:center!important;
 overflow-wrap:anywhere!important;white-space:normal!important;
}
body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__actions>.ama-button svg{
 width:20px!important;height:20px!important;flex:none!important;
}
body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__actions>.ama-button span{
 min-width:0!important;white-space:normal!important;
}
body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__phone{
 grid-area:auto!important;padding:4px 6px!important;
}
body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__phone>a{
 display:flex!important;justify-content:center!important;align-items:center!important;
 gap:5px!important;text-align:center!important;min-width:0!important;
}
body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__phone>a>span{
 white-space:normal!important;overflow-wrap:normal!important;
}
body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__phone>button{
 width:36px!important;min-width:36px!important;height:40px!important;
}
@media(max-width:1450px){
 body.ama-site .ama-branches-unified .ama-branch-six{
  grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto auto!important;
 }
 body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__actions>.ama-button{
  font-size:clamp(.89rem,1.6vw,1.06rem)!important;
 }
}
@media(max-width:760px){
 body.ama-site .ama-branches-unified .ama-branch-six{
  grid-template-areas:"logo" "address" "photo" "actions"!important;
  grid-template-rows:auto auto auto auto!important;height:auto!important;
  padding:12px!important;gap:10px!important;
 }
 body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__logo{height:108px!important}
 body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__photo{
  aspect-ratio:auto!important;height:auto!important;width:100%!important;
 }
 body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__photo img{
  width:100%!important;height:auto!important;max-height:none!important;aspect-ratio:auto!important;
 }
 body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__actions{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:repeat(3,minmax(68px,auto))!important;
  gap:8px!important;
 }
 body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__actions>.ama-button{
  min-height:68px!important;font-size:clamp(.78rem,2.6vw,.98rem)!important;
  padding:7px 6px!important;gap:5px!important;
 }
}
@media(max-width:380px){
 body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__actions>.ama-button svg{
  width:17px!important;height:17px!important;
 }
 body.ama-site .ama-branches-unified .ama-branch-six .ama-branch-approved__phone>button{
  width:30px!important;min-width:30px!important;
 }
}

/* L.439 — remove Chromium's 3000x1500 lazy-image intrinsic placeholder
   from the two approved full 4:3 storefront photographs. */
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__photo,
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__photo img{
 content-visibility:visible!important;
 contain-intrinsic-size:none!important;
}
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__photo img{
 display:block!important;width:100%!important;
 aspect-ratio:4/3!important;height:auto!important;
 min-height:0!important;max-height:none!important;
 object-fit:contain!important;object-position:center!important;
}

/* L.440 — stop the inherited tall img/grid sizing from clipping the real logos.
   The approved logo raster is entirely visible at every breakpoint. */
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__logo{
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 height:clamp(106px,8vw,136px)!important;
 min-height:0!important;
 padding:10px 14px!important;
 overflow:hidden!important;
}
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__logo img.ama-branches-unified__brand{
 display:block!important;
 width:100%!important;
 height:clamp(62px,6vw,104px)!important;
 min-height:0!important;
 max-width:100%!important;
 max-height:104px!important;
 aspect-ratio:auto!important;
 object-fit:contain!important;
 object-position:center!important;
 margin:0!important;
 transform:none!important;
}
@media(max-width:760px){
 body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__logo{
  height:106px!important;padding:10px 12px!important;
 }
 body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__logo img.ama-branches-unified__brand{
  height:80px!important;max-height:80px!important;
 }
}


/* L.445 — match the logo cards' backing green with the approved branch
   logo raster background. Sampled from the actual on-site logo artwork,
   rather than keeping the darker #355947 surround. */
body.ama-site .ama-branches-unified .ama-branch-six>.ama-branch-approved__logo{
 background:#556a58!important;
 background-color:#556a58!important;
}


/* L.447 — F07: mobile booking/contact/footer touch target isolation.
   Tested on Chromium 320/390/430 before writing to WordPress.
   This is a scoped partial access improvement, not full WCAG certification. */
@media(max-width:760px){
 body.ama-site .ama-footer .ama-footer-grid>div:not(:first-child)>p{
  display:flow-root!important;
  line-height:1.75!important;
  padding-block:3px!important;
  margin-bottom:12px!important;
  overflow:visible!important;
 }
 body.ama-site .ama-footer .ama-footer-grid>div:not(:first-child)>p a,
 body.ama-site .ama-footer .ama-footer-grid>div:not(:first-child)>a,
 body.ama-site #recensioni a.ama-google-link,
 body.ama-site .ama-reviews-box a.ama-google-link{
  min-height:48px!important;
  padding:11px 8px!important;
  display:inline-flex!important;
  align-items:center!important;
  position:relative!important;
  z-index:2!important;
  line-height:1.45!important;
 }
 body.ama-site .ama-footer .ama-footer-grid .ama-copy-inline{
  margin:6px 6px 6px 10px!important;
  position:relative!important;
  z-index:3!important;
  flex:none!important;
  vertical-align:middle!important;
 }
 body.ama-site .ama-mobile-booking a{
  padding:14px 16px!important;
 }
 body.ama-site .ama-contact-strip>a{overflow:visible!important;}
}

/* L.451 — F07 final mobile target-size. Browser-tested at 320, 375, 390, 430, 760 CSSpx.
   Keep both VQui actions, original brand colors; add contact separation and footer legal touch areas. */
@media(max-width:760px){
body.ama-site .ama-contact-strip{row-gap:24px!important}
body.ama-site .ama-contact-strip>a{padding:26px!important;min-height:132px!important;position:relative!important;isolation:isolate!important}
body.ama-site .ama-mobile-booking{position:sticky!important;bottom:0!important;z-index:90!important;isolation:isolate!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;padding:12px!important;background:#263029!important}
body.ama-site .ama-mobile-booking>a{min-height:56px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:10px!important}

body.ama-site .ama-footer-legal{display:flex!important;flex-direction:column!important;gap:24px!important}
body.ama-site .ama-footer-legal>p:first-child{position:relative!important;z-index:3!important;isolation:isolate!important;padding:15px 8px!important;background:rgba(255,255,255,.06)!important;border-radius:12px!important}
body.ama-site .ama-footer-legal>p:first-child>a{display:flex!important;width:100%!important;min-height:56px!important;align-items:center!important;}
}
