@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700;800&display=swap');

/* =======================
   NAVBAR BASE
======================= */
.custom-navbar {
  background-color: #000000 !important;
  border-bottom: 1px solid #ffffff;
}

.custom-navbar,
.custom-navbar * {
  color: #fff !important;
}

/* Brand */
.brand-title {
  font-size: 1.3rem !important;
  line-height: 1.1;
}

.brand-text-container {
  align-items: center !important;
}

.brand-description {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  font-size: clamp(11px, 0.9vw, 13px) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  margin-top: 4px !important;
  margin-bottom: 10px !important;
}

.brand-logo {
  height: 42px !important;
  width: 50px !important;
  border-radius: 10px !important;
  background: transparent !important;
  object-fit: cover;
}

/* =======================
   OPEN / CLOSED BADGE
======================= */
.open-status-container {
  margin-left: 90px;
  width: 120px;
  height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 992px) {
  .open-status-container {
    left: 70px;
    top: 0px !important;
  }
}

.open-status-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.open-status-badge {
  font-size: 0.75rem !important;
  padding: 3px 8px !important;
}

.closed-text {
  font-size: 0.65rem !important;
  margin-top: 1px !important;
  text-align: center !important;
}

.open-status-badge,
.closed-text {
  opacity: 1;
  transition: opacity 1.2s ease-in-out;
}

.open-status-badge.hidden,
.closed-text.hidden {
  opacity: 0;
}

/* =======================
   DESKTOP SEARCH (your real classes)
======================= */
.custom-navbar .search-bar-container .search-input {
  color: #fff !important;
  background: #262626 !important;
  caret-color: #fff !important;
}

.custom-navbar .search-bar-container .search-input::placeholder {
  color: rgba(255, 255, 255, .55) !important;
}

/* If any input is type="search", hide native X/decorations (prevents double X on mobile) */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none !important;
  display: none !important;
}

/* =======================
   AUTOCOMPLETE (single clean version)
======================= */
.autocomplete-wrap {
  position: relative;
  width: 100%;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;

  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;

  margin-top: 6px;
  padding: 8px 0;

  max-height: 300px;
  overflow-y: auto;

  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.20);

  z-index: 9999;
  display: none;
}

.autocomplete-item {
  padding: 10px 18px;
  cursor: pointer;
  color: #fff !important;
  transition: background 0.15s ease;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: #333 !important;
}

.autocomplete-item .name {
  font-size: 15px;
  font-weight: 600;
  color: #fff !important;
}

.autocomplete-item .meta {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 12px !important;
}

.autocomplete-item .category {
  color: #adb5bd !important;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.autocomplete-item .price {
  font-weight: bold !important;
  color: #ffd700 !important;
}


/* Your JS floats this list (keep it above) */
#autocompleteListDesktop {
  z-index: 2147483647 !important;
}

/* =======================
   HEADER BUTTONS
======================= */
.reserve-btn,
.custom-cart-btn,
.header-btn {
  background-color: #ffc107 !important;
  color: #000 !important;
  border: none !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
}

.navbar-nav .nav-item a {
  margin-left: 0 !important;
}

/* =======================
   CART BUTTON & BADGE
======================= */
.custom-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.custom-cart-btn *,
.sm-mobile-cart-btn * {
  text-decoration: none !important;
}

.cart-icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-icon {
  stroke: #111 !important;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #E74C3C !important;
  color: #fff !important;
  font-size: 11px !important;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px !important;
  font-weight: 800 !important;
  border: 2px solid #FFC107 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  line-height: 1;
  padding: 0 4px !important;
  z-index: 2;
}

/* =======================
   CATEGORY BAR (desktop)
======================= */
.category-bar {
  background-color: #000000 !important;
  position: relative;
  z-index: 50;
  padding-top: 8px;
  padding-bottom: 8px;
  margin-top: 5px;
}

@media (min-width: 992px) {
  .category-bar {
    position: sticky !important;
    top: 0; /* Just the category bar sticks to the top */
    z-index: 1020;
    background-color: #000000 !important; /* Solid background when sticking */
  }
}

.category-row {
  display: flex;
  align-items: center;
}


/* =======================
   HAMBURGER ICON (desktop header still has toggler)
======================= */
.navbar-toggler {
  border: none !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='3' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* =======================
   CLEAR BUTTON (square, flush end, centered)
======================= */
.has-clear {
  padding-right: 52px !important;
}

.search-clear-btn {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;

  width: 28px !important;
  height: 28px !important;
  border: 0 !important;
  border-radius: 999px !important;

  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;

  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
  transform: translateY(-50%) scale(1.05) !important;
}

.search-clear-btn:active {
  transform: translateY(-50%) translateY(1px) scale(.97) !important;
}

.search-clear-btn:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, .45) !important;
}

