/* Scoped header styles for site header — follows provided specifications
   Namespaced under .site-header to avoid conflicts with other pages
*/
.site-header{
  --blue-dark: #0B4678;
  --blue-primary: #1075CD;
  --red-primary: #FF0000;
  --red-600: #DC2626;

  --white: #FFFFFF;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --blue-50: #E7F1FB;
  --red-50: #FEF2F2;

  --text-white: #FFFFFF;
  --text-gray-200: #E5E7EB;
  --text-dark: #1A1A1A;
  --text-gray-500: #6B7280;
  --text-gray-900: #111827;

  --topbar-text: 0.875rem; /* 14px */
  --topbar-text-mobile: 0.75rem; /* 12px */
  --nav-link-text-mobile: 0.75rem; /* 12px */
  --user-text: 0.875rem;
  --badge-text: 0.75rem;

  --font-normal: 400;
  --font-semibold: 600;
  --font-bold: 700;

  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}

/* Top Bar */
.site-header .top-bar{
  background: var(--blue-dark);
  color: var(--text-white);
  font-size: var(--topbar-text-mobile);
}
.site-header .top-bar .top-inner{
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:40px;
}
.site-header .top-bar .top-left{ display:flex; align-items:center; gap:24px; }
.site-header .top-bar .top-link{ display:flex; align-items:center; gap:8px; color:var(--text-white); text-decoration:none; transition:color .3s; }
.site-header .top-bar .top-link:hover{ color:var(--text-gray-200); }
.site-header .top-bar .top-link .icon{ width:14px; height:14px; }
.site-header .top-bar .top-link span{ display:none; }

/* show contact text from sm and up */
@media (min-width: 640px){
  .site-header .top-bar { font-size: var(--topbar-text); }
  .site-header .top-bar .top-inner{ padding: 0 24px; }
  .site-header .top-bar .top-link span{ display:inline; }
}
@media (min-width: 1024px){
  .site-header .top-bar .top-inner{ padding: 0 32px; }
}
.site-header .top-bar .top-right{ font-size:var(--topbar-text-mobile); }
@media (min-width:640px){ .site-header .top-bar .top-right{ font-size:var(--topbar-text); } }

/* Main Navigation */
.site-header .main-nav-wrapper{ border-bottom:1px solid var(--gray-100); }
.site-header .main-nav-wrapper .main-inner{ max-width:1280px; margin:0 auto; padding:0 12px; display:flex; align-items:center; justify-content:space-between; height:80px; }
@media (min-width:640px){ .site-header .main-nav-wrapper .main-inner{ padding:0 24px; } }
@media (min-width:1024px){ .site-header .main-nav-wrapper .main-inner{ padding:0 32px; } }

/* Logo */
.site-header .logo-link{ flex-shrink:0; }
.site-header .logo{ height:24px; width:auto; object-fit:contain; }
@media (min-width:640px){ .site-header .logo{ height:40px; } }

/* Navigation Links (hidden on mobile) */
.site-header .desktop-nav{ display:none; align-items:center; gap:40px; }
.site-header .nav-link{ position:relative; font-size:var(--nav-link-text); font-weight:var(--font-semibold); color:var(--text-dark); text-decoration:none; transition:color .3s; }
.site-header .nav-link:hover, .site-header .nav-link.active{ color:var(--blue-primary); }

/* Mobile nav-link font size reduction */
@media (max-width:767px){
  .site-header .nav-link{ font-size:var(--nav-link-text-mobile); }
}


/* active underline positioned 24px below link */
.site-header .nav-link.active::after{ content:''; position:absolute; left:0; right:0; bottom:-24px; height:2px; background:var(--blue-primary); }

@media (min-width:768px){
  .site-header .desktop-nav{ display:flex; }
  /* hide mobile menu button on md+ but keep existing mobile CSS intact */
  .site-header .mobile-menu-button{ display:none; }
}

/* Right side icons */
.site-header .actions{ display:flex; align-items:center; gap:8px; }

/* Mobile icon size and gap reduction */
@media (max-width:767px){
  .site-header .actions .icon{ width:18px; height:18px; }
  .site-header .actions .nav-link{ gap:4px; }
}

/* User button (not present in markup yet, styles prepared and scoped) */
.site-header .user-btn{ display:flex; align-items:center; gap:8px; padding:12px; border-radius:8px; cursor:pointer; transition:all .3s; }
.site-header .user-btn:hover{ background:var(--blue-50); }
.site-header .user-btn .icon{ width:24px; height:24px; color:var(--blue-dark); transition:color .3s; }
.site-header .user-btn .text{ display:none; font-size:14px; font-weight:var(--font-semibold); color:var(--blue-dark); }
@media (min-width:1024px){ .site-header .user-btn .text{ display:block; } }

/* Logged-in avatar */
.site-header .avatar{ width:32px; height:32px; border-radius:9999px; border:2px solid var(--blue-primary); object-fit:cover; }
.site-header .avatar-initial{ width:32px; height:32px; border-radius:9999px; display:flex; align-items:center; justify-content:center; color:var(--white); font-weight:700; background:linear-gradient(to bottom right,var(--blue-primary),var(--blue-dark)); }

/* Cart */
.site-header .cart-link{ position:relative; padding:12px; border-radius:8px; transition:background-color .3s; cursor:pointer; }
.site-header .cart-link:hover{ background:var(--blue-50); }
.site-header .cart-link .icon{ width:24px; height:24px; color:var(--blue-dark); }
.site-header .cart-count{ position:absolute; top:4px; right:4px; background:var(--red-primary); color:var(--white); font-size:var(--badge-text); font-weight:var(--font-bold); width:20px; height:20px; display:flex; align-items:center; justify-content:center; border-radius:9999px; min-width:20px; }

/* User dropdown menu (scoped) */
.site-header .user-dropdown{ position:absolute; right:0; top:100%; margin-top:8px; width:224px; background:var(--white); border-radius:12px; box-shadow:0 25px 50px -12px rgba(0,0,0,0.25); border:1px solid var(--gray-200); padding:8px 0; z-index:50; }
.site-header .user-dropdown .user-info{ padding:12px 16px; border-bottom:1px solid var(--gray-100); }
.site-header .user-dropdown .user-name{ font-weight:var(--font-semibold); color:var(--text-gray-900); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.site-header .user-dropdown .user-email{ font-size:14px; color:var(--text-gray-500); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.site-header .user-dropdown .logout{ width:100%; padding:12px 16px; text-align:left; font-size:14px; color:var(--red-600); background:transparent; border:none; display:flex; align-items:center; gap:8px; cursor:pointer; }
.site-header .user-dropdown .logout:hover{ background:var(--red-50); }

/* Preserve mobile menu / hamburger behavior — do not alter .mobile-nav and .mobile-menu-button rules here */

/* Responsive tweaks */
@media (max-width:639px){
  .site-header .top-bar .top-inner{ padding:0 16px; }
  .site-header .main-nav-wrapper .main-inner{ padding:0 16px; }
}

/* Show/hide first name vs full name */
.site-header .show-sm{ display:inline; }
.site-header .hidden-sm{ display:none; }

@media (min-width:640px){
  .site-header .hidden-sm{ display:inline; }
  .site-header .show-sm{ display:none; }
}