
/* =========================================================
   ROSITAFOOD V101 — ALL DEVICE RESPONSIVE CERTIFICATION
   Additive layout/safety layer only. No approved visual redesign.
   ========================================================= */

:root{
  --v101-safe-bottom: env(safe-area-inset-bottom,0px);
  --v101-safe-left: env(safe-area-inset-left,0px);
  --v101-safe-right: env(safe-area-inset-right,0px);
  --v101-touch:44px;
}

/* Global anti-overflow / media safety */
html,body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
*,*::before,*::after{box-sizing:border-box}
img,video,canvas,svg,iframe{
  max-width:100%;
}
img,video{height:auto}
main,section,article,aside,header,footer,nav,div{
  min-width:0;
}
p,h1,h2,h3,h4,h5,h6,a,button,label,span{
  overflow-wrap:break-word;
}
table{
  max-width:100%;
}
input,select,textarea,button{
  max-width:100%;
}
a,button,[role="button"],input,select,textarea{
  touch-action:manipulation;
}

/* Touch target certification */
@media(pointer:coarse){
  a.rv34-link,
  .rv34-menu-trigger,
  .rv34-cart,
  .rv34-mobile,
  .rv34-order,
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .tq-btn,.tor-btn,.car-btn,.pan-btn,.gro-btn,
  .menu-primary-btn,.menu-ghost-btn,.menu-order-button{
    min-height:var(--v101-touch);
  }
}

/* Wide desktop — keep content readable, not endlessly stretched */
@media(min-width:1440px){
  .rv34-shell,
  .hero-inner,
  .section-inner,
  .footer-inner,
  .menu-container,
  .product-container,
  .taqueria-container,
  .tor-container,
  .car-container,
  .pan-container,
  .gro-container,
  .ct-container{
    max-width:1440px;
    margin-left:auto;
    margin-right:auto;
  }
}

/* Tablet / iPad landscape */
@media(max-width:1180px){
  .rv34-shell{max-width:100%!important}
  .footer-inner{padding-left:22px!important;padding-right:22px!important}
}

/* Tablet / iPad portrait */
@media(max-width:900px){
  body{
    padding-bottom:calc(76px + var(--v101-safe-bottom));
  }

  /* Header must remain usable without horizontal clipping */
  .rv34-header,
  .rv34-shell{
    width:100%!important;
    max-width:100%!important;
  }
  .rv34-nav{
    max-height:calc(100svh - 110px);
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  .rv34-menu-panel{
    max-width:100%!important;
  }

  /* Flexible grid fallback for any unhandled legacy card rows */
  [class*="grid"],
  [class*="-grid"]{
    min-width:0;
  }

  /* Forms */
  form{
    max-width:100%;
  }
  input,textarea,select{
    width:100%;
  }

  /* Approved Taquería full-image/live hero */
  .taqueria-live-hero,
  .taqueria-full-image-hero{
    width:100%!important;
    max-width:100%!important;
  }
  .taqueria-live-hero-media{
    border-radius:0 0 20px 20px!important;
  }
  .taqueria-live-hero-img{
    width:100%!important;
    height:auto!important;
    object-fit:contain!important;
    transform:none!important;
  }
}

/* Smartphones */
@media(max-width:680px){
  :root{
    --v101-touch:46px;
  }

  body{
    padding-bottom:calc(78px + var(--v101-safe-bottom))!important;
  }

  /* Mobile header: preserve menu + cart, remove collisions */
  .rv34-header,.rv34-shell{height:92px!important}
  .rv34-brand{
    left:max(8px,var(--v101-safe-left))!important;
    max-width:112px!important;
  }
  .rv34-commerce{
    right:max(10px,var(--v101-safe-right))!important;
  }
  .rv34-mobile{
    right:64px!important;
  }
  .rv34-nav{
    left:max(10px,var(--v101-safe-left))!important;
    right:max(10px,var(--v101-safe-right))!important;
    width:auto!important;
  }

  /* Prevent mobile Safari input zoom */
  input,textarea,select{
    font-size:16px!important;
  }

  /* One-column safety for content not already handled by V78 */
  .story,
  .visit,
  .promo,
  .product-layout,
  .catalog-layout,
  .order-layout,
  .about-layout,
  .contact-layout,
  .location-layout{
    grid-template-columns:1fr!important;
  }

  /* Buttons for thumb use */
  .tq-btn,.tor-btn,.car-btn,.pan-btn,.gro-btn,
  .menu-primary-btn,.menu-ghost-btn,.menu-order-button,
  .ct-btn,
  .cta-button{
    width:100%;
    justify-content:center;
  }

  /* Images/cards should never create sideways scrolling */
  figure,
  .card,
  [class*="-card"],
  [class*="-panel"],
  [class*="-shell"],
  [class*="-stage"]{
    max-width:100%;
  }

  /* Tables / ledgers / long rows if introduced in ordering */
  .table-wrap,
  [class*="table-wrap"]{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  /* Hero exact image: never crop important embedded copy on phone.
     Full image scales proportionally. */
  .taqueria-live-hero,
  .taqueria-full-image-hero{
    margin-left:0!important;
    margin-right:0!important;
  }
  .taqueria-live-hero-media,
  .taqueria-full-image-hero{
    border-radius:0 0 18px 18px!important;
  }
  .taqueria-live-hero-img,
  .taqueria-full-image-hero-img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-width:100%!important;
    object-fit:contain!important;
    object-position:center!important;
  }

  /* Sticky mobile ordering dock — keep above iPhone home indicator */
  .v78-mobile-orderbar{
    left:max(8px,var(--v101-safe-left))!important;
    right:max(8px,var(--v101-safe-right))!important;
    bottom:calc(8px + var(--v101-safe-bottom))!important;
    min-height:58px!important;
  }
  .v78-mobile-orderbar a{
    min-height:46px!important;
  }

  /* Contact floating tools must stay above order dock */
  body.contact-page .ct-v77-contact-dock{
    bottom:calc(84px + var(--v101-safe-bottom))!important;
  }
  body.contact-page .ct-v77-chat{
    bottom:calc(210px + var(--v101-safe-bottom))!important;
  }

  /* Footer clear of sticky order bar */
  footer{
    padding-bottom:calc(82px + var(--v101-safe-bottom))!important;
  }
}

/* Narrow phones (iPhone SE-class / 320–390px) */
@media(max-width:390px){
  .rv34-brand{
    width:100px!important;
  }
  .rv34-brand img{
    width:92px!important;
  }
  .rv34-mobile{
    right:60px!important;
  }
  .rv34-cart{
    width:44px!important;
    height:44px!important;
  }
  .promo-marquee{
    overflow:hidden!important;
  }
  .v78-mobile-orderbar{
    grid-template-columns:minmax(0,1fr) 50px!important;
  }
  .v78-mobile-orderbar a{
    font-size:10.5px!important;
  }
  h1{
    font-size:clamp(1.8rem,10vw,2.8rem)!important;
  }
}

/* Landscape phones: preserve usable content height */
@media(max-width:900px) and (orientation:landscape) and (max-height:520px){
  .rv34-nav{
    max-height:calc(100svh - 78px)!important;
  }
  .v78-mobile-orderbar{
    height:52px!important;
    min-height:52px!important;
  }
  body{
    padding-bottom:calc(66px + var(--v101-safe-bottom))!important;
  }
}

/* Coarse pointers: nothing important may require hover */
@media(pointer:coarse){
  [class*="hover"],
  .menu-petal,
  .department-card{
    cursor:pointer;
  }
}

/* Accessibility / motion */
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  *,*::before,*::after{
    scroll-behavior:auto!important;
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
}