/* ==========================
   FIX: Desktop autocomplete text invisible
   (navbar forces white text)
========================== */
/* Autocomplete list (Global for Desktop + Mobile Modal) */
.autocomplete-list {
  background: #262626 !important;
  border: 1px solid #444 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
}

/* Base colors are now handled in the main section to avoid conflicts */


/* ==========================
   FIX: Desktop autocomplete behind category bar
========================== */

/* 1) Nothing should clip the dropdown */
.custom-navbar,
.custom-navbar .container,
.custom-navbar .container-fluid,
.custom-navbar .navbar-collapse {
  overflow: visible !important;
}

/* 2) Navbar should sit above category bar but below modals */
.custom-navbar {
  position: relative !important;
  z-index: 1030 !important;
}

/* 3) Dropdown must be the top layer */
.custom-navbar #autocompleteListDesktop {
  position: absolute !important;
  z-index: 999999 !important;
}

/* 4) Keep category bar lower than dropdown */
.category-bar {
  position: relative !important;
  z-index: 100 !important;
}

/* ============================
   DESKTOP: Category bar in ONE row (no wrapping)
============================ */
@media (min-width: 992px) {
  .category-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 12px;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    padding: 6px 12px !important;
    /* space so first/last pill not cut */

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge legacy */
  }

  .category-scroll::-webkit-scrollbar {
    display: none !important;
    /* Chrome/Safari */
  }

  /* Make buttons fit their text cleanly without wrapping on Desktop */
  .category-pill {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    word-break: normal !important;
    text-align: center !important;
    padding: 6px 16px !important; /* Reduced vertical padding */
    min-height: 42px !important;
    height: auto !important;
    line-height: normal !important;
  }
}

/* ============================
   DESKTOP: remove side "bars" on category strip
============================ */
@media (min-width: 992px) {

  /* remove bootstrap container left/right padding ONLY for the category bar */
  .category-bar .container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}


/* =========================================================
   Professional Search Styling (Desktop + Modal)
   Paste at the very bottom of /public/assets/header.css
========================================================= */

/* Uniform spacing for Search + Buttons */
@media (min-width: 992px) {
  #mainNav {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;
    /* The equal gap */
  }

  .header-desktop .custom-navbar #mainNav .search-bar-container {
    margin: 0 auto !important;
    /* Centers it in the available space */
  }

  .navbar-nav {
    margin-left: 0 !important;
    gap: 14px !important;
  }
}

/* Shared “pro” look for both desktop + mobile modal inputs */
.header-desktop .search-bar-container .autocomplete-wrap,
.mobile-search-form-modal .autocomplete-wrap {
  position: relative;
  width: 100%;
}

/* Desktop search input */
@media (min-width: 992px) {

  .header-desktop .search-bar-container .search-input,
  #dishSearchDesktop {
    height: 44px;
    border-radius: 999px !important;
    /* pill */
    border: 1px solid #404040 !important;
    background: #262626 !important;
    /* dark charcol look */
    color: #fff !important;
    caret-color: #fff !important;
    padding: 0 46px 0 16px;
    /* room for clear button */
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  }

  .header-desktop .search-bar-container .search-input::placeholder,
  #dishSearchDesktop::placeholder {
    color: #adb5bd !important;
  }

  .header-desktop .search-bar-container .search-input:focus,
  #dishSearchDesktop:focus {
    outline: none !important;
    background-color: #262626 !important;
    border-color: #FFD700 !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2) !important;
  }
}

.mobile-search-input,
#dishSearch {
  height: 46px;
  border-radius: 999px !important;
  border: 1px solid #404040 !important;
  background: #262626 !important;
  color: #fff !important;
  caret-color: #fff !important;
  padding: 0 46px 0 16px;
  /* room for clear button */
  font-weight: 500;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.mobile-search-input:focus,
#dishSearch:focus {
  outline: none !important;
  background-color: #262626 !important;
  border-color: #FFD700 !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.4) !important;
}

/* Clear button: nicer, consistent placement */
/* Consistently rounded clear button */
.autocomplete-wrap .search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff !important;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.autocomplete-wrap .search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.05);
}

.autocomplete-wrap .search-clear-btn:hover {
  background: rgba(0, 0, 0, 0.10);
}

