/* ================================================================
   MBS — Navbar y Footer
================================================================ */

/* ── NAVBAR ─────────────────────────────────────────────────── */
:root { --navbar-h: 100px; }
@media (max-width: 640px) { :root { --navbar-h: 72px; } }
/* El header usa un contenedor mas ancho que el resto de la pagina para que
   el logo no quede tan metido hacia el centro en pantallas grandes. */
.navbar .container { max-width: 1600px; }
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  border-bottom: 3px solid var(--orange);
  height: var(--navbar-h);
  display: flex;
  align-items: center;
}
.navbar__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
}
.navbar__logo {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
}
.navbar__logo img {
  height: 84px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  vertical-align: middle;
}
@media (max-width: 968px) {
  .navbar__actions,
  .navbar__hamburger { flex-shrink: 0; }
}
@media (max-width: 640px) {
  .navbar .container { padding-left: 12px; padding-right: 12px; }
  .navbar__logo img { height: 48px; max-width: 100%; }
}
@media (max-width: 480px) {
  .navbar__actions { gap: 4px; }
  .navbar__logo img { height: 44px; }
}
.navbar__logo-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .04em;
}
.navbar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}
.navbar__nav a {
  color: rgba(255,255,255,.75);
  font-size: .95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}
.navbar__nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 14px; right: 14px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 2px;
}
.navbar__nav a:hover,
.navbar__nav a.active {
  color: var(--white);
}
.navbar__nav a:hover::after,
.navbar__nav a.active::after { transform: scaleX(1); }

/* Barra de búsqueda */
.navbar__search {
  flex: 1;
  /* Sin tope: el buscador ocupa todo el espacio libre del header.
     El ancho maximo real lo pone el contenedor de 1600px. */
  max-width: none;
  position: relative;
}
.navbar__search input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 42px;
  border-radius: 20px;
  border: none;
  background: rgba(255,255,255,.1);
  color: var(--white);
  font-size: .9rem;
  transition: var(--transition);
}
.navbar__search input::placeholder { color: rgba(255,255,255,.45); }
.navbar__search input:focus {
  outline: none;
  background: rgba(255,255,255,.18);
  box-shadow: 0 0 0 2px var(--electric);
}
.navbar__search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.5);
  pointer-events: none;
}

/* Buscador dentro del menú móvil (oculto en escritorio) */
.navbar__nav__search { display: none; }

/* Acciones del navbar (carrito, usuario) */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.navbar__cart {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  transition: var(--transition);
  cursor: pointer;
}
.navbar__cart:hover { background: rgba(255,255,255,.2); }
.navbar__cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--orange);
  border-radius: 50%;
  font-size: .65rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--navy);
}
.navbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.1);
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.navbar__user:hover { background: rgba(255,255,255,.18); }
.navbar__user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  position: relative;
}
.navbar__user-avatar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  background: #4CAF50;
  border-radius: 50%;
  border: 2px solid var(--navy);
}
.navbar__user-name {
  font-size: .85rem;
  font-weight: 500;
}
.navbar__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  overflow: hidden;
  display: none;
  border: 1px solid var(--gray-100);
  z-index: 100;
}
.navbar__user:hover .navbar__dropdown,
.navbar__user.open .navbar__dropdown { display: block; }
.navbar__dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: .9rem;
  color: var(--gray-900);
  transition: var(--transition);
}
.navbar__dropdown a:hover { background: var(--gray-50); color: var(--navy); }
.navbar__dropdown hr {
  border: none;
  border-top: 1px solid var(--gray-100);
}
.navbar__dropdown .logout {
  color: var(--red);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: .9rem;
  transition: var(--transition);
}
.navbar__dropdown .logout:hover { background: var(--red-lite); }
.navbar__btn-login {
  padding: 8px 20px;
  background: var(--orange);
  color: var(--white) !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  transition: var(--transition);
}
.navbar__btn-login:hover {
  background: var(--orange-lite) !important;
  transform: none;
}

