/* =========================================================
   LOOP CAFE — QR MENU
   Original category format preserved
   Mobile-first / RTL
   ========================================================= */

:root{
  --navy:#1b3c53;
  --navy-dark:#122c3c;
  --cream:#fbf8e8;
  --card:#eae6d5;
  --line:#e4dfce;
  --text:#333;
  --muted:#666;
  --accent:#c8a96b;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
  font-family:"Vazirmatn",sans-serif;
}

html{
  height:100%;
  scroll-behavior:smooth;
  background:var(--cream);
}

body{
  min-height:100%;
  background:var(--cream);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  padding-bottom:76px;
}

/* ---------- Loader ---------- */
.loader{
  background:var(--navy);
  height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
}

.loader img{
  width:min(180px,60%);
  height:auto;
  animation:fadeIn .55s ease both;
}

@keyframes fadeIn{
  from{opacity:0;transform:scale(.86)}
  to{opacity:1;transform:scale(1)}
}

.typewriter{
  font-size:20px;
  font-family:Helvetica,Arial,sans-serif;
  color:#0000;
  background:
    linear-gradient(-90deg,var(--cream) 5px,#0000 0) 10px 0,
    linear-gradient(var(--cream) 0 0) 0 0;
  background-size:calc(var(--n) * 1ch) 200%;
  -webkit-background-clip:padding-box,text;
  background-clip:padding-box,text;
  background-repeat:no-repeat;
  overflow:hidden;
  animation:b .7s infinite steps(1),t calc(var(--n) * .4s) steps(var(--n)) forwards;
}

@keyframes t{
  from{background-size:0 200%}
}

@keyframes b{
  50%{background-position:0 -100%,0 0}
}

/* ---------- Header: small + clean ---------- */
header{
  background:var(--navy);
  color:#fff;
  text-align:center;
  padding:7px 12px 8px;
  position:sticky;
  top:0;
  z-index:100;
  min-height:62px;
  box-shadow:0 2px 10px rgba(27,60,83,.12);
}

header img{
  width:92px;
  max-height:38px;
  object-fit:contain;
  height:auto;
  display:inline-block;
}

header .font-bold{
  margin-top:2px;
  font-size:.78rem;
  line-height:1.2;
  color:var(--cream);
}

/* ---------- Image modal ---------- */
.image-modal{
  display:none;
  position:fixed;
  z-index:2000;
  inset:0;
  width:100%;
  height:100%;
  overflow:hidden;
  background:rgba(0,0,0,.88);
  align-items:center;
  justify-content:center;
  padding:18px;
  backdrop-filter:blur(5px);
}

.image-modal img{
  max-width:94%;
  max-height:86%;
  object-fit:contain;
  border-radius:14px;
  box-shadow:0 10px 35px rgba(0,0,0,.35);
  animation:zoomIn .2s ease both;
}

.image-modal .close{
  position:absolute;
  top:14px;
  right:18px;
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:rgba(255,255,255,.12);
  border-radius:50%;
  font-size:28px;
  font-weight:400;
  cursor:pointer;
}

@keyframes zoomIn{
  from{transform:scale(.94);opacity:0}
  to{transform:scale(1);opacity:1}
}

/* ---------- Original category format — unchanged ---------- */
.category-scroll{
  position:sticky;
  top:62px;
  z-index:850;
  display:flex;
  gap:.8rem;
  overflow-x:auto;
  padding:9px 12px;
  background:var(--cream);
  border-bottom:1px solid #e6e1d6;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}

.category-scroll::-webkit-scrollbar{
  display:none;
}

.category{
  flex:0 0 auto;
  text-align:center;
  font-size:.82rem;
  color:var(--navy);
  cursor:pointer;
  min-width:64px;
}

.category-icon{
  width:58px;
  height:58px;
  border-radius:50%;
  background:var(--cream);
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 5px;
  border:3px solid var(--line);
  padding:6px;
  transition:border-color .18s ease,transform .18s ease;
}

.category.active .category-icon{
  border-color:var(--navy);
  transform:scale(1.03);
}

/* ---------- Menu ---------- */
.menu-section{
  width:100%;
  max-width:760px;
  margin:0 auto;
  padding:13px 12px 18px;
}

.menu-category{
  scroll-margin-top:135px;
}

.menu-category-title{
  font-size:.98rem;
  font-weight:700;
  color:#2f4156;
  margin:9px 2px 8px;
}

.menu-item{
  background:var(--card);
  border-radius:14px;
  padding:10px;
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:9px;
  min-height:94px;
  box-shadow:0 3px 10px rgba(0,0,0,.035);
  transition:transform .16s ease,box-shadow .16s ease;
}

.menu-item:active{
  transform:scale(.99);
}

.menu-item img{
  width:76px;
  height:76px;
  object-fit:cover;
  border-radius:11px;
  flex:0 0 76px;
  cursor:zoom-in;
}

.item-info{
  flex:1;
  min-width:0;
  padding:0;
}

.item-info h3{
  font-size:.94rem;
  color:var(--navy);
  margin-bottom:4px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  line-height:1.35;
}

.item-info p{
  font-size:.76rem;
  color:var(--muted);
  line-height:1.55;
  max-height:2.45rem;
  overflow:hidden;
  padding:0;
}

.price-action{
  flex:0 0 auto;
  text-align:center;
  font-size:.78rem;
  color:var(--navy);
  min-width:68px;
  margin-left:2px;
  font-weight:700;
  line-height:1.5;
}

.price-action span{
  display:inline-block;
}

/* ---------- Bottom nav ---------- */
nav{
  position:fixed;
  bottom:9px;
  left:10px;
  right:10px;
  background:rgba(27,60,83,.97);
  padding:5px 7px;
  display:flex;
  z-index:500;
  box-shadow:0 6px 22px rgba(0,0,0,.18);
  align-items:center;
  gap:8px;
  justify-content:space-between;
  border-radius:16px;
}

nav .left,
nav .center,
nav .right{
  flex:1;
  text-align:center;
}

nav a,
nav button{
  color:var(--cream);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border:0;
}

/* ---------- Address ---------- */
#address-section{
  display:none;
  position:fixed;
  bottom:76px;
  left:50%;
  transform:translateX(-50%);
  width:calc(100% - 28px);
  max-width:420px;
  max-height:70vh;
  overflow:auto;
  background:var(--cream);
  padding:12px;
  border-radius:16px;
  box-shadow:0 10px 28px rgba(0,0,0,.2);
  z-index:1100;
  text-align:center;
}

#address-section iframe{
  width:100%;
  height:210px;
  border:0;
  border-radius:10px;
}

