/* Hicgelato FINAL responsive hardening */
:root{--purple:#6d24b8;--purple-dark:#4f177f;--ink:#23172e;--muted:#75667c;--line:#eadff0;--surface:#fff;--bg:#fbf9ff}
html{width:100%;min-width:0;overflow-x:hidden;scroll-behavior:smooth}
body{width:100%;min-width:0;overflow-x:hidden;-webkit-text-size-adjust:100%;text-rendering:optimizeLegibility}
img{max-width:100%;height:auto}
button,a,input,select,textarea{touch-action:manipulation}
button,a{ -webkit-tap-highlight-color:transparent }
input,select,textarea{max-width:100%}
/* Public header */
.header{width:100%;min-width:0;gap:10px}
.brand{min-width:0;flex:1}.brand b,.brand small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.actions{min-width:0;flex-wrap:nowrap}.actions button{white-space:nowrap}
/* Public menu */
.menuHome main,.menuHome .quick,.menuHome .info{width:auto;max-width:1400px}
.menuHome .grid{min-width:0}.menuHome .card{min-width:0}
.menuHome .body{min-width:0}.menuHome .body p{overflow:hidden}
.menuHome .meta{min-width:0}.menuHome .price{min-width:0}
.heroSlide>div{min-width:0}.heroArt{min-width:0}.heroArt img{max-width:100%}
.cats{overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
.drawer,.modal{overscroll-behavior:contain}
.drawer aside{max-width:100%;box-shadow:-20px 0 50px #21102a18}
/* Product */
.productHero,.productExtra,.productReviews,.related{min-width:0}
.productVisual,.productInfo,.reviewsLayout,.reviewList,.reviewForm{min-width:0}
.productDescription,.publicReview p{overflow-wrap:anywhere}
.reviewForm input,.reviewForm select,.reviewForm textarea{width:100%;min-width:0}
.reviewActions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
/* Orders/tracking */
.orderMain,.trackerMain{width:calc(100% - 32px);max-width:900px;margin-inline:auto;min-width:0}
.orderDetails,.trackedMeta{min-width:0}
.orderActions,.trackerActions{display:flex;gap:10px;flex-wrap:wrap}
.orderActions>* ,.trackerActions>*{min-width:0}
/* Admin desktop */
body.adminPage .adminMain{min-width:0;overflow:visible}
body.adminPage .adminSection{min-width:0}
body.adminPage .tableWrap{max-width:100%;overflow:auto}
body.adminPage table{border-collapse:collapse}
body.adminPage .adminModal{overflow:auto;-webkit-overflow-scrolling:touch}
body.adminPage .adminModalCard{min-width:0}
body.adminPage .reviewActions button{position:static!important;left:auto!important;bottom:auto!important;margin:0!important}
body.adminPage .reviewActions{position:static!important}
/* Do not allow a failed remote font to destroy layout */
@media (max-width:1000px){
  .adminLayout{grid-template-columns:1fr}
  .adminSide{position:sticky;top:82px;z-index:60;overflow-x:auto;overflow-y:hidden;white-space:nowrap}
  .adminMain{padding:24px 3%}
}
@media (max-width:800px){
  .topbar{display:none!important}
  .header{height:64px!important;padding:0 12px!important;position:sticky;top:0;z-index:80}
  .brand{gap:7px}.brand img.logoImg{width:44px!important;height:44px!important;flex:0 0 44px}
  .brand b{font-size:16px!important}.brand small{font-size:8px!important}
  .actions{gap:5px}.actions button{padding:8px 8px!important;font-size:9px!important}
  .actions .trackBtn{display:inline-flex!important}.actions .cartBtn{display:inline-flex!important}
  .hero{margin:10px 12px!important;border-radius:18px!important}
  .heroSlide{grid-template-columns:1fr!important;min-height:0!important;padding:18px!important;gap:8px}
  .heroSlide>div:first-child{order:2}.heroArt{height:145px!important;border-radius:15px!important;order:1}.hero h1{font-size:25px!important;line-height:1.45}.hero p{font-size:10px;line-height:1.8}.hero button{width:100%;font-size:10px;padding:10px 12px}
  .quick{margin:0 12px 18px!important;grid-template-columns:1fr!important;gap:8px!important}
  .quick>div{padding:10px;border-radius:14px}.searchBox{width:100%!important}.searchBox input{font-size:12px!important}
  .menuHome main{margin:0 12px 30px!important}
  .menuHome .sectionHead{align-items:stretch!important;flex-direction:column!important;gap:8px!important;margin-bottom:10px!important}
  .menuHome .sectionHead h1,.menuHome .sectionHead h2{font-size:22px!important;line-height:1.45}
  .menuHome .sectionHead select{width:100%!important;font-size:11px!important}
  .menuHome .grid{grid-template-columns:1fr!important;gap:10px!important}
  .menuHome .card{display:grid!important;grid-template-columns:108px minmax(0,1fr)!important;min-height:145px;border-radius:16px}
  .menuHome .pic{height:auto!important;min-height:145px!important;border-left:1px solid var(--line)}
  .menuHome .body{padding:10px!important;display:flex;flex-direction:column;justify-content:center}
  .menuHome .body h3{font-size:14px!important;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .menuHome .body p{font-size:9.5px!important;line-height:1.7;height:auto!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  .menuHome .meta{gap:5px}.menuHome .price{font-size:10px!important;white-space:nowrap}.menuHome .add{font-size:9px!important;padding:7px!important}
  .menuHome .detailsLink{display:none}.menuHome .rating{font-size:9px!important}
  .info{grid-template-columns:1fr!important;margin:0 12px 25px!important;gap:8px!important}
  footer{padding:18px 12px!important;flex-wrap:wrap}.drawer aside{width:100%!important;padding:18px 14px 14px!important}.cartBottom{padding-bottom:max(8px,env(safe-area-inset-bottom))}
  .modal{align-items:flex-end!important}.modalCard{width:100%!important;max-width:none!important;border-radius:22px 22px 0 0!important;grid-template-columns:1fr!important;max-height:92dvh!important;overflow:auto}
  .modalCard>img{height:170px!important;min-height:0!important}.modalBody{padding:18px!important}
  /* product page */
  .productHero{grid-template-columns:1fr!important;gap:12px!important}.productVisual{min-height:230px!important}.productInfo h1{font-size:25px!important}.productDescription{font-size:11px!important;line-height:2!important}.productPrice{font-size:22px!important}.primaryAction{width:100%!important}
  .productExtra{grid-template-columns:1fr!important;gap:8px!important}.productReviews{padding:15px!important;border-radius:17px!important}.reviewsHead{display:flex!important;flex-direction:column!important;gap:12px!important}.reviewsLayout{grid-template-columns:1fr!important}.reviewForm{position:static!important}.reviewForm button{width:100%!important}.related .grid{grid-template-columns:1fr!important}
  /* order + tracker */
  .orderMain,.trackerMain{width:calc(100% - 24px)!important}.orderNumberBox strong{font-size:40px!important}.orderDetails,.trackedMeta{grid-template-columns:1fr!important}.orderActions,.trackerActions{flex-direction:column!important}.orderActions>* ,.trackerActions>*{width:100%!important;text-align:center}
  .trackerForm{flex-direction:column!important}.trackerForm button{width:100%!important}
  /* admin */
  body.adminPage{overflow-x:hidden!important}
  body.adminPage .adminHeader{height:60px!important;padding:0 10px!important}
  body.adminPage .adminHeader .logoImg{width:38px!important;height:38px!important}.adminHeaderActions{gap:5px!important}.adminLive{font-size:8px!important;padding:5px 7px!important}.adminView{font-size:9px!important}
  body.adminPage .adminLayout{display:flex!important;flex-direction:column!important;min-height:0!important}
  body.adminPage .adminSide{position:sticky!important;top:60px!important;display:flex!important;flex-direction:row!important;width:100%!important;padding:6px!important;gap:5px!important;background:#21152a;overflow-x:auto!important}
  body.adminPage .sideTitle,body.adminPage .sideBottom{display:none!important}
  body.adminPage .sideItem{flex:0 0 auto!important;width:auto!important;min-width:max-content!important;padding:8px 10px!important;font-size:9px!important;white-space:nowrap}
  body.adminPage .sideItem b{display:none!important}
  body.adminPage .adminMain{padding:12px 10px 30px!important}
  body.adminPage .adminTitle{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;margin-bottom:12px!important}
  body.adminPage .adminTitle h1{font-size:21px!important}.adminTitle p{font-size:9px!important;line-height:1.8!important}.adminTitle>button,.reviewHeadActions button{width:100%!important}
  body.adminPage .statGrid{grid-template-columns:1fr 1fr!important;gap:7px!important}.stat{min-width:0!important}.stat strong{font-size:18px!important}
  body.adminPage .adminTwo,body.adminPage .settingsGrid,body.adminPage .manageGrid,body.adminPage .orderGrid,body.adminPage .reviewAdminGrid,body.adminPage .bannerAdmin{grid-template-columns:1fr!important;gap:8px!important}
  body.adminPage .toolbar{display:flex!important;flex-direction:column!important;gap:7px!important}.toolbar input,.toolbar select,.toolbar button{width:100%!important}
  body.adminPage .tableWrap{overflow-x:auto!important}.tableWrap table{min-width:720px!important}
  body.adminPage .reviewActions{display:flex!important;gap:7px!important;flex-wrap:wrap!important}.reviewActions button{flex:1 1 120px!important}
  body.adminPage .formGrid{grid-template-columns:1fr!important}.productForm label.full{grid-column:auto!important}.imageUploadBox{flex-direction:column!important}.formActions{flex-direction:column!important}.formActions button{width:100%!important}
  body.adminPage .adminModal{padding:7px!important}.adminModalCard{width:100%!important;max-height:96dvh!important;padding:15px!important}
}
@media (max-width:380px){
  .header{padding:0 7px!important}.brand img.logoImg{width:38px!important;height:38px!important;flex-basis:38px}.brand b{font-size:14px!important}.actions button{font-size:8px!important;padding:7px 6px!important}
  .menuHome .card{grid-template-columns:94px minmax(0,1fr)!important;min-height:136px}.menuHome .pic{min-height:136px!important}.menuHome .body{padding:8px!important}.menuHome .body h3{font-size:12px!important}.menuHome .body p{font-size:8px!important}.menuHome .add{font-size:8px!important;padding:6px!important}.menuHome .price{font-size:9px!important}
}
@media (min-width:1200px){
  .menuHome .grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .menuHome .hero{max-width:1500px;margin-inline:auto}.menuHome main,.menuHome .quick,.menuHome .info{margin-inline:auto;max-width:1400px}
}
/* HICGELATO PUBLIC CARD LAYOUT FIX - 2026-09-30 */

/* Desktop / laptop: clean vertical product cards */
@media (min-width: 801px){
  .menuHome .grid{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:20px !important;
    align-items:stretch !important;
  }
  .menuHome .card,
  .card.menuHome{
    display:flex !important;
    flex-direction:column !important;
    grid-template-columns:none !important;
    width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
  }
  .menuHome .card .pic{
    width:100% !important;
    height:245px !important;
    min-height:245px !important;
    flex:0 0 245px !important;
  }
  .menuHome .card .pic img{
    width:88% !important;
    height:88% !important;
    object-fit:contain !important;
  }
  .menuHome .card .body{
    width:100% !important;
    min-width:0 !important;
    flex:1 1 auto !important;
    padding:16px !important;
    display:flex !important;
    flex-direction:column !important;
  }
  .menuHome .card .body h3{
    font-size:17px !important;
    line-height:1.6 !important;
    margin:4px 0 6px !important;
    overflow-wrap:anywhere !important;
  }
  .menuHome .card .body p{
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    overflow:hidden !important;
    height:auto !important;
    min-height:40px !important;
    margin:0 0 12px !important;
    line-height:1.8 !important;
  }
  .menuHome .card .meta{
    margin-top:auto !important;
    width:100% !important;
    min-width:0 !important;
    gap:8px !important;
  }
  .menuHome .card .add{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }
  .menuHome .card .rating,
  .menuHome .card .detailsLink{
    flex:0 0 auto !important;
  }
  .menuHome .card .detailsLink{
    margin-top:9px !important;
  }
}

/* Tablet */
@media (min-width: 801px) and (max-width: 1200px){
  .menuHome .grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
  .menuHome .card .pic{height:220px !important;min-height:220px !important;flex-basis:220px !important;}
}

/* Mobile: readable horizontal cards, never squeezed */
@media (max-width: 800px){
  .menuHome .grid{
    grid-template-columns:1fr !important;
    gap:12px !important;
  }
  .menuHome .card{
    display:grid !important;
    grid-template-columns:118px minmax(0,1fr) !important;
    width:100% !important;
    min-width:0 !important;
    min-height:158px !important;
    height:auto !important;
    overflow:hidden !important;
  }
  .menuHome .card .pic{
    width:118px !important;
    min-width:118px !important;
    min-height:158px !important;
    height:100% !important;
  }
  .menuHome .card .pic img{
    width:90% !important;
    height:90% !important;
    object-fit:contain !important;
  }
  .menuHome .card .body{
    min-width:0 !important;
    padding:12px !important;
    overflow:hidden !important;
  }
  .menuHome .card .body h3{
    font-size:14px !important;
    line-height:1.6 !important;
    overflow-wrap:anywhere !important;
    margin:2px 0 4px !important;
  }
  .menuHome .card .body p{
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    overflow:hidden !important;
    height:auto !important;
    min-height:34px !important;
    line-height:1.7 !important;
    margin:0 0 8px !important;
  }
  .menuHome .card .meta{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:6px !important;
    min-width:0 !important;
  }
  .menuHome .card .price{
    min-width:0 !important;
    font-size:11px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }
  .menuHome .card .add{
    padding:7px 9px !important;
    font-size:10px !important;
    white-space:nowrap !important;
  }
  .menuHome .card .detailsLink{font-size:10px !important;margin-top:7px !important;}
  .menuHome .card .rating{font-size:10px !important;margin-top:5px !important;}
}

@media (max-width: 390px){
  .menuHome .card{grid-template-columns:102px minmax(0,1fr) !important;min-height:145px !important;}
  .menuHome .card .pic{width:102px !important;min-width:102px !important;min-height:145px !important;}
  .menuHome .card .body{padding:10px !important;}
  .menuHome .card .body h3{font-size:13px !important;}
  .menuHome .card .body p{font-size:9px !important;}
  .menuHome .card .add{font-size:9px !important;padding:6px 7px !important;}
}

/* Related products on product page */
@media (min-width: 801px){
  .related .grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
  .related .card{display:flex !important;flex-direction:column !important;grid-template-columns:none !important;min-height:0 !important;}
  .related .card .pic{height:210px !important;min-height:210px !important;}
}

/* HICGELATO ADMIN SCROLL FIX - ONLY SCROLL BEHAVIOR CHANGED */
html:has(body.adminPage),
body.adminPage{
  height:auto !important;
  min-height:100% !important;
}
body.adminPage{
  overflow-x:hidden !important;
  overflow-y:auto !important;
}
body.adminPage .adminHeader{
  position:sticky !important;
  top:0 !important;
  z-index:80 !important;
}
body.adminPage .adminLayout{
  height:auto !important;
  min-height:calc(100vh - 70px) !important;
  overflow:visible !important;
}
body.adminPage .adminSide{
  height:calc(100vh - 70px) !important;
  max-height:calc(100vh - 70px) !important;
  position:sticky !important;
  top:70px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}
body.adminPage .adminMain{
  height:auto !important;
  min-height:calc(100vh - 70px) !important;
  overflow:visible !important;
  overscroll-behavior:auto !important;
  -webkit-overflow-scrolling:auto !important;
}
body.adminPage .tableWrap{
  overflow-x:auto !important;
  overflow-y:visible !important;
}
@media(max-width:760px){
  body.adminPage .adminLayout{
    min-height:0 !important;
  }
  body.adminPage .adminSide{
    height:auto !important;
    max-height:none !important;
    position:sticky !important;
    top:70px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
  }
  body.adminPage .adminMain{
    min-height:0 !important;
    height:auto !important;
    overflow:visible !important;
  }
}
/* END ADMIN SCROLL FIX */


/* HICGELATO MOBILE CART REBUILD - 2026-10-03
   Touch-first cart drawer: fixed viewport, independent item scroll, safe-area footer. */
@media (max-width:800px){
  html.cart-open, body.cart-open{overflow:hidden!important;overscroll-behavior:none!important;}
  .drawer.open{display:block!important;position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;height:100svh!important;z-index:1000!important;overflow:hidden!important;}
  .drawer.open .overlay{position:absolute!important;inset:0!important;touch-action:none!important;}
  .drawer.open aside{
    position:absolute!important;
    inset:0 0 0 auto!important;
    width:100%!important;
    max-width:520px!important;
    height:100%!important;
    max-height:100dvh!important;
    margin:0!important;
    padding:calc(14px + env(safe-area-inset-top)) 14px calc(12px + env(safe-area-inset-bottom))!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    overscroll-behavior:contain!important;
    border-radius:0!important;
    box-shadow:-18px 0 45px rgba(35,23,46,.18)!important;
  }
  .drawer.open aside h2{
    flex:0 0 auto!important;
    margin:4px 52px 12px 0!important;
    padding:0!important;
    font-size:22px!important;
    line-height:1.45!important;
  }
  .drawer.open .close{
    position:absolute!important;
    left:12px!important;
    top:calc(10px + env(safe-area-inset-top))!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
    z-index:3!important;
    font-size:27px!important;
  }
  .drawer.open #cartItems{
    flex:1 1 auto!important;
    min-height:0!important;
    width:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-y:contain!important;
    padding:2px 2px 14px!important;
    scrollbar-width:thin!important;
  }
  .drawer.open .cartItem{
    grid-template-columns:64px minmax(0,1fr) 40px!important;
    align-items:center!important;
    gap:10px!important;
    min-height:82px!important;
    padding:12px 2px!important;
  }
  .drawer.open .cartItem img{
    width:64px!important;height:64px!important;min-width:64px!important;
    border-radius:14px!important;padding:3px!important;
  }
  .drawer.open .cartItem>div{min-width:0!important;display:flex!important;flex-direction:column!important;gap:3px!important;}
  .drawer.open .cartItem b{
    display:block!important;min-width:0!important;font-size:13px!important;line-height:1.55!important;
    overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  }
  .drawer.open .cartItem small{font-size:10px!important;line-height:1.5!important;color:#75667c!important;}
  .drawer.open .qty{display:flex!important;align-items:center!important;gap:8px!important;font-size:12px!important;line-height:1!important;margin-top:3px!important;}
  .drawer.open .qty button{
    width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
    border-radius:10px!important;font-size:18px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
    touch-action:manipulation!important;
  }
  .drawer.open .removeItem{
    width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
    border-radius:11px!important;font-size:20px!important;display:flex!important;align-items:center!important;justify-content:center!important;
  }
  .drawer.open .emptyCart{padding:55px 10px!important;font-size:13px!important;line-height:2!important;}
  .drawer.open .cartBottom{
    flex:0 0 auto!important;
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    margin:0!important;
    padding:12px 2px calc(8px + env(safe-area-inset-bottom))!important;
    background:#fff!important;
    border-top:1px solid #eadff0!important;
    box-shadow:0 -8px 24px rgba(35,23,46,.06)!important;
  }
  .drawer.open .cartBottom>div{font-size:13px!important;line-height:1.8!important;margin-bottom:5px!important;}
  .drawer.open .cartBottom button{
    width:100%!important;min-height:48px!important;margin-top:7px!important;padding:13px 15px!important;
    border-radius:14px!important;font-size:13px!important;font-weight:800!important;
  }
}
@media (max-width:380px){
  .drawer.open aside{padding-left:11px!important;padding-right:11px!important;}
  .drawer.open aside h2{font-size:20px!important;margin-right:48px!important;}
  .drawer.open .cartItem{grid-template-columns:56px minmax(0,1fr) 38px!important;gap:8px!important;min-height:74px!important;}
  .drawer.open .cartItem img{width:56px!important;height:56px!important;min-width:56px!important;}
  .drawer.open .cartItem b{font-size:12px!important;}
  .drawer.open .cartItem small{font-size:9px!important;}
  .drawer.open .qty{gap:6px!important;font-size:11px!important;}
  .drawer.open .qty button{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;}
  .drawer.open .removeItem{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;}
}
