/* Long Coffee: customer-only mobile navigation and ordering repair.
   This stylesheet loads AFTER legacy mobile overrides. No Admin selectors. */
/* A hidden page must NEVER remain visible due to fixed-layout or :target rules. */
body:has(.site-header) #thuc-don[hidden],
body:has(.site-header) #customer-invoices[hidden],
body:has(.site-header) #lien-he[hidden],
body:has(.site-header) .hero[hidden],
body:has(.site-header) .benefits[hidden]{display:none!important;visibility:hidden!important;pointer-events:none!important}

@media (max-width:1100px){
  html:has(body > .site-header){scroll-padding-top:66px;overscroll-behavior-y:contain}
  body:has(.site-header){height:auto!important;min-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;padding:56px 0 calc(72px + env(safe-area-inset-bottom))!important}
  body:has(.site-header) main{display:block!important;min-height:calc(100dvh - 130px)}
  body:has(.site-header) .site-header{position:fixed!important;top:0!important}
  body:has(.site-header) #thuc-don:not([hidden]){
    position:relative!important;inset:auto!important;display:block!important;
    width:100%!important;height:auto!important;min-height:0!important;
    max-width:none!important;margin:0!important;padding:13px 12px 28px!important;
    overflow:visible!important;scroll-margin-top:56px!important
  }
  body:has(.site-header) #thuc-don .menu-heading{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    height:auto!important;min-height:0!important;gap:10px!important;margin:0 0 12px!important;
    padding:0!important;overflow:visible!important
  }
  body:has(.site-header) #thuc-don .menu-heading h2{font-size:clamp(23px,6vw,30px)!important;margin:5px 0!important;line-height:1.15!important}
  body:has(.site-header) #thuc-don .menu-search{width:100%!important;max-width:none!important;min-width:0!important;flex:0 0 auto!important;height:42px!important;margin:0!important}
  body:has(.site-header) #thuc-don .menu-search input{font-size:16px!important;height:42px!important}
  body:has(.site-header) #thuc-don .menu-category-rail{
    position:relative!important;inset:auto!important;z-index:1!important;
    display:block!important;flex:none!important;height:auto!important;min-height:0!important;
    width:100%!important;margin:0 0 12px!important;padding:0!important;overflow:visible!important
  }
  body:has(.site-header) #thuc-don .category-tabs{display:none!important}
  body:has(.site-header) #thuc-don .mobile-category-picker{height:auto!important;min-height:44px!important;width:100%!important;display:block!important}
  body:has(.site-header) #thuc-don .mobile-category-picker select{height:44px!important;min-height:44px!important;width:100%!important;font-size:15px!important;border-radius:10px!important}
  body:has(.site-header) #thuc-don .menu-layout,
  body:has(.site-header) #thuc-don .menu-main,
  body:has(.site-header) #thuc-don #product-grid{
    display:block!important;flex:none!important;width:100%!important;min-width:0!important;
    height:auto!important;min-height:0!important;margin:0!important;padding:0!important;
    overflow:visible!important
  }
  body:has(.site-header) #thuc-don .product-menu-app-page{
    display:block!important;flex:none!important;width:100%!important;height:auto!important;
    min-height:0!important;overflow:visible!important
  }
  body:has(.site-header) #thuc-don .product-category-heading{
    display:flex!important;align-items:center!important;justify-content:space-between!important;
    flex:none!important;min-height:34px!important;height:auto!important;overflow:visible!important;
    padding:3px 4px 10px!important;margin:0!important
  }
  body:has(.site-header) #thuc-don .product-category-heading::after{content:""!important;display:none!important}
  body:has(.site-header) #thuc-don .product-category-products{
    display:block!important;flex:none!important;width:100%!important;height:auto!important;min-height:0!important;
    overflow:visible!important;scroll-snap-type:none!important;touch-action:pan-y!important;
    padding:0!important;margin:0!important
  }
  body:has(.site-header) #thuc-don .product-category-products>.product-menu-page{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important;
    align-items:stretch!important;flex:none!important;width:100%!important;min-width:0!important;
    height:auto!important;min-height:0!important;gap:10px!important;
    padding:0!important;margin:0!important;overflow:visible!important;
    scroll-snap-align:none!important
  }
  body:has(.site-header) #thuc-don .product-menu-page>.product-card{
    display:flex!important;flex-direction:column!important;flex:none!important;
    width:100%!important;min-width:0!important;max-width:none!important;
    height:auto!important;min-height:250px!important;border-radius:12px!important;
    margin:0!important;overflow:hidden!important
  }
  body:has(.site-header) #thuc-don .product-menu-page>.product-card>.product-art{
    display:block!important;flex:0 0 auto!important;width:100%!important;
    height:130px!important;min-height:130px!important;aspect-ratio:auto!important
  }
  body:has(.site-header) #thuc-don .product-menu-page>.product-card>.product-info{
    display:flex!important;flex:1 1 auto!important;flex-direction:column!important;
    width:100%!important;min-height:118px!important;height:auto!important;
    gap:5px!important;padding:10px!important;overflow:visible!important
  }
  body:has(.site-header) #thuc-don .product-menu-page .product-title-row h3{font-size:15px!important;line-height:1.24!important}
  body:has(.site-header) #thuc-don .product-menu-page .product-price{font-size:14px!important;line-height:1.3!important}
  body:has(.site-header) #thuc-don .mobile-product-select{
    flex:0 0 auto!important;min-height:44px!important;height:44px!important;
    margin:auto 0 0!important;padding:8px!important;border-radius:9px!important;
    font-size:12px!important;font-weight:800!important;touch-action:manipulation!important
  }
  body:has(.site-header) #customer-invoices:not([hidden]){
    display:block!important;position:relative!important;inset:auto!important;
    width:calc(100% - 24px)!important;height:auto!important;min-height:calc(100dvh - 150px)!important;
    margin:0 auto!important;padding:20px 0 28px!important;overflow:visible!important
  }
  body.customer-page-contact:has(.site-header) #lien-he:not([hidden]){
    display:grid!important;position:relative!important;inset:auto!important;
    grid-template-columns:1fr!important;gap:16px!important;
    width:calc(100% - 24px)!important;height:auto!important;min-height:calc(100dvh - 150px)!important;
    margin:0 auto!important;padding:20px 0 28px!important;overflow:visible!important
  }
  body:has(.site-header) .customer-app-nav{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    position:fixed!important;z-index:350!important;height:calc(62px + env(safe-area-inset-bottom))!important;
    gap:5px!important;padding:5px 10px calc(5px + env(safe-area-inset-bottom))!important
  }
  body:has(.site-header) .customer-app-nav a{min-height:48px!important;font-size:12px!important;color:#f8e9d2!important}
  body:has(.site-header) .customer-app-nav a small{font-size:12px!important;color:inherit!important}
  body:has(.site-header) .customer-app-nav a.active,
  body:has(.site-header) .customer-app-nav a.active small{color:#fffdf6!important}
  body:has(.site-header) .customer-invoices-content{padding-bottom:15px}
  body:has(.site-header) #lien-he .contact-card{grid-template-columns:1fr 1fr;gap:18px 10px;padding:12px;border:1px solid #e5d9c7;border-radius:12px}
  /* Cart remains accessible without covering the 3-tab customer nav. */
  body:has(.site-header):not(.cart-open) .quick-cart-dock:not([hidden]){
    display:flex!important;bottom:calc(70px + env(safe-area-inset-bottom))!important;
    left:10px!important;right:10px!important;width:auto!important;
    transform:none!important;z-index:260!important
  }
  body:has(.site-header).has-cart-items{padding-bottom:calc(155px + env(safe-area-inset-bottom))!important}
  body.cart-open:has(.site-header){height:100dvh!important;overflow:hidden!important}
  body.cart-open:has(.site-header) #cart-panel{
    display:flex!important;position:fixed!important;transform:none!important;transition:none!important;
    inset:56px 0 0!important;width:100%!important;height:calc(100dvh - 56px)!important;
    max-height:none!important;z-index:410!important;border-radius:16px 16px 0 0!important;
    overflow-y:auto!important;overflow-x:hidden!important;padding:18px 16px 28px!important
  }
  body.cart-open:has(.site-header) #mobile-cart-scrim{display:none!important}
  body.cart-open:has(.site-header) .customer-app-nav{display:none!important}
  body.cart-open:has(.site-header) .quick-cart-dock{display:none!important}
}
@media(max-width:350px){
  body:has(.site-header) #thuc-don .product-category-products>.product-menu-page{gap:7px!important}
  body:has(.site-header) #thuc-don .product-menu-page>.product-card>.product-art{height:108px!important;min-height:108px!important}
}

/* Customer-only order responsiveness and guest receipt UI */
.guest-receipt-actions{padding:12px 18px;display:flex;justify-content:flex-end}
.guest-receipt-actions button{border:0;border-radius:10px;background:#40563d;color:white;padding:12px 14px;font-weight:700;cursor:pointer}
@media(max-width:760px){
 body.customer-page-order #thuc-don .product-card{position:relative!important;pointer-events:auto!important}
 body.customer-page-order #thuc-don .product-card button{position:relative!important;z-index:2!important;pointer-events:auto!important}
 body.customer-page-order #thuc-don .product-category-products{scroll-snap-type:none!important;overflow:visible!important;touch-action:pan-y!important}
 body.customer-page-order #thuc-don #product-grid{overflow:visible!important;touch-action:pan-y!important}
 body.customer-page-order #mobile-cart-scrim:not(.show){pointer-events:none!important}
 .guest-receipt-actions{justify-content:stretch}.guest-receipt-actions button{width:100%;min-height:44px}
}