/* ── Campana de notificaciones (cliente) ─────────────────────── */
.navbar__notif-wrap {
  position: relative;
}
.navbar__notif-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.1);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}
.navbar__notif-btn:hover { background: rgba(255,255,255,.2); }
.navbar__notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--orange);
  border-radius: 9px;
  font-size: .62rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--navy);
  pointer-events: none;
}
.navbar__notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 440px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 600;
  flex-direction: column;
  border: 1px solid var(--gray-100);
  overflow: hidden;
}
@media (max-width: 768px) {
  .navbar__notif-panel {
    position: fixed;
    top: var(--navbar-h);
    left: 12px;
    right: 12px;
    width: auto;
  }
}
.navbar__notif-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
  flex-shrink: 0;
}
.navbar__notif-mark-all {
  background: none;
  border: none;
  font-size: .75rem;
  color: var(--electric);
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}
.navbar__notif-mark-all:hover { text-decoration: underline; }
.navbar__notif-body {
  overflow-y: auto;
  flex: 1;
}
/* Ítems */
.nn-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-50);
  transition: background var(--transition);
  position: relative;
}
.nn-item:hover { background: var(--gray-50); }
.nn-item.unread { background: #eff6ff; }
.nn-item.unread:hover { background: #dbeafe; }
.nn-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.nn-content { flex: 1; min-width: 0; }
.nn-titulo {
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: 2px;
}
.nn-msg {
  font-size: .78rem;
  color: var(--gray-600);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.nn-time {
  font-size: .72rem;
  color: var(--gray-400);
}
.nn-dot {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--electric);
  border-radius: 50%;
  flex-shrink: 0;
}
.nn-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--gray-400);
  font-size: .88rem;
}

/* ── Autocomplete de búsqueda en navbar ─────────────────────── */
.ns-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 360px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(11,30,61,.14);
  z-index: 1200;
  overflow: hidden;
  animation: ns-in .12s ease;
}
@keyframes ns-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ns-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
  border-bottom: 1px solid var(--gray-50);
}
.ns-item:last-of-type { border-bottom: none; }
.ns-item:hover, .ns-item.ns-active {
  background: var(--gray-50);
}
.ns-img {
  width: 42px; height: 42px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
  flex-shrink: 0;
  background: var(--gray-50);
}
.ns-img--ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--gray-400);
}
.ns-info {
  flex: 1;
  min-width: 0;
}
.ns-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ns-name .ns-hl {
  background: rgba(var(--electric-rgb, 0,176,255),.15);
  color: var(--electric);
  border-radius: 2px;
  padding: 0 1px;
  font-style: normal;
}
.ns-meta {
  font-size: .78rem;
  color: var(--gray-400);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ns-price {
  font-size: .85rem;
  font-weight: 700;
  color: var(--electric);
  flex-shrink: 0;
  margin-left: 8px;
}
.ns-ver-todos {
  display: block;
  padding: 10px 14px;
  font-size: .82rem;
  color: var(--electric);
  text-decoration: none;
  text-align: center;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  transition: background .12s;
}
.ns-ver-todos:hover { background: var(--gray-100); }
.ns-ver-todos strong { font-weight: 600; }
.ns-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: .85rem;
  color: var(--gray-400);
}
.ns-loading {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  color: var(--gray-400);
}
/* Mobile hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}
.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 64px 0 0;
  border-top: 3px solid var(--orange);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer__brand-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.footer__tagline {
  color: rgba(255,255,255,.55);
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.footer__social {
  display: flex;
  gap: 10px;
}
.footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: var(--transition);
}
.footer__social a:hover { background: var(--orange); }
.footer__col-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255,255,255,.1);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.footer__links li { margin-bottom: 10px; }
.footer__links a {
  color: rgba(255,255,255,.55);
  font-size: .88rem;
  transition: var(--transition);
}
.footer__links a:hover { color: var(--white); padding-left: 4px; }
.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  color: rgba(255,255,255,.55);
  font-size: .88rem;
}
.footer__contact-item span:first-child { margin-top: 2px; flex-shrink: 0; }
.footer__whatsapp {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  margin-top: 16px;
  transition: var(--transition);
  width: fit-content;
}
.footer__whatsapp:hover { background: #1ebe5d; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  color: rgba(255,255,255,.4);
}
.footer__bottom-links {
  display: flex;
  gap: 20px;
}
.footer__bottom-links a {
  color: rgba(255,255,255,.4);
  transition: var(--transition);
}
.footer__bottom-links a:hover { color: var(--white); }

/* ── RESPONSIVE NAVBAR / FOOTER ──────────────────────────────── */
@media (max-width: 968px) {
  .navbar__inner { gap: 8px; }
  .navbar__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    gap: 0;
    background: var(--navy);
    border-bottom: 3px solid var(--orange);
    box-shadow: 0 12px 24px rgba(0,0,0,.25);
    padding: 8px 0;
  }
  .navbar__nav.open { display: flex; }
  .navbar__nav a {
    padding: 14px 24px;
    border-radius: 0;
  }
  .navbar__nav a::after { display: none; }
  .navbar__search { max-width: 220px; }
  .navbar__hamburger { display: flex; padding: 4px; }
}
@media (max-width: 768px) {
  .navbar__search { display: none; }
  .navbar__nav__search {
    display: block;
    padding: 10px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .navbar__nav__search .navbar__search {
    display: block;
    max-width: none;
  }
  .footer__grid   {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 480px) {
  .navbar__inner     { gap: 4px; }
  .navbar__btn-login { padding: 8px 12px; font-size: .85rem; }
  .currency-toggle   { padding: 6px 8px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
}
