/* PREMIUM NAVBAR OVERRIDE - CENTRALIZED AND STRICTLY SEPARATED */

/* ── 1. GLOBAL NAVBAR STRUCTURE ─────────────────────────────── */
.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 1050 !important;
  background: linear-gradient(180deg, rgba(12, 12, 10, .98), rgba(4, 4, 4, .96)) !important;
  border-bottom: 1px solid rgba(201, 168, 76, .32) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45), 0 1px 18px rgba(201, 168, 76, .10) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.navbar-brand {
  display: flex !important;
  align-items: center !important;
}

.navbar-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* ── 2. DESKTOP NAVIGATION (Horizontal Links) ───────────────── */
.navbar-nav {
  display: flex !important;
  gap: 15px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
}

.nav-item {
  margin: 0 !important;
}

.nav-link,
.nav-link:visited {
  border-radius: 999px !important;
  padding: 8px 18px !important;
  transition: all 0.35s cubic-bezier(.22, .61, .36, 1) !important;
  border: 1px solid transparent !important;
  position: relative;
  overflow: hidden;
  display: flex !important;
  align-items: center !important;
  height: auto !important;
  text-decoration: none !important;
  color: rgba(245, 238, 220, 0.82) !important;
}

.nav-link:hover {
  color: #E2C97E !important;
  background: rgba(201, 168, 76, 0.05) !important;
}

.nav-link::after {
  display: none !important;
}

/* Remove old underline */

.nav-link.active {
  color: #F4D77A !important;
  background: radial-gradient(circle at 50% 100%, rgba(255, 215, 120, .22), transparent 45%), linear-gradient(180deg, rgba(201, 168, 76, .15), rgba(201, 168, 76, .04)) !important;
  border: 1px solid rgba(226, 201, 126, .75) !important;
  box-shadow: 0 0 18px rgba(201, 168, 76, .28), inset 0 0 14px rgba(201, 168, 76, .12) !important;
  font-weight: 600 !important;
}

.nav-link:hover::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 10px;
  background: radial-gradient(circle, rgba(255, 215, 120, 0.8), transparent 70%);
  filter: blur(4px);
  opacity: 0.8;
  pointer-events: none;
}

