/* ==========================================================================
   DIAL FOR FABRICATION - MEGA DROPDOWN MENU & NAVIGATION STYLES
   White Base Theme | Modern Industrial Corporate UI
   ========================================================================== */

/* Header & Container Positioning */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
  height: auto !important;
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.nav-container {
  position: relative; /* Anchor for full-width mega menu */
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  height: auto;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.header .brand {
  margin-top: 0 !important;
  display: flex;
  align-items: center;
}

.header .brand-logo-img {
  /*! height: 58px !important; */
  /*! max-width: 190px !important; */
  object-fit: contain;
}

/* Nav Menu List */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Nav Items */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

/* Static positioning so megamenu spans .nav-container width */
.nav-item.has-megamenu {
  position: static;
}

/* Nav Link Styling */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
  padding: 0.75rem 0.2rem;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-item.is-open > .nav-link {
  color: var(--accent-orange, #ff6b00);
}

/* Chevron indicator */
.chevron-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: inherit;
  flex-shrink: 0;
}

.nav-item:hover > .nav-link .chevron-icon,
.nav-item.is-open > .nav-link .chevron-icon,
.nav-item:focus-within > .nav-link .chevron-icon {
  transform: rotate(180deg);
}

/* Hover Bridge: Prevents dropdown dismissal when moving cursor between link and panel */
.nav-item.has-dropdown::after,
.nav-item.has-megamenu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 15px;
  display: block;
}

/* ==========================================================================
   STANDARD SINGLE-COLUMN DROPDOWN MENU (About Us, Services)
   ========================================================================== */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 280px;
  background: #ffffff;
  border: 1px solid var(--border-light, #e2e8f0);
  border-top: 3px solid var(--accent-orange, #ff6b00);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04);
  padding: 0.75rem 0.5rem;
  list-style: none;
  z-index: 1050;
  
  /* Smooth transition */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown.is-open .dropdown-menu,
.nav-item.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.95rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.18s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--bg-secondary, #f8fafc);
  transform: translateX(4px);
}

.dropdown-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.18s ease;
}

.dropdown-item:hover .dropdown-item-title {
  color: var(--accent-orange, #ff6b00);
}

.dropdown-item-desc {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.35;
}

/* ==========================================================================
   MEGA DROPDOWN MENU (Products)
   ========================================================================== */
.megamenu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-light, #e2e8f0);
  border-top: 3px solid var(--accent-orange, #ff6b00);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 24px 48px -8px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.05);
  padding: 2rem 2.2rem;
  z-index: 1060;
  
  /* Smooth animation */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s;
}

.nav-item.has-megamenu:hover .megamenu-panel,
.nav-item.has-megamenu.is-open .megamenu-panel,
.nav-item.has-megamenu:focus-within .megamenu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mega Menu 3-Column Grid (All 13 Products Categorized) */
.megamenu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
}

/* Column Header */
.megamenu-col {
  display: flex;
  flex-direction: column;
}

.megamenu-col-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
  border-bottom: 2px solid #f1f5f9;
}

.megamenu-badge-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 107, 0, 0.1);
  color: var(--accent-orange, #ff6b00);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.megamenu-badge-icon svg {
  width: 14px;
  height: 14px;
}

.megamenu-col-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f172a;
}

/* Products List in Mega Menu */
.megamenu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.megamenu-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.18s ease;
}

.megamenu-item:hover,
.megamenu-item:focus {
  background-color: var(--bg-secondary, #f8fafc);
  transform: translateX(4px);
}

.megamenu-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #cbd5e1;
  margin-top: 7px;
  flex-shrink: 0;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.megamenu-item:hover .megamenu-item-dot {
  background-color: var(--accent-orange, #ff6b00);
  transform: scale(1.3);
}

.megamenu-item-content {
  display: flex;
  flex-direction: column;
}

.megamenu-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
  transition: color 0.18s ease;
}

.megamenu-item:hover .megamenu-item-name {
  color: var(--accent-orange, #ff6b00);
}

.megamenu-item-sub {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
  margin-top: 1px;
}

/* Column 4: Featured Promo Card */
.megamenu-promo-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

.megamenu-promo-img-wrap {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.85rem;
  background-color: #0f172a;
}

.megamenu-promo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.megamenu-promo-card:hover .megamenu-promo-img {
  transform: scale(1.06);
}

.megamenu-promo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-left: 2px solid var(--accent-orange, #ff6b00);
}

.megamenu-promo-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.megamenu-promo-desc {
  font-size: 0.76rem;
  color: #64748b;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.megamenu-promo-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.megamenu-promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.megamenu-all-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-orange, #ff6b00);
  text-decoration: none;
  padding: 0.3rem 0;
  transition: gap 0.2s ease;
}

.megamenu-all-link:hover {
  gap: 0.6rem;
}

/* ==========================================================================
   MOBILE DRAWER & ACCORDION (Max width: 991px)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 88vw;
  background: #ffffff;
  z-index: 1999;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
  box-shadow: -10px 0 35px rgba(15, 23, 42, 0.2);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.drawer-close {
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0f172a;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.drawer-close:hover {
  background: var(--accent-orange, #ff6b00);
  color: #ffffff;
  border-color: var(--accent-orange, #ff6b00);
}

/* Mobile Accordion Menu */
.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.8rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background-color: var(--bg-secondary, #f8fafc);
  color: var(--accent-orange, #ff6b00);
}

.mobile-nav-link .mobile-chevron {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  transition: transform 0.25s ease;
  color: #64748b;
}

.mobile-accordion.is-open > .mobile-nav-link .mobile-chevron {
  transform: rotate(180deg);
  color: var(--accent-orange, #ff6b00);
}

/* Accordion Collapsible Body */
.mobile-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  background: #f8fafc;
  border-radius: 8px;
  margin-top: 0.25rem;
  padding: 0 0.75rem;
}

.mobile-accordion.is-open > .mobile-accordion-body {
  max-height: 1200px; /* Expands to hold items */
  padding: 0.75rem;
}

.mobile-category-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  margin: 0.6rem 0 0.35rem 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mobile-category-title:first-child {
  margin-top: 0;
}

.mobile-sub-link {
  display: block;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.18s ease;
}

.mobile-sub-link:hover {
  background-color: #ffffff;
  color: var(--accent-orange, #ff6b00);
  padding-left: 0.85rem;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
  .nav-menu {
    display: none; /* Mobile toggle takes over */
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--border-light, #e2e8f0);
    cursor: pointer;
    color: #0f172a;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .megamenu-grid {
    gap: 1.4rem;
  }
  .nav-menu {
    gap: 1.2rem;
  }
  .nav-link {
    font-size: 0.9rem;
  }
}

@media (min-width: 992px) {
  .menu-toggle {
    display: none;
  }
  .mobile-drawer,
  .drawer-backdrop {
    display: none !important;
  }
}
