/* ================= SHARED NAVBAR STYLES ================= */
@import url('https://fonts.googleapis.com/css2?family=Teko:wght@400;500;600;700&display=swap');

:root {
  --container: 1280px;
  --navbar-height: 52px;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #111827;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

header .wrap.nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  height: 52px;
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
}

header .brand {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-self: start;
  padding-left: 38px;
}

header .brand img {
  height: 32px;
  width: auto;
  display: block;
}

header .brand h1 {
  font-family: 'Teko', sans-serif;
  font-size: 24px;
  margin: 0;
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.05em;
  font-weight: 700;
}

header .brand .ren-text {
  color: #ef4444;
}

header .brand .bikers-text {
  color: #3b82f6;
}

header nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  color: #fff;
  transition: 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  font-family: 'Teko', sans-serif;
  letter-spacing: 0.03em;
}

header nav a:hover {
  color: #fff;
}

header nav a.active {
  color: #f97316;
}

header .nav > div:last-child {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: fit-content;
}

header .sign-in,
header .register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  transition: 0.2s ease;
  font-family: 'Teko', sans-serif;
  letter-spacing: 0.02em;
  border: none;
  white-space: nowrap;
}

header .sign-in {
  background: #f97316;
}

header .register {
  background: #3b82f6;
}

header .sign-in i,
header .register i {
  margin-right: 3px;
  font-size: 12px;
}

header .sign-in:hover,
header .register:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Header icon buttons for logged-in users */
.header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  transition: 0.2s ease;
}

.header-icon-btn:hover {
  color: #f97316;
  transform: translateY(-1px);
}

/* User dropdown */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 8px;
  background: #111827;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  min-width: 160px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
}

.user-dropdown:hover .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.dropdown-item:hover {
  background: #f97316;
  color: #fff;
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(90deg, #ef4444, #f97316);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  position: relative;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile navigation overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile navigation menu */
.mobile-nav-menu {
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  background: #111827;
  padding: 20px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
}

.mobile-nav-menu.active {
  transform: translateY(0);
}

.mobile-nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-menu a {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  color: #fff;
  text-decoration: none;
  font-family: 'Teko', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.mobile-nav-menu a:hover {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

.mobile-nav-menu a.active {
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
}

.mobile-nav-menu .auth-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive styles */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  header .wrap.nav {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
    height: 48px;
  }

  header .brand {
    padding-left: 0;
  }

  header .brand h1 {
    font-size: 20px;
  }

  header nav {
    display: none;
  }

  header .nav > div:last-child {
    gap: 8px;
  }

  header .sign-in,
  header .register {
    padding: 6px 10px;
    font-size: 12px;
  }

  .header-actions {
    display: none;
  }
}

@media (max-width: 480px) {
  header .wrap.nav {
    padding: 0 12px;
    height: 44px;
  }

  header .brand h1 {
    font-size: 18px;
  }

  .mobile-menu-btn {
    width: 32px;
    height: 32px;
  }

  .mobile-menu-btn span {
    width: 18px;
  }
}

/* ================= LOGOUT CONFIRMATION MODAL ================= */
#logoutModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

#logoutModal .modal-content.logout-confirm {
  height: auto !important;
  min-height: 0;
  width: 360px;
  max-width: calc(100% - 40px);
  margin-top: 0;
  text-align: center;
  overflow: visible;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

#logoutModal .close-button {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.08) !important;
}

#logoutModal .close-button:hover {
  background: rgba(15, 23, 42, 0.15) !important;
}

#logoutModal .logout-confirm-body {
  padding: 32px 28px 28px;
}

#logoutModal .logout-confirm-body h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

#logoutModal .logout-confirm-body p {
  margin: 0 0 24px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

#logoutModal .logout-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

#logoutModal .logout-confirm-actions button {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

#logoutModal .btn-cancel {
  background: #e5e7eb;
  color: #374151;
}

#logoutModal .btn-cancel:hover {
  background: #d1d5db;
}

#logoutModal .btn-confirm {
  background: linear-gradient(90deg, #ef4444, #f97316);
  color: #fff;
}

#logoutModal .btn-confirm:hover {
  opacity: 0.95;
}

/* ================= CART DROPDOWN MODAL ================= */
#cartModal {
  box-sizing: border-box;
}

.cart-modal-content {
  width: 100%;
  max-height: 100px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  position: relative;
  display: flex;
  flex-direction: column;
}

.cart-modal-header {
  padding: 1px 6px 0px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-modal-header h2 {
  margin: 0;
  font-size: 7px;
  font-weight: 800;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 2px;
}

.cart-modal-header h2 i {
  color: #ef4444;
}

.view-full-cart {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
  text-decoration: none;
}

.view-full-cart:hover {
  color: #ef4444;
}

.cart-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px;
  min-height: 80px;
}

.cart-empty-state {
  text-align: center;
  padding: 20px;
}

.cart-empty-state i {
  font-size: 36px;
  color: #d1d5db;
  margin-bottom: 10px;
}

.cart-empty-state p {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

.btn-shop-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  transition: transform 0.18s ease;
}

.btn-shop-now:hover {
  transform: translateY(-2px);
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cart-item {
  display: flex;
  gap: 2px;
  padding: 0px 4px;
  background: #ffffff;
  border: none;
  align-items: center;
  border-bottom: 1px solid #f3f4f6;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  object-fit: cover;
  background: #f3f4f6;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 7px;
  color: #111827;
  line-height: 1.0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cart-item-price {
  font-weight: 600;
  font-size: 6px;
  color: #6b7280;
  white-space: nowrap;
}

.cart-modal-footer {
  padding: 2px 8px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.cart-subtotal-label {
  font-size: 6px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1px;
  font-size: 8px;
}

.cart-total-row span {
  color: #374151;
  font-weight: 600;
}

.cart-total-row strong {
  font-size: 10px;
  color: #111827;
  font-weight: 800;
}

.btn-checkout {
  width: 100%;
  padding: 2px 8px;
  border-radius: 2px;
  border: none;
  background: #f97316;
  color: #fff;
  font-weight: 700;
  font-size: 7px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-checkout:hover {
  background: #ea580c;
}

.btn-checkout:hover {
  transform: translateY(-2px);
}
