/* ============================================
   1. VARIABLES & GLOBAL
   ============================================ */
:root {
  --primary-navy: #0b2341;
  --accent-orange: #ff9900;
  --dark-navy: #091426;
  --white: #ffffff;
  --black: #000000;
  --grey-border: #eeeeee;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   2. TOP BAR (Desktop Only)
   ============================================ */
.top-bar {
  background: var(--accent-orange);
  color: var(--white);
  padding: 10px 0;
  font-size: 12px;
  font-weight: 600;
}

.flex-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-links a {
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
}

.user-name-text {
  font-weight: 800;
}

/* ============================================
   3. NAVBAR
   ============================================ */
.main-header-wrapper {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar {
  padding: 10px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--grey-border);
}

.flex-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
}

.logo a {
  text-decoration: none;
  color: var(--primary-navy);
}

/* Nav Menu Desktop */
.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-navy);
  text-decoration: none;
  text-transform: uppercase;
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--accent-orange);
}

/* Icons Section */
.header-right-icons {
  display: flex;
  align-items: center;
  gap: 22px;
}

.icon-link,
.cart-trigger {
  position: relative;
  color: var(--primary-navy);
  text-decoration: none;
  font-size: 19px;
  display: flex;
  align-items: center;
}

.badge-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--accent-orange);
  color: white;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.cart-data {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 800;
}

/* ============================================
   4. SHOP DROPDOWN
   ============================================ */
.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 240px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-top: 3px solid var(--accent-orange);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
  padding: 10px 0;
}

.has-dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content a {
  display: block !important;
  padding: 12px 25px !important;
  color: #333 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #f8f8f8;
  text-transform: uppercase;
}

.dropdown-content a:hover {
  background: #fcfcfc;
  color: var(--accent-orange) !important;
}

/* ============================================
   5. SIDE DRAWER (Cart / Quote)
   ============================================ */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: 0.4s;
}

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

.side-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 400px;
  max-width: 85%;
  height: 100%;
  background: #fff;
  z-index: 2001;
  transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
}

.side-drawer.active {
  right: 0;
}

.drawer-header {
  padding: 25px;
  background: #000;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header h2 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}
.close-drawer-btn {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.drawer-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  position: relative;
}

.drawer-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  background: #f9f9f9;
}
.drawer-item h4 {
  font-size: 14px;
  margin: 0 0 5px 0;
  font-weight: 700;
  color: var(--primary-navy);
}
.remove-item {
  position: absolute;
  right: 0;
  top: 15px;
  cursor: pointer;
  color: #ccc;
  font-size: 20px;
}

.drawer-footer {
  padding: 25px;
  border-top: 1px solid #eee;
}
.subtotal-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-weight: 800;
  font-size: 16px;
}
.btn-drawer-action {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--primary-navy);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
}

/* ============================================
   6. MOBILE RESPONSIVE & MOBILE MENU
   ============================================ */
.mobile-nav-toggle {
  display: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--primary-navy);
}

/* Hidden on desktop */
.mobile-user-section {
  display: none;
}

@media (max-width: 991px) {
  .top-bar {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
    margin-right: 15px;
  }

  /* The Navigation Drawer */
  .nav-center {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100%;
    background: #ffffff;
    z-index: 3000;
    padding: 20px 0;
    transition: 0.4s ease;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    display: block; /* Overrides desktop display:flex */
  }

  .nav-center.active {
    left: 0;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    display: block;
    padding: 15px 25px;
    border-bottom: 1px solid #f4f4f4;
    font-size: 14px;
  }

  /* Shop Dropdown for Mobile */
  .dropdown-content {
    position: static;
    opacity: 1;
    visibility: visible;
    display: none;
    box-shadow: none;
    border: none;
    background: #f9f9f9;
    transform: none;
  }

  .has-dropdown.open .dropdown-content {
    display: block;
  }

  /* Mobile User Links Styling */
  .mobile-user-section {
    display: block;
    background: #fcfcfc;
    border-bottom: 2px solid #eee;
  }

  .mobile-user-link {
    color: var(--primary-navy) !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 25px !important;
    font-size: 13px !important;
  }

  .mobile-user-link i {
    color: var(--accent-orange);
    width: 18px;
  }

  /* Header Icons adjustment */
  .hide-mobile {
    display: none !important;
  }
  .header-right-icons {
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 22px;
  }
  .header-right-icons {
    gap: 12px;
  }
  .side-drawer {
    width: 100%;
  }
}