/* ── 3. PANIER & WHATSAPP ───────────────────────────────────── */
.nav-cart {
  background: linear-gradient(145deg, #151515, #050505) !important;
  border: 1px solid rgba(201, 168, 76, 0.5) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 0 8px rgba(201, 168, 76, 0.15) !important;
  border-radius: 12px !important;
  transition: all 0.35s cubic-bezier(.22, .61, .36, 1) !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 12px !important;
  gap: 8px !important;
  color: #fff !important;
  position: relative !important;
}

.nav-cart:hover {
  border-color: rgba(226, 201, 126, 0.9) !important;
  box-shadow: 0 6px 16px rgba(201, 168, 76, 0.25), inset 0 0 12px rgba(201, 168, 76, 0.2) !important;
  transform: translateY(-2px) !important;
}

.nav-cart-icon {
  font-size: 1.1rem !important;
}

.nav-cart-count {
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  background: #C9A84C !important;
  color: #000 !important;
  border-radius: 50% !important;
  min-width: 18px !important;
  height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  z-index: 10 !important;
}

.btn-whatsapp,
.navbar-whatsapp {
  background: linear-gradient(145deg, #25D366, #1da851) !important;
  color: #fff !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3) !important;
  transition: all 0.35s cubic-bezier(.22, .61, .36, 1) !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 16px !important;
  gap: 8px !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.btn-whatsapp:hover,
.navbar-whatsapp:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4) !important;
  filter: brightness(1.1) !important;
  background: linear-gradient(145deg, #25D366, #1da851) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* ── 4. MOBILE MENU & DRAWER (BASE STYLES) ──────────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 6, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: rgba(10, 10, 10, 0.98) !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  border-left: 1px solid rgba(201, 168, 76, 0.2) !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8) !important;
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.10);
}

.drawer-close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.drawer-close:hover {
  transform: rotate(90deg);
}

.drawer-nav {
  list-style: none;
  padding: 24px 28px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
}

.drawer-link {
  color: rgba(255, 255, 255, 0.8) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  padding: 12px 16px !important;
  display: block !important;
  text-decoration: none !important;
  font-size: 1.1rem;
  font-weight: 500;
}

.drawer-link:hover,
.drawer-link.active {
  color: #F4D77A !important;
  background: rgba(201, 168, 76, 0.1) !important;
  border-left: 3px solid #C9A84C !important;
  font-weight: 600 !important;
}

.drawer-footer {
  padding: 24px 28px;
  border-top: 1px solid rgba(201, 168, 76, 0.10);
}

.drawer-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(145deg, #25D366, #1da851);
  color: #fff;
  text-decoration: none;
  padding: 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.hamburger {
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: border-color 0.22s ease, background 0.22s ease;
}

.hamburger:hover {
  border-color: rgba(201, 168, 76, 0.40);
  background: rgba(201, 168, 76, 0.06);
}

/* ── 5. STRICT RESPONSIVE SEPARATION ────────────────────────── */

/* DESKTOP RULES (min-width: 769px) */
@media (min-width: 769px) {

  /* Show Desktop Items */
  .navbar-nav {
    display: flex !important;
  }

  .navbar {
    padding: 0 40px !important;
    height: 84px !important;
  }

  .navbar-brand img {
    height: 90px !important;
    max-height: 90px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  /* Hide ALL Mobile Items */
  .mobile-drawer,
  .nav-overlay,
  .hamburger,
  .bottom-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* TABLET/MEDIUM DESKTOP ADJUSTMENTS */
@media (max-width: 992px) {
  .nav-link {
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
  }
}

/* MOBILE RULES (max-width: 768px) */
@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .cart-drawer {
    width: min(390px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    right: 12px !important;
    transform: translateX(calc(100% + 24px)) !important;
  }

  .cart-drawer.is-open {
    transform: translateX(0) !important;
  }

  .navbar {
    height: 60px !important;
    padding: 0 16px !important;
  }

  /* Hide Desktop Items */
  .navbar-nav {
    display: none !important;
  }

  /* Adapt Actions for Mobile */
  .navbar-whatsapp span {
    display: none !important;
  }

  /* Hide text, keep icon */
  .navbar-whatsapp {
    padding: 8px !important;
    border-radius: 50% !important;
  }

  /* Make rounder */

  /* Show Mobile Items */
  .hamburger {
    display: flex !important;
  }

  /* We don't force .mobile-drawer display:flex here because it handles visibility via translate/active class,
       but we ensure it is NOT display:none */
}

/* -- 6. FLOATING CHAT WIDGET ---------------------------- */
.chat-widget {
  position: fixed;
  bottom: 84px;
  right: 16px;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle at top left, #F4D77A, #C9A84C);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.4);
  z-index: 9998;
  transition: transform 0.2s;
}

.chat-widget:hover {
  transform: scale(1.05);
}

@media (max-width: 1024px) {
  .chat-widget {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 10px) !important;
    right: 12px !important;
    width: 46px !important;
    height: 46px !important;
  }

  #chat-frame-container {
    width: calc(100vw - 24px) !important;
    right: 12px !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 60px) !important;
    height: min(520px, calc(100vh - 180px)) !important;
  }
}

@media (max-width: 768px) {
  .chat-widget {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px) + 8px) !important;
    right: 10px !important;
    width: 44px !important;
    height: 44px !important;
  }

  #chat-frame-container {
    width: calc(100vw - 20px) !important;
    right: 10px !important;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px) + 56px) !important;
    height: min(480px, calc(100vh - 160px)) !important;
  }
}

@media (max-width: 390px) {
  .chat-widget {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px) + 8px) !important;
    right: 8px !important;
    width: 42px !important;
    height: 42px !important;
  }
}


/* -- 7. PREMIUM MOBILE BOTTOM NAV ---------------------------- */
@media (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }
}