/* ---------- Desktop ---------- */

/* ---------- Clean multi-price layout ---------- */
.price-action.multi-price{
  flex:0 0 auto;
  min-width:132px;
  margin-left:2px;
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:2px 0;
  text-align:initial;
}

.price-row{
  display:grid;
  grid-template-columns:auto auto;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  min-height:22px;
  padding:2px 0;
  direction:rtl;
}

.price-row + .price-row{
  border-top:1px solid rgba(27,60,83,.10);
}

.price-label{
  color:#626262;
  font-size:.62rem;
  font-weight:500;
  white-space:nowrap;
}

.price-value{
  color:var(--navy);
  font-size:.70rem;
  font-weight:800;
  white-space:nowrap;
  direction:ltr;
  text-align:left;
}

@media(min-width:640px){
  .price-action.multi-price{min-width:150px}
  .price-label{font-size:.66rem}
  .price-value{font-size:.74rem}
}

@media(min-width:640px){
  body{padding-bottom:88px}

  header{
    min-height:70px;
    padding:8px 12px;
  }

  header img{
    width:100px;
    max-height:42px;
  }

  .category-scroll{
    top:70px;
    padding:10px 18px;
  }

  .category-icon{
    width:64px;
    height:64px;
  }

  .menu-section{
    max-width:820px;
    padding:18px 18px 24px;
  }

  .menu-item{
    padding:11px;
    gap:12px;
    min-height:108px;
  }

  .menu-item img{
    width:86px;
    height:86px;
    flex-basis:86px;
  }

  .item-info h3{font-size:.98rem}
  .item-info p{font-size:.79rem}
  .price-action{min-width:78px;font-size:.82rem}

  nav{
    left:50%;
    right:auto;
    width:430px;
    transform:translateX(-50%);
  }
}

@media(min-width:1000px){
  .menu-section{
    max-width:900px;
    padding-left:24px;
    padding-right:24px;
  }
}

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


/* =========================================================
   NEW IN LOOP — managed separately from menu categories
   ========================================================= */
.new-items-section{
  width:100%;
  max-width:760px;
  margin:0 auto;
  padding:13px 12px 4px;
}

.new-items-heading{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:10px;
  margin:0 2px 9px;
  color:#76529B;
}

.new-items-heading h2{
  margin-top:3px;
  color:var(--navy);
  font-size:1rem;
  font-weight:800;
  color: #76529B;
}

.new-items-eyebrow{
  color:var(--accent);
  font:700 .56rem/1 Arial,sans-serif;
  letter-spacing:1.5px;
  color:#76529B;
}

.new-items-note{
  color:var(--muted);
  font-size:.62rem;
  white-space:nowrap;
  color:#76529B;
}

.new-items-track{
  display:flex;
  gap:9px;
  overflow-x:auto;
  padding:1px 1px 8px;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.new-items-track::-webkit-scrollbar{
  display:none;
}

.new-item-card{
  flex:0 0 148px;
  overflow:hidden;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:15px;
  box-shadow:0 3px 10px rgba(0,0,0,.035);
}

.new-item-card img{
  display:block;
  width:100%;
  height:100px;
  object-fit:cover;
  cursor:zoom-in;
}

.new-item-card-body{
  padding:8px 9px 9px;
}

.new-item-card h3{
  color:var(--navy);
  font-size:.78rem;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#76529B;
}

.new-item-card p{
  margin-top:3px;
  color:var(--muted);
  font-size:.63rem;
  line-height:1.5;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  min-height:1.8rem;
  color:#76529B;
}

.new-item-price{
  display:block;
  margin-top:5px;
  color:var(--navy);
  font-size:.69rem;
  font-weight:800;
  color:#76529B;
}

.new-item-card[hidden]{
  display:none;
}

@media(min-width:640px){
  .new-items-section{
    max-width:820px;
    padding-left:18px;
    padding-right:18px;
  }

  .new-item-card{
    flex-basis:165px;
  }

  .new-item-card img{
    height:112px;
  }
}
