:root{
  --bg:#f4f4f0;
  --card:#fff;
  --ink:#17171a;
  --mute:#6f6f76;
  --red:#e5322d;
  --mustard:#ffc21a;
  --green:#2e7d4f;
  --line:#e6e6df;
  
--f-head:'Unbounded',system-ui,sans-serif;
  --f-body:'Manrope',system-ui,sans-serif
}

@media(prefers-color-scheme:dark){
  :root{
  --bg:#141416;
  --card:#1f1f23;
  --ink:#f3f3ef;
  --mute:#9a9aa3;
  --line:#2c2c31
}

}

*{
  box-sizing:border-box;
  margin:0;
  -webkit-tap-highlight-color:transparent
}

body{
  font:500 15px/1.4 var(--f-body);
  background:var(--bg);
  color:var(--ink);
  padding-bottom:96px
}

button{
  font:inherit;
  color:inherit;
  border:0;
  background:none;
  cursor:pointer
}

button:focus-visible{
  outline:2px solid var(--red);
  outline-offset:2px
}

header{
  position:sticky;
  top:0;
  z-index:5;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  background:var(--bg)
}

h1{
  font:800 22px var(--f-head);
  color:var(--red);
  letter-spacing:-.02em
}

h2{
  font:600 16px var(--f-head);
  padding:22px 16px 12px
}

#cartBtn{
  position:relative;
  width:44px;
  height:44px;
  border-radius:14px;
  background:var(--card);
  display:grid;
  place-items:center
}

#badge{
  position:absolute;
  top:-4px;
  right:-4px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  border-radius:10px;
  background:var(--red);
  color:#fff;
  font-size:12px;
  display:grid;
  place-items:center
}

.carousel{
  position:relative
}

.track{
  display:flex;
  gap:12px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  padding:0 16px;
  scrollbar-width:none
}

.track::-webkit-scrollbar{
  display:none
}

.poster{
  flex:0 0 88%;
  scroll-snap-align:center;
  height:180px;
  border-radius:24px;
  background-size:cover;
  background-position:center;
  position:relative;
  overflow:hidden;
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:18px
}

.poster::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(0deg,rgba(0,0,0,.75),rgba(0,0,0,.05) 65%)
}

.poster>*{
  position:relative
}

.poster b{
  font:800 20px/1.15 var(--f-head)
}

.poster span{
  margin-top:6px;
  font-weight:700;
  background:var(--mustard);
  color:#17171a;
  align-self:flex-start;
  padding:4px 10px;
  border-radius:99px;
  font-size:13px
}

.dots{
  display:flex;
  justify-content:center;
  gap:6px;
  margin-top:10px
}

.dots i{
  width:6px;
  height:6px;
  border-radius:3px;
  background:var(--line);
  transition:.25s
}

.dots i.on{
  width:22px;
  background:var(--red)
}

.cats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px 10px;
  padding:0 16px
}

.cat{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  font-weight:800;
  font-size:13px
}

.cat img{
  width:100%;
  aspect-ratio:1;
  object-fit:cover;
  border-radius:50%;
  border:3px solid transparent;
  outline:2px solid var(--line);
  outline-offset:0;
  transition:.2s
}

.cat.on img{
  border-color:var(--bg);
  outline-color:var(--red)
}

.list{
  display:grid;
  gap:12px;
  padding:0 16px
}

.item{
  display:flex;
  gap:12px;
  background:var(--card);
  border-radius:20px;
  padding:10px
}

.item img{
  width:104px;
  height:104px;
  object-fit:cover;
  border-radius:14px;
  flex:none
}

.item .t{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0
}

.item h4{
  font-weight:800;
  font-size:16px
}

.item p{
  color:var(--mute);
  font-size:13px;
  margin:2px 0 auto
}

.row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:8px
}

.price{
  font:600 16px var(--f-head)
}

.add{
  background:var(--ink);
  color:var(--bg);
  border-radius:12px;
  padding:9px 14px;
  font-weight:800
}

.qty{
  display:flex;
  align-items:center;
  gap:2px;
  background:var(--bg);
  border-radius:12px
}

.qty button{
  width:34px;
  height:34px;
  display:grid;
  place-items:center
}

.qty b{
  min-width:22px;
  text-align:center
}

.bar{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));
  z-index:6
}

.bar button{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:var(--red);
  color:#fff;
  padding:16px 20px;
  border-radius:18px;
  font-weight:800;
  box-shadow:0 10px 30px rgba(229,50,45,.35)
}

.bar span{
  display:flex;
  gap:8px;
  align-items:center
}

.sheet{
  position:fixed;
  inset:0;
  z-index:10;
  background:rgba(0,0,0,.5);
  display:flex;
  align-items:flex-end
}

.panel{
  width:100%;
  max-height:88%;
  overflow:auto;
  background:var(--bg);
  border-radius:28px 28px 0 0;
  padding:8px 16px calc(16px + env(safe-area-inset-bottom,0px));
  animation:up .3s ease
}

@keyframes up{
  from{
  transform:translateY(100%)
}

}

.grab{
  width:40px;
  height:4px;
  border-radius:2px;
  background:var(--line);
  margin:0 auto 8px
}

.ph{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:6px 0 12px
}

.ph h3{
  font:600 18px var(--f-head)
}

.ci{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid var(--line)
}

.ci img{
  width:52px;
  height:52px;
  border-radius:12px;
  object-fit:cover
}

.ci div:nth-child(2){
  flex:1;
  font-weight:700
}

.ci small{
  display:block;
  color:var(--mute)
}

.sum{
  display:flex;
  justify-content:space-between;
  font:600 18px var(--f-head);
  padding:16px 0
}

.ghost,.primary{
  width:100%;
  padding:15px;
  border-radius:16px;
  font-weight:800;
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  margin-top:8px
}

.ghost{
  background:var(--card)
}
.ghost.ok{
  color:var(--green)
}

.primary{
  background:var(--red);
  color:#fff
}

.toast{
  position:fixed;
  left:50%;
  bottom:100px;
  transform:translateX(-50%);
  background:var(--ink);
  color:var(--bg);
  padding:10px 18px;
  border-radius:99px;
  z-index:20;
  font-weight:700
}

.empty{
  text-align:center;
  color:var(--mute);
  padding:28px 0
}

@media(prefers-reduced-motion:reduce){
  *{
    animation:none!important;
  transition:none!important
  }
}


[hidden] {
  display: none !important;
}