@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden !important;
    padding-bottom: 96px !important;
  }

  .bottom-nav {
    position: fixed !important;
    left: 50% !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;

    width: calc(100vw - 24px) !important;
    max-width: 430px !important;
    height: 74px !important;
    z-index: 9997 !important;
    overflow: visible !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;

    padding: 8px 12px !important;
    margin: 0 !important;

    background:
      linear-gradient(180deg, rgba(14, 14, 12, .98), rgba(3, 3, 3, .98)) !important;

    border: 1px solid rgba(201, 168, 76, .42) !important;
    border-radius: 999px !important;

    box-shadow:
      0 16px 38px rgba(0, 0, 0, .72),
      0 0 22px rgba(201, 168, 76, .14) !important;
  }

  .bottom-nav,
  .bottom-nav * {
    box-sizing: border-box !important;
  }

  .b-nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .bottom-nav a,
  .bottom-nav a:visited,
  .bottom-nav a:hover,
  .bottom-nav a:active,
  .bottom-nav a:focus {
    text-decoration: none !important;
  }

  .b-nav-item,
  .b-nav-item:visited,
  .b-nav-item:hover,
  .b-nav-item:active,
  .b-nav-item:focus,
  .b-nav-center,
  .b-nav-center:visited,
  .b-nav-center:hover,
  .b-nav-center:active,
  .b-nav-center:focus {
    width: 20% !important;
    height: 58px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;

    color: rgba(245, 238, 220, .62) !important;
    text-decoration: none !important;

    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;

    -webkit-tap-highlight-color: transparent !important;

    transition:
      color .25s ease,
      transform .25s ease,
      opacity .25s ease !important;
  }

  .b-nav-circle,
  .b-nav-center-circle {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;

    display: grid !important;
    place-items: center !important;

    color: rgba(245, 238, 220, .62) !important;
    background: rgba(255, 255, 255, .025) !important;
    border: 1px solid rgba(245, 238, 220, .10) !important;

    transition:
      transform .28s cubic-bezier(.22, .61, .36, 1),
      color .25s ease,
      background .25s ease,
      border-color .25s ease,
      box-shadow .25s ease !important;
  }

  .b-nav-circle svg,
  .b-nav-center-circle svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    color: currentColor !important;
  }

  .b-nav-label,
  .b-nav-center-label {
    color: currentColor !important;
    white-space: nowrap !important;
    text-align: center !important;
    opacity: .85 !important;
    text-decoration: none !important;
  }

  .b-nav-item.active,
  .b-nav-item.active:visited,
  .b-nav-item.active:hover,
  .b-nav-center.active,
  .b-nav-center.active:visited,
  .b-nav-center.active:hover {
    color: #F3D978 !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
  }

  .b-nav-item.active .b-nav-circle,
  .b-nav-center.active .b-nav-center-circle {
    width: 46px !important;
    height: 46px !important;
    color: #0A0A0A !important;

    background:
      radial-gradient(circle at 35% 25%, #FFF3A7 0%, #E2C75F 45%, #C9A84C 100%) !important;

    border-color: rgba(255, 232, 150, .9) !important;

    box-shadow:
      0 10px 24px rgba(201, 168, 76, .34),
      0 0 22px rgba(201, 168, 76, .28),
      inset 0 1px 0 rgba(255, 255, 255, .45) !important;

    transform: translateY(-10px) scale(1.03) !important;
  }

  .b-nav-item.active .b-nav-label,
  .b-nav-center.active .b-nav-center-label {
    color: #F3D978 !important;
    opacity: 1 !important;
    text-shadow: 0 0 10px rgba(201, 168, 76, .34) !important;
  }

  .b-nav-item:not(.active):hover,
  .b-nav-center:not(.active):hover {
    color: rgba(243, 217, 120, .9) !important;
  }

  .chat-widget {
    bottom: 98px !important;
    z-index: 9998 !important;
  }

  #chat-frame-container {
    bottom: 158px !important;
    z-index: 9998 !important;
  }
}