/* ==========================================================================
   GLOBAL NAVIGATION & PRODUCTS DROPDOWN - XEYROX
   Refined to match DESIGN.md and official visual reference
   ========================================================================== */

/* Header Wrapper */
.site-header {
  position: relative;
  width: 100%;
  z-index: 1000;
}

/* Sticky Global Header */
.global-header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height, 72px);
  background: var(--x-white, #FFFFFF);
  border-bottom: 1px solid var(--x-border, #DCE6F2);
  transition: box-shadow 200ms ease, border-color 200ms ease;
  z-index: 1000;
}

.global-header.header-scrolled {
  border-bottom-color: var(--x-border, #DCE6F2);
  box-shadow: 0 4px 20px rgba(11, 23, 51, 0.05);
}

/* Header Container */
.header-container {
  position: relative;
  height: 100%;
}

/* Header Inner Layout */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.header-logo img {
  height: 30px;
  width: auto;
  display: block;
}

/* Main Navigation */
.main-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-primary, "Be Vietnam Pro", sans-serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--x-text, #0B1733);
  text-decoration: none;
  padding: 8px 0;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color 180ms ease, font-weight 180ms ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--x-green-500, #19C88B);
  text-decoration: none;
}

.nav-link:focus-visible {
  outline: 2px solid var(--x-green-500, #19C88B);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Products Trigger Button */
.products-trigger {
  gap: 6px;
}

.products-trigger.is-open {
  color: var(--x-green-500, #19C88B);
  font-weight: 600;
}

.dropdown-chevron {
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  color: currentColor;
  flex-shrink: 0;
}

.products-trigger.is-open .dropdown-chevron {
  transform: rotate(180deg);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.header-signin {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-primary, "Be Vietnam Pro", sans-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--x-text, #0B1733);
  text-decoration: none;
  transition: color 180ms ease;
  line-height: 1;
}

.signin-arrow {
  display: inline-block;
  transition: transform 180ms ease;
}

.header-signin:hover {
  color: #155EEF;
  text-decoration: none;
}

.header-signin:hover .signin-arrow {
  transform: translateX(3px);
}

.header-signin:focus-visible {
  outline: 2px solid #155EEF;
  outline-offset: 4px;
  border-radius: 4px;
}

/* Contact Us Button (Gradient Pill Matching Reference) */
.btn-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary, "Be Vietnam Pro", sans-serif);
  font-size: 14.5px;
  font-weight: 600;
  color: #FFFFFF !important;
  background: linear-gradient(90deg, #155EEF 0%, #0A8DF2 52%, #00BF9A 100%) !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 10px 24px !important;
  text-decoration: none;
  line-height: 1;
  transition: all 180ms ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(21, 94, 239, 0.22);
}

.btn-header-cta:hover {
  background: linear-gradient(90deg, #104ECB 0%, #087CD7 52%, #00AB8A 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(21, 94, 239, 0.35);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-header-cta:focus-visible {
  outline: 2px solid #155EEF;
  outline-offset: 3px;
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--x-text, #0B1733);
}

.mobile-menu-btn:focus-visible {
  outline: 2px solid var(--x-green-500, #19C88B);
  outline-offset: 2px;
}

.hamburger-icon {
  width: 22px;
  height: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* ==========================================================================
   PRODUCTS DROPDOWN PANEL (Desktop 6-Column Ecosystem)
   ========================================================================== */
.products-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(1280px, calc(100% - 48px));
  background: var(--x-white, #FFFFFF);
  border: 1px solid var(--x-border, #DCE6F2);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(20, 50, 90, 0.08);
  padding: 24px 28px 28px;
  z-index: 1050;
}

.products-dropdown.is-open {
  display: block;
  animation: dropdownFadeIn 180ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Dropdown Top Pointer / Notch (Aligned under Products trigger) */
.dropdown-notch {
  position: absolute;
  top: -8px;
  left: 175px; /* dynamically updated by main.js */
  width: 14px;
  height: 14px;
  background: var(--x-white, #FFFFFF);
  border-top: 1px solid var(--x-border, #DCE6F2);
  border-left: 1px solid var(--x-border, #DCE6F2);
  transform: translateX(-50%) rotate(45deg);
  border-top-left-radius: 2px;
  z-index: 2;
}

/* Dropdown Heading Area */
.dropdown-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
  padding-left: 8px;
}

.dropdown-title {
  font-family: var(--font-primary, "Be Vietnam Pro", sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--x-navy-950, #0B1733);
  line-height: 1.2;
}

.dropdown-subtitle {
  font-family: var(--font-primary, "Be Vietnam Pro", sans-serif);
  font-size: 14px;
  font-weight: 400;
  color: var(--x-text-muted, #71809A);
  line-height: 1.2;
}

/* Responsive Multi-Column Desktop Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
}

/* Individual Product Card */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--x-text, #0B1733);
  border-radius: 12px;
  transition: background-color 180ms ease;
}

.product-card:hover {
  background-color: var(--x-surface, #F8FAFC);
  text-decoration: none;
}

.product-card:focus-visible {
  outline: 2px solid var(--x-green-500, #19C88B);
  outline-offset: 2px;
}

/* Subtle Vertical Dividers Between Columns */
.product-card:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8%;
  height: 84%;
  width: 1px;
  background-color: #EEF2F7;
}

/* Product Icon Container */
.product-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  transition: transform 180ms ease;
  flex-shrink: 0;
}

.product-card:hover .product-icon-box {
  transform: translateY(-2px);
}

.product-icon-box img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

/* Product Details */
.product-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name {
  font-family: var(--font-primary, "Be Vietnam Pro", sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--x-navy-950, #0B1733);
  margin: 0;
  line-height: 1.3;
  transition: color 180ms ease;
}

.product-card:hover .product-name {
  color: var(--x-green-500, #19C88B);
}

.product-desc {
  font-family: var(--font-primary, "Be Vietnam Pro", sans-serif);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--x-text-muted, #71809A);
  margin: 0;
  line-height: 1.4;
}