.autocomplete-wrap .search-clear-btn:active {
  transform: translateY(-50%) scale(0.96);
}

/* Autocomplete dropdown: cleaner, more “app-like” */
.autocomplete-list {
  margin-top: 8px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #444 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background: #262626 !important;
}

/* Additional adjustments for pro look */
.autocomplete-item {
  padding: 10px 12px;
}


/* ✅ FIX: Clear button looks too “bubbly” — make it clean/pro */
@media (min-width: 992px) {
  /* desktop only */

  /* give a bit more room so text never touches the button */
  #dishSearchDesktop {
    padding-right: 56px !important;
  }

  .header-desktop .autocomplete-wrap .search-clear-btn {
    width: 30px !important;
    height: 30px !important;
    right: 14px !important;

    background: transparent !important;
    /* remove big grey bubble */
    border: 0 !important;

    color: rgba(0, 0, 0, 0.55) !important;
    /* darker X for white input */
    opacity: 0.9;
  }

  .header-desktop .autocomplete-wrap .search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
  }

  /* slightly smaller icon so it looks premium */
  .header-desktop .autocomplete-wrap .search-clear-btn svg {
    width: 16px !important;
    height: 16px !important;
  }
}

/* ✅ Extreme CSS-based visibility (Direct Sibling + Max Z-Index) */
.search-input:not(:placeholder-shown) + .search-clear-btn {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 2147483647 !important;
}

/* ✅ High-specificity color override (prevents navbar * {color: #fff} from hiding it) */
.header-desktop .custom-navbar .search-clear-btn,
.header-desktop .custom-navbar .search-clear-btn svg,
.header-desktop .custom-navbar .search-clear-btn * {
  color: #000 !important;
  fill: #000 !important;
}

/* ✅ Apple-like divider before the clear X (desktop only) */
@media (min-width: 992px) {

  .header-desktop .autocomplete-wrap {
    position: relative;
  }

  /* vertical divider line */
  .header-desktop .autocomplete-wrap .search-clear-btn::before {
    content: "";
    position: absolute;
    left: -10px;
    /* distance from the button */
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 25px;
    background: rgba(255, 255, 255, 0.15);
  }

  /* keep hover nice */
  .header-desktop .autocomplete-wrap .search-clear-btn:hover::before {
    background: rgba(11, 11, 11, 0.12);
  }
}

/* ✅ Desktop circular clear button: premium feel */
@media (min-width: 992px) {
  .header-desktop .autocomplete-wrap .search-clear-btn {
    background: transparent !important;
    border: none !important;
    color: #111 !important; /* Default dark for light theme case */
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    z-index: 2147483647 !important;
    display: none;
    /* Initially hidden, shown by CSS or JS */
  }

  .header-desktop .autocomplete-wrap .search-clear-btn:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #000 !important;
  }
}

/* =========================================================
   Desktop header buttons: pill/rounded like the search box
   File: /public/assets/header.css
   Insert at: VERY BOTTOM
========================================================= */
@media (min-width: 992px) {

  /* Make all header buttons pill-shaped + consistent height */
  .header-desktop .navbar-nav .btn,
  .header-desktop a.custom-cart-btn {
    border-radius: 999px !important;
    min-height: 44px;
    /* match search height vibe */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    /* nice pill padding */
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: transform .12s ease, box-shadow .12s ease;
  }

  /* Slight lift on hover for a more premium feel */
  .header-desktop .navbar-nav .btn:hover,
  .header-desktop a.custom-cart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  }

  .header-desktop .navbar-nav .btn:active,
  .header-desktop a.custom-cart-btn:active {
    transform: translateY(0);
    box-shadow: none;
  }

  /* Premium Cart button styling */
  .header-desktop a.custom-cart-btn {
    gap: 8px;
    padding: 0 18px !important;
    background: linear-gradient(145deg, #FFD000, #FFC107) !important;
    border: 1px solid #E6AE06 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
  }

  .header-desktop a.custom-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15) !important;
    background: linear-gradient(145deg, #FFE033, #FFD000) !important;
  }

  .custom-cart-btn .cart-text {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2px;
    color: #111 !important;
  }
}

/* ✅ Desktop only: align OPEN + CLOSED badge (and closed text) same */
@media (min-width: 992px) {

  /* Nudge BOTH OPEN + CLOSED badges left */
  .header-desktop .open-status-inner .open-status-badge {
    position: relative;
    left: -65px;
  }

  /* Nudge closed note left + align text nicely */
  .header-desktop .open-status-inner .closed-text {
    position: relative;
    left: -65px;
    text-align: left;
  }
}