/* =====================================================
   Menu Management System - Main Stylesheet
   All colors are controlled via CSS variables which
   are dynamically set from admin settings
   ===================================================== */

:root{
  /* Default colors - These will be overridden by PHP-generated styles */
  --teal:#1f6f6a;
  --teal2:#2a8b84;
  --navbar-bg:#e7bf75;
  --navbar-text:#1f6f6a;
  --button-bg:#1f6f6a;
  --button-text:#ffffff;
  --accent:#ff6b35;
  --bg:#f5f7f8;
  --card:#ffffff;
  --text:#16302f;
  --muted:#6b7b7a;
  --menu-item-bg:#ffffff;
  --category-tab:#1f6f6a;
  --category-tab-active:#ffffff;
  --menu-nav-start:#1f6f6a;
  --menu-nav-end:#2a8b84;
  --shadow: 0 10px 30px rgba(0,0,0,.12);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial; color:var(--text); background:var(--bg); }

/* Home page specific - no scroll */
body.home-page { height: 100%; overflow: hidden; }

/* Prevent image and text selection/downloading */
img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
  -webkit-touch-callout: none;
}
a img {
  pointer-events: auto;
}
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.page{ padding-bottom: 24px; }

/* TOP BAR */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navbar-bg);
  display:flex;
  align-items:flex-start;
  justify-content: center;
  gap:12px;
  padding: 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.icon-btn{
  border:none;
  background:transparent;
  font-size:20px;
  padding:10px;
  line-height:1;
  border-radius:10px;
  position: absolute;
  left: 0;
  top: 0;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  cursor: pointer;
}
.icon-btn:focus{
  outline: none;
}
.icon-btn.search-btn{
  left: auto;
  right: 0;
  font-size: 22px;
}
#burgerBtn{
  color: var(--navbar-text);
}
.search-icon{
  width: 24px;
  height: 24px;
  display: block;
  pointer-events: auto;
}
.brand{ display:flex; align-items:center; gap:10px; padding: 0; }
.brand-logo{ height:125px; object-fit:contain; max-width:250px; }
.topbar-right{ margin-left:auto; }

