/* Glassmorphic Desktop Header - Light Theme */
.gstore-desktop-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  width: 100%;
  padding: 0; /* No padding on header itself */
  margin: 0;
  z-index: 1000;
  font-family: 'TBC Contractica', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

/* Adjust for WordPress admin bar (when present) */
.admin-bar .gstore-desktop-header {
  top: 24px !important;
}

@media screen and (max-width: 782px) {
  .admin-bar .gstore-desktop-header {
    top: 24px !important;
  }
}

/* When scrolled: glassmorphic background */
.gstore-desktop-header.is-scrolled {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Glass Header Container - Light Background Version */
.gstore-glass-header {
  max-width: min(1440px, 95%); /* Responsive: 95% of viewport or 1440px max */
  margin: 0 auto 0.5rem auto; /* 0.5rem bottom margin */
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* LEFT: Logo & Navigation */
.gstore-header-left {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-shrink: 0;
}

/* Logo */
.gstore-header-logo {
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 36px;
}

.gstore-logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
  height: 36px;
}

.gstore-logo-link:hover {
  opacity: 0.8;
}

.gstore-logo-link img {
  height: 36px !important;
  width: auto;
  max-width: 260px;
  display: block;
  object-fit: contain;
}

/* logo text removed */

/* Navigation Trigger (Hamburger with Dots) */
.gstore-nav-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: #4a4a4a;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

/* Hide header when image viewer is open */
#gstore-desktop-header {
  transition: transform 0.3s ease-in-out;
}

#gstore-desktop-header.header-hidden {
  transform: translateY(-200%);
}

.gstore-nav-trigger:hover {
  color: #1a1a1a;
  background: rgba(0, 0, 0, 0.05);
}

.gstore-nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  overflow: visible;
}

.gstore-nav-dots {
  transform-origin: center;
  transition: transform 0.3s ease-out;
}

.gstore-nav-trigger:hover .gstore-nav-dots circle:nth-child(1) {
  transform: translateX(12px);
  transition: transform 0.3s ease;
}

.gstore-nav-trigger:hover .gstore-nav-dots circle:nth-child(3) {
  transform: translateY(12px);
  transition: transform 0.3s ease;
}

.gstore-nav-trigger:hover .gstore-nav-dots circle:nth-child(7) {
  transform: translateY(-12px);
  transition: transform 0.3s ease;
}

.gstore-nav-trigger:hover .gstore-nav-dots circle:nth-child(9) {
  transform: translateX(-12px);
  transition: transform 0.3s ease;
}

/* CENTER: Search */
.gstore-header-search {
  flex: 1;
  /* max-width: 40rem; */
  position: relative;
}

.gstore-glass-search {
  display: flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.gstore-glass-search:focus-within {
  border-color: #3713ec;
  box-shadow: 0 0 0 3px rgba(55, 19, 236, 0.1);
}

.gstore-search-icon {
  flex-shrink: 0;
  color: #9ca3af;
  pointer-events: none;
}

.gstore-search-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #1a1a1a;
  font-size: 0.875rem;
  padding-left: 0.75rem;
  font-family: inherit;
}

.gstore-search-field::placeholder {
  color: #9ca3af;
}

.gstore-search-field:focus {
  outline: none;
}

/* CENTER-RIGHT: Shop, Account, Cart (moved from right) */
.gstore-header-center-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Separator before shop button (after search) */
.gstore-header-center-right::before {
  content: '';
  width: 1px;
  height: 1.5rem;
  background: rgba(0, 0, 0, 0.1);
  margin-right: 0.5rem;
}

/* RIGHT: Language Switcher & Theme Toggle */
.gstore-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto; /* Push to far right */
}

/* Shop Button (styled like cart button) */
.gstore-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  color: #1a1a1a;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0;
}

.gstore-nav-link:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

/* User Profile (Logged In) */
.gstore-user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.gstore-user-profile:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.gstore-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: block;
}

.gstore-user-name {
  color: #1a1a1a;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Divider between center-right and right */
.gstore-header-center-right::after {
  content: '';
  width: 1px;
  height: 1.5rem;
  background: rgba(0, 0, 0, 0.1);
  margin-left: 0.5rem;
}

/* Log In Button */
.gstore-login-btn {
  background: #3713ec;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  box-shadow: 0 4px 14px 0 rgba(55, 19, 236, 0.2);
  transition: all 0.2s ease;
  display: inline-block;
}

.gstore-login-btn:hover {
  background: #2910c0;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(55, 19, 236, 0.3);
}

/* Cart Button */
.gstore-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  color: #1a1a1a;
  text-decoration: none;
  transition: all 0.2s ease;
}

.gstore-cart-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

/* Cart Badge */
.gstore-cart-badge {
  position: absolute;
  top: -0.45rem;
  right: -0.25rem;
  min-width: 1rem;
  width: 20px;
  height: 20px;
  padding: 0 0.25rem;
  background: #3713ec;
  color: white;
  font-family: monospace;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid white;
}

/* Responsive */
@media (max-width: 1200px) {
  .gstore-glass-header {
    gap: 1rem;
  }

  .gstore-header-left {
    gap: 1.5rem;
  }

  .gstore-header-search {
    max-width: 30rem;
  }
}

@media (max-width: 992px) {
  .gstore-desktop-header {
    padding: 1rem;
  }

  .gstore-glass-header {
    padding: 0.5rem 1rem;
  }

  .gstore-nav-trigger span {
    display: none;
  }

  .gstore-nav-link {
    padding: 0.5rem;
  }
}

/* Language Switcher */
.gstore-lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.gstore-lang-btn {
  background: transparent;
  border: none;
  padding: 0.375rem 0.625rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gstore-lang-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.gstore-lang-btn.is-active {
  background: rgba(55, 19, 236, 0.1);
}

.gstore-flag {
  font-size: 1.25rem;
  line-height: 1;
  display: block;
}

/* Theme Toggle */
.gstore-theme-toggle {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: default;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a4a4a;
  pointer-events: none;
  opacity: 0.5;
}

.gstore-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.gstore-theme-icon {
  display: block;
  width: 20px;
  height: 20px;
}

/* Dark mode styles */
html[data-theme="dark"] {
  /* You can add dark mode CSS variables here */
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
}

html[data-theme="dark"] .gstore-glass-header {
  background: rgba(30, 30, 30, 0.75);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .gstore-lang-switcher,
html[data-theme="dark"] .gstore-theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .gstore-lang-btn:hover,
html[data-theme="dark"] .gstore-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Hide on mobile (mobile header shows instead) */
@media (max-width: 768px) {
  .gstore-desktop-header {
    display: none;
  }
}
