/* ==========================================================================
   FEATURE: NAVBAR & TOP DELIVERY BAR
   ========================================================================== */

/* 1. TOP DELIVERY ADDRESS BAR */
.top-delivery-bar {
  background: #000A46;
  color: #FFFFFF;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.top-delivery-container {
  max-width: var(--max-width, 1280px);
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-delivery-address {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  user-select: none;
}

.top-delivery-address:hover {
  opacity: 0.9;
}

.top-delivery-pin {
  font-size: 14px;
}

.top-delivery-text {
  font-weight: 500;
  max-width: 500px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-delivery-btn {
  background: #FB3E38;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  margin-inline-start: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
}

.top-delivery-btn:hover {
  background: #E02822;
}

.top-delivery-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.95;
}

/* 2. MAIN WEBSITE NAVBAR */
.website-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg, #F6F6EE);
  border-bottom: 1px solid #F1F5F9;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.navbar-container {
  max-width: var(--max-width, 1280px);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: 1;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.navbar-logo img {
  height: 48px;
  max-width: 180px;
  object-fit: contain;
}

.navbar-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-link {
  position: relative;
  font-size: 14.5px;
  font-weight: 600;
  color: #28313D;
  padding: 8px 10px;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}

.navbar-link:hover {
  color: var(--hover-red, #E02822);
}

.navbar-link.active {
  color: var(--primary-red, #FB3E38);
  font-weight: 700;
}

.navbar-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10px;
  right: 10px;
  height: 3px;
  background: var(--primary-red, #FB3E38);
  border-radius: 4px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 3. SEARCH BOX */
.navbar-search-box {
  position: relative;
  width: 220px;
  min-width: 140px;
}

.navbar-search-inner {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 7px 14px;
  transition: all 0.2s ease;
}

.navbar-search-inner:focus-within {
  border-color: var(--primary-red, #FB3E38);
  box-shadow: 0 0 0 3px rgba(251, 62, 56, 0.12);
}

.navbar-search-inner input {
  flex: 1;
  background: transparent;
  padding: 0 8px;
  font-size: 13.5px;
  border: none;
  outline: none;
  color: #1E293B;
  min-width: 0;
}

.navbar-search-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid #E2E8F0;
  margin-top: 8px;
  z-index: 1000;
  max-height: 350px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}

.search-result-item:hover {
  background: #F8FAFC;
}

.search-result-item img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #E2E8F0;
}

/* 4. LANGUAGE SWITCH PILL */
.navbar-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 0 14px;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  white-space: nowrap;
  flex-shrink: 0;
}

#lang-btn-text {
  white-space: nowrap;
}

.navbar-action-pill:hover {
  border-color: rgba(251, 62, 56, 0.4);
  color: var(--primary-red, #FB3E38);
  background: #FFF8F8;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(251, 62, 56, 0.1);
}

/* 5. ACTION BOX (CART TRIGGER) */
.navbar-action-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
}

.navbar-action-box svg {
  color: #334155;
  transition: color 0.2s ease, transform 0.2s ease;
}

.navbar-action-box:hover {
  background: #FFF8F8;
  border-color: rgba(251, 62, 56, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(251, 62, 56, 0.1);
}

.navbar-action-box:hover svg {
  color: var(--primary-red, #FB3E38);
  transform: scale(1.08);
}

/* 6. ACCOUNT / LOGIN BOX */
.navbar-account-box {
  width: auto;
  min-width: unset;
  padding: 0 16px;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-account-box svg {
  color: var(--primary-red, #FB3E38);
  flex-shrink: 0;
}

.navbar-account-box span,
#navbar-auth-btn {
  font-size: 13.5px;
  font-weight: 700;
  color: #1E293B;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.navbar-account-box:hover span {
  color: var(--primary-red, #FB3E38);
}

/* 7. CART BADGE */
.cart-badge-count {
  position: absolute;
  top: -6px;
  left: -6px;
  background: linear-gradient(135deg, #FB3E38 0%, #D9221C 100%);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(251, 62, 56, 0.35);
  animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[dir="ltr"] .cart-badge-count {
  right: -6px;
  left: auto;
}

@keyframes badgePop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 8. RESPONSIVE MEDIA QUERIES */
@media (max-width: 1200px) {
  .navbar-container {
    padding: 8px 16px;
    gap: 12px;
  }
  .navbar-nav-links {
    gap: 12px;
  }
  .navbar-link {
    font-size: 13.5px;
    padding: 6px 8px;
  }
  .navbar-search-box {
    width: 180px;
    min-width: 130px;
  }
}

@media (max-width: 992px) {
  .navbar-container {
    flex-direction: column;
    padding: 8px 14px 10px;
    gap: 8px;
  }
  .navbar-top-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .navbar-nav-links {
    display: none;
  }
  .navbar-logo img {
    height: 38px;
    max-width: 135px;
  }
  .navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .navbar-search-box {
    display: block !important;
    width: 100%;
    min-width: 100%;
    margin-top: 2px;
  }
  .navbar-search-inner {
    width: 100%;
    padding: 8px 14px;
    border-radius: 12px;
  }
}

@media (max-width: 580px) {
  .top-delivery-phone {
    display: none;
  }
  .top-delivery-container {
    justify-content: center;
    padding: 5px 12px;
  }
  .top-delivery-text {
    max-width: 220px;
    font-size: 11.5px;
  }
  .navbar-container {
    padding: 6px 12px 8px;
    gap: 6px;
  }
  .navbar-top-row {
    gap: 8px;
  }
  .navbar-logo img {
    height: 34px;
    max-width: 115px;
  }
  .navbar-actions {
    gap: 6px;
  }
  .navbar-action-pill {
    padding: 0 8px;
    font-size: 11.5px;
    height: 36px;
  }
  .navbar-action-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  .navbar-account-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    justify-content: center;
  }
  .navbar-account-box span, #navbar-auth-btn {
    display: none !important;
  }
  .navbar-search-box {
    width: 100%;
    min-width: 100%;
  }
  .navbar-search-inner {
    padding: 6px 12px;
  }
  .navbar-search-inner input {
    font-size: 13px;
  }
}

/* ==========================================================================
   9. MOBILE HAMBURGER BUTTON & SLIDE-OUT DRAWER
   ========================================================================== */

.navbar-hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
  padding: 0;
}

.navbar-hamburger-btn:hover {
  background: #FFF8F8;
  border-color: rgba(251, 62, 56, 0.4);
  color: var(--primary-red, #FB3E38);
  transform: translateY(-2px);
}

@media (max-width: 992px) {
  .navbar-hamburger-btn {
    display: inline-flex;
  }
}

@media (max-width: 580px) {
  .navbar-hamburger-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
}

/* Mobile Drawer Backdrop */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 10, 70, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Drawer Container */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 310px;
  max-width: 85vw;
  background: #FFFFFF;
  z-index: 1201;
  box-shadow: 0 0 35px rgba(0, 10, 70, 0.25);
  display: flex;
  flex-direction: column;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

/* RTL Placement (Default) */
[dir="rtl"] .mobile-nav-drawer {
  right: 0;
  left: auto;
  transform: translateX(100%);
}

[dir="rtl"] .mobile-nav-drawer.active {
  transform: translateX(0);
}

/* LTR Placement */
[dir="ltr"] .mobile-nav-drawer {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

[dir="ltr"] .mobile-nav-drawer.active {
  transform: translateX(0);
}

/* Drawer Header */
.mobile-drawer-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #F1F5F9;
  background: #FAFBF9;
}

.mobile-drawer-brand {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.mobile-drawer-brand img {
  height: 36px;
  max-width: 140px;
  object-fit: contain;
}

.mobile-drawer-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #64748B;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer-close-btn:hover {
  background: #FEE2E2;
  color: #FB3E38;
  border-color: #FCA5A5;
}

/* Drawer Body */
.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* User Card in Drawer */
.mobile-drawer-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #FFF5F5 0%, #FFF8EE 100%);
  border: 1px solid #FED7AA;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-drawer-user-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 62, 56, 0.1);
}

.mobile-drawer-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FB3E38;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-drawer-user-avatar svg {
  color: #FFFFFF;
}

.mobile-drawer-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-drawer-user-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #000A46;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-drawer-user-sub {
  font-size: 11.5px;
  color: #64748B;
  margin-top: 1px;
}

/* Address shortcut */
.mobile-drawer-address-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mobile-drawer-address-box:hover {
  background: #F1F5F9;
}

.mobile-addr-icon {
  font-size: 16px;
}

.mobile-addr-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mobile-addr-label {
  font-size: 11px;
  font-weight: 700;
  color: #FB3E38;
}

.mobile-addr-val {
  font-size: 12px;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.mobile-addr-arrow {
  font-size: 16px;
  color: #94A3B8;
  font-weight: 700;
}

/* Navigation List in Drawer */
.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #1E293B;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.mobile-nav-item:hover {
  background: #F8FAFC;
  color: #FB3E38;
}

.mobile-nav-item.active {
  background: #FFF1F0;
  color: #FB3E38;
  border-inline-start: 4px solid #FB3E38;
}

.mobile-nav-icon {
  font-size: 18px;
  width: 24px;
  display: inline-flex;
  justify-content: center;
}

.mobile-nav-label {
  flex: 1;
}

.mobile-nav-badge {
  background: linear-gradient(135deg, #FB3E38 0%, #D9221C 100%);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(251, 62, 56, 0.3);
  letter-spacing: 0.3px;
  animation: badgePulse 2s infinite ease-in-out;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.mobile-nav-item-highlight {
  background: #FFF8F8;
  border: 1px dashed rgba(251, 62, 56, 0.3);
}

/* Footer Actions in Drawer */
.mobile-drawer-footer-actions {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-drawer-lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  color: #1E293B;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.mobile-drawer-lang-btn:hover {
  border-color: #FB3E38;
  color: #FB3E38;
  background: #FFF8F8;
}

.mobile-drawer-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  background: #000A46;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}

.mobile-drawer-call-btn:hover {
  background: #0A1968;
}

/* ==========================================================================
   10. MOBILE BOTTOM NAVIGATION BAR
   Clean, app-like fixed bottom bar for mobile screens
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 8px) !important;
  }

  .floating-cart-widget {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    z-index: 1050;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(0, 10, 70, 0.06);
    user-select: none;
  }

  .mobile-bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    padding: 6px 10px;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 1;
    max-width: 80px;
    font-family: inherit;
  }

  .mobile-bottom-tab-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
  }

  .mobile-bottom-tab-icon svg {
    color: currentColor;
    transition: stroke 0.2s ease;
  }

  .mobile-bottom-tab-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    transition: color 0.2s ease;
  }

  .mobile-bottom-tab:hover {
    color: var(--primary-red, #FB3E38);
  }

  .mobile-bottom-tab.active {
    color: var(--primary-red, #FB3E38);
  }

  .mobile-bottom-tab.active .mobile-bottom-tab-icon {
    transform: translateY(-2px);
  }

  .mobile-bottom-tab.active .mobile-bottom-tab-label {
    font-weight: 800;
    color: var(--primary-red, #FB3E38);
  }

  .mobile-bottom-tab.active::after {
    content: '';
    position: absolute;
    top: 0;
    width: 24px;
    height: 3px;
    background: var(--primary-red, #FB3E38);
    border-radius: 0 0 3px 3px;
  }

  /* RECIPES TAB HIGHLIGHT */
  .mobile-bottom-tab-recipes .recipes-tab-emoji {
    font-size: 20px;
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s ease;
  }

  .mobile-bottom-tab-recipes.active .recipes-tab-emoji {
    transform: scale(1.18);
  }

  .mobile-bottom-tab-recipes .recipes-tab-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #FB3E38;
    box-shadow: 0 0 6px #FB3E38;
    display: block;
  }

  /* CART TAB BADGE */
  .mobile-tab-cart-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    left: auto;
    font-size: 10px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
  }

  [dir="ltr"] .mobile-tab-cart-badge {
    right: -7px;
    left: auto;
  }
}