/* DRAWER */
.backdrop{
  position: fixed; inset:0;
  background: rgba(0,0,0,.35);
  z-index: 110;
}
.drawer{
  position: fixed;
  top:0; left:0;
  height:100%;
  width:min(86vw, 360px);
  background:#fff;
  z-index: 120;
  transform: translateX(-105%);
  transition: transform .22s ease;
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.drawer.open{ transform: translateX(0); }
.drawer-header{ display:flex; align-items:center; justify-content:space-between; padding: 8px 6px 14px; }
.drawer-title{ font-weight:800; color:var(--teal); }
.drawer-link{
  display:block;
  padding: 12px 10px;
  border-radius: 12px;
  text-decoration:none;
  color:var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.drawer-link:focus{
  outline: none;
}
.drawer-link:hover{ background: rgba(31,111,106,.08); }
.drawer-icon{
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.drawer-contact{
  margin-top: auto;
  padding: 16px 10px 12px;
  border-top: 1px solid rgba(0,0,0,.06);
}
.drawer-contact-title{
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 10px;
  font-size: 15px;
}
.drawer-contact-link{
  display: block;
  padding: 8px 0;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-contact-link:hover{
  color: var(--teal);
}
.social-icon{
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.drawer-footer{
  margin-top: 0;
  padding: 16px 10px 30px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-logo{
  width: 40px;
  height: auto;
  margin-bottom: 6px;
  object-fit: contain;
}
.drawer-footer p{
  margin: 0;
  color: var(--muted);
}
.drawer-footer a{
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}
.drawer-footer a:hover{
  text-decoration: underline;
}

/* HOME */
.hero{ 
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("../images/background-menu.jpg") center/cover no-repeat;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 125px;
}
/* Adjust hero bottom when marquee is present */
body.has-marquee .hero{
  bottom: 78px;
}
.hero-bg{
  display: none;
}
.home-grid{
  position:relative;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}
.home-tile{
  background: transparent;
  color: var(--text);
  border-radius: 18px;
  padding: 10px 8px;
  text-decoration:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height: auto;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.home-tile:focus{
  outline: none;
}
.home-tile-wide{ grid-column: 1 / -1; }
.tile-icon{
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255 255 255 / 75%);
  font-size: 34px;
  margin-bottom: 8px;
  overflow: hidden;
  padding: 12px;
  flex-shrink: 0;
}
.category-img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.tile-text{ 
  font-weight: 700; 
  text-align: center; 
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.6);
  font-size: 14px;
  line-height: 1.2;
}

/* MENU NAVIGATION (Food/Drinks/Hookah) */
.menu-nav{
  position: sticky;
  top: 127px;
  z-index: 50;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal2) 100%);
  border-bottom: 2px solid rgba(0,0,0,.1);
}
.menu-tabs{
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.menu-tabs::-webkit-scrollbar{ display: none; }

.menu-tab{
  flex: 0 0 auto;
  min-width: 100px;
  padding: 16px 12px;
  text-align: center;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.menu-tab:focus{
  outline: none;
}
.menu-tab:hover{
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.08);
}
.menu-tab.active{
  color: #fff;
  border-bottom-color: #fff;
  background: rgba(255,255,255,0.15);
}

/* CUSTOM MESSAGE BANNER */
.custom-message-banner{
  position: sticky;
  top: 181px;
  z-index: 45;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: 14px 16px 16px;
  text-align: center;
  box-shadow: 0 1px 0 #fff;
}
.custom-message-content{
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  color: var(--teal);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* TABS BAR (scrollable) */
.tabsbar{
  position: sticky;
  top: 181px;
  z-index: 46;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
/* Adjust position when custom message is present */
.custom-message-banner ~ .tabsbar{
  top: 229px;
}
.tabs{
  display:flex;
  gap:10px;
  padding: 10px 12px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(31,111,106,.3) transparent;
  cursor: grab;
}
.tabs:active{
  cursor: grabbing;
}
.tabs::-webkit-scrollbar{ 
  height: 6px;
}
.tabs::-webkit-scrollbar-track{
  background: transparent;
}
.tabs::-webkit-scrollbar-thumb{
  background: rgba(31,111,106,.3);
  border-radius: 3px;
}
.tabs::-webkit-scrollbar-thumb:hover{
  background: rgba(31,111,106,.5);
}

.tab{
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(31,111,106,.35);
  color: var(--teal);
  text-decoration:none;
  font-weight:700;
  background: #fff;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.tab:focus{
  outline: none;
}
.tab.active{
  background: var(--teal);
  color:#fff;
  border-color: var(--teal);
}

/* MENU LIST */
.menu{ padding: 14px 12px; }
.section-title{
  margin: 14px 4px 10px;
  padding: 10px 12px;
  background: rgba(31,111,106,.10);
  border-radius: 12px;
  font-weight: 900;
  color: var(--teal);
}
.menu-item{
  display:flex;
  gap:12px;
  justify-content:space-between;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.menu-item-name{ font-weight: 800; margin-bottom: 4px; }
.menu-item-desc{ color: var(--muted); font-size: 14px; line-height: 1.3; }
.menu-item-price{ font-weight: 900; white-space: nowrap; }

/* MARQUEE BAR */
.marquee-bar{
  position: sticky;
  top: 231px;
  z-index: 39;
  background: #1a1a1a;
  padding: 10px 0;
  overflow: hidden;
  border-bottom: 2px solid #333;
}
.custom-message-banner ~ .tabsbar ~ .marquee-bar{
  top: 279px;
}
.marquee-bar.home-marquee{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  z-index: 100;
  border-bottom: none;
  border-top: 2px solid #333;
  padding: 24px 0;
}
.marquee-content{
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee-scroll var(--marquee-speed, 30s) linear infinite;
}
.marquee-text{
  color: #ff6b35;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  padding: 0 50px;
  text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}
.marquee-logo{
  height: 20px;
  width: auto;
  object-fit: contain;
  margin: 0 20px;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}
.home-marquee .marquee-text{
  font-size: 30px;
  text-shadow: 0 0 15px rgba(255, 107, 53, 0.6);
}
.home-marquee .marquee-logo{
  height: 40px;
  margin: 0 30px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}
@keyframes marquee-scroll{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-50%); }
}

/* Better tap targets on small screens */
@media (max-width: 380px){
  .home-tile{ min-height: 135px; }
  .tile-icon{ width:76px; height:76px; }
}

/* Hide scrollbar on mobile */
@media (max-width: 768px){
  .tabs{
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar{
    display: none;
  }
}

/* SEARCH MODAL */
.search-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.search-modal-content{
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  margin-top: 60px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.search-modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.search-modal-header h2{
  margin: 0;
  font-size: 20px;
  color: var(--teal);
}
.search-modal-header .icon-btn{
  position: static;
  font-size: 24px;
}
.search-input{
  width: 100%;
  border: none;
  border-bottom: 2px solid rgba(0,0,0,0.08);
  padding: 16px 20px;
  font-size: 16px;
  outline: none;
  font-family: inherit;
}
.search-input:focus{
  border-bottom-color: var(--teal);
}
.search-results{
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
}
.search-result-item{
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  margin-bottom: 8px;
  transition: all 0.2s;
}
.search-result-item:hover{
  background: rgba(31,111,106,0.06);
  border-color: rgba(31,111,106,0.2);
}
.search-result-name{
  font-weight: 700;
  color: var(--text);
}
.search-result-desc{
  font-size: 14px;
  color: var(--muted);
}
.search-result-meta{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.search-result-price{
  font-weight: 700;
  color: var(--teal);
}
.search-no-results{
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 15px;
}
.search-loading{
  text-align: center;
  padding: 30px 20px;
  color: var(--muted);
}

/* Highlight animation for found items */
@keyframes highlight-pulse{
  0%, 100% { background: transparent; }
  50% { background: rgba(255, 200, 0, 0.3); }
}
.menu-item.highlight{
  animation: highlight-pulse 1s ease-in-out 3;
  border: 2px solid #ffc800;
  border-radius: 8px;
  margin: -2px;
}
