/* ══════════════════════════════════════
   SHARED COMPONENTS - Navbar, Sidebar, Footer, Scroll-top, Icons
   ══════════════════════════════════════ */

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  padding: 0 16px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(200,16,46,0.3);
}

.nav-search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  flex: 1;
}

.nav-search input {
  border: none;
  outline: none;
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  width: 100%;
  color: var(--text);
}

.nav-search button {
  background: var(--primary-dark);
  border: none;
  padding: 0;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: #fff;
  display: grid;
  place-items: center;
  transition: background var(--transition);
  flex-shrink: 0;
}

.nav-search button svg { width: 18px; height: 18px; }
.nav-search button:hover { background: #7a0a1b; }

.menu-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  flex-shrink: 0;
  transition: background var(--transition);
}

.menu-btn:hover { background: rgba(255,255,255,0.15); }

.cart-btn {
  position: relative;
  color: #fff;
  text-decoration: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  flex-shrink: 0;
  transition: background var(--transition);
}

.cart-btn:hover { background: rgba(255,255,255,0.15); }

.cart-badge {
  position: absolute;
  top: 2px;
  right: 0;
  background: #fbbf24;
  color: #1a1a1a;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

/* ── SIDEBAR (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-overlay.active { display: block; opacity: 1; }

.sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: var(--primary);
  z-index: 300;
  transition: left 0.3s ease;
  overflow-y: auto;
  color: #fff;
}

.sidebar.active { left: 0; }

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-header h3 { font-family: 'Outfit', sans-serif; font-size: 18px; }

.sidebar-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  transition: background var(--transition);
}

.sidebar-close:hover { background: rgba(255,255,255,0.15); }

.sidebar-nav { list-style: none; padding: 12px 0; }

.sidebar-nav li a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  transition: background var(--transition);
}

.sidebar-nav li a:hover { background: rgba(255,255,255,0.1); }

/* ── MOBILE FOOTER ── */
.mobile-footer {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  z-index: 100;
  padding: 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}

.mobile-footer .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 60px;
  position: relative;
}

.mobile-footer a {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.mobile-footer .home-btn {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border: 3px solid var(--bg);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: -24px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-footer .home-btn .logo-sm {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
}

/* ── SCROLL TO TOP ── */
.scroll-top {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  place-items: center;
  box-shadow: var(--shadow-md);
  z-index: 90;
  transition: background var(--transition), transform var(--transition);
  font-size: 18px;
}

.scroll-top:hover { background: var(--primary-dark); transform: scale(1.1); }
.scroll-top.visible { display: grid; }

/* ── SVG ICONS ── */
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 18px; height: 18px; }

/* ── SHARED RESPONSIVE ── */
@media (max-width: 768px) {
  .mobile-footer { display: block; }
}

@media (max-width: 480px) {
  .navbar { padding: 0 12px; height: 56px; }
}
