/* ==========================================================================
   02. Layout Shell — Top Bar, Glass Header, Mega Menu, Footer, Mobile & BackTop
   ========================================================================== */

/* Top Bar */
body.mct-enterprise-ui #top-bar {
  background-color: var(--mct-navy-deep);
  min-height: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body.mct-enterprise-ui #top-bar .nav > li > a,
body.mct-enterprise-ui #top-bar .html {
  color: var(--mct-text-on-dark);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
body.mct-enterprise-ui #top-bar .nav > li > a:hover {
  color: #fff;
}
body.mct-enterprise-ui #top-bar .mct-topbar-tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-size: 12.5px;
}
body.mct-enterprise-ui #top-bar .mct-topbar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mct-cyan);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
}

/* Main Header + Glassmorphic Sticky Mode */
body.mct-enterprise-ui #masthead.header-main {
  background: var(--mct-surface);
  border-bottom: 1px solid var(--mct-border);
  transition: background 0.3s var(--mct-ease-smooth), box-shadow 0.3s var(--mct-ease-smooth);
}
body.mct-enterprise-ui .header-wrapper.stuck {
  box-shadow: 0 10px 30px -10px rgba(11, 31, 58, 0.16);
}
body.mct-enterprise-ui .header-wrapper.stuck #masthead.header-main {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom-color: rgba(226, 232, 240, 0.85);
}

/* Logo */
body.mct-enterprise-ui #logo a img {
  max-height: 54px;
  width: auto;
  object-fit: contain;
}

/* Search Form */
body.mct-enterprise-ui .header-search-form-wrapper .searchform {
  max-width: 560px;
}
body.mct-enterprise-ui .header-search-form-wrapper .flex-row {
  background: var(--mct-bg);
  border: 1.5px solid var(--mct-border-strong);
  border-radius: var(--mct-radius-md);
  overflow: hidden;
  transition: border-color 0.2s var(--mct-ease-smooth), box-shadow 0.2s var(--mct-ease-smooth);
}
body.mct-enterprise-ui .header-search-form-wrapper .flex-row:focus-within {
  border-color: var(--mct-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  background: #fff;
}
body.mct-enterprise-ui .header-search-form-wrapper input.search-field,
body.mct-enterprise-ui .header-search-form-wrapper select.search_categories {
  height: 42px;
  border: none;
  background: transparent;
  box-shadow: none;
  font-size: 13.5px;
  color: var(--mct-text);
  margin: 0;
}
body.mct-enterprise-ui .header-search-form-wrapper select.search_categories {
  border-right: 1px solid var(--mct-border);
  max-width: 155px;
  font-weight: 600;
  color: var(--mct-navy);
}
body.mct-enterprise-ui .header-search-form-wrapper .ux-search-submit {
  height: 42px;
  min-width: 48px;
  background: var(--mct-blue);
  color: #fff;
  border: none;
  border-radius: 0;
  margin: 0;
}
body.mct-enterprise-ui .header-search-form-wrapper .ux-search-submit:hover {
  background: var(--mct-blue-hover);
}

/* Header Right Actions */
.mct-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mct-header-hotline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--mct-radius-md);
  background: var(--mct-bg);
  border: 1px solid var(--mct-border);
  transition: all 0.22s var(--mct-ease-smooth);
}
.mct-header-hotline:hover {
  border-color: var(--mct-blue-border);
  background: var(--mct-blue-light);
  transform: translateY(-1px);
}
.mct-header-hotline__icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--mct-navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.mct-header-hotline__info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.mct-header-hotline__info small {
  font-size: 11px;
  font-weight: 600;
  color: var(--mct-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mct-header-hotline__info strong {
  font-family: var(--mct-font-heading);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--mct-navy);
}
.mct-header-quote-btn {
  padding: 10px 16px;
  font-size: 13px;
  white-space: nowrap;
}

/* Navigation Bar + Animated Underline */
body.mct-enterprise-ui #wide-nav.header-bottom {
  background: var(--mct-navy);
  min-height: 48px;
  border-bottom: 2px solid var(--mct-blue);
}
body.mct-enterprise-ui #wide-nav .header-bottom-nav > li > a {
  position: relative;
  color: #f1f5f9;
  font-family: var(--mct-font-heading);
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 12px;
  line-height: 48px;
  transition: color 0.25s var(--mct-ease-smooth);
}
body.mct-enterprise-ui #wide-nav .header-bottom-nav > li > a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, #38BDF8, #2563EB);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--mct-ease-smooth);
}
body.mct-enterprise-ui #wide-nav .header-bottom-nav > li > a:hover,
body.mct-enterprise-ui #wide-nav .header-bottom-nav > li.current-menu-item > a {
  color: #60A5FA;
}
body.mct-enterprise-ui #wide-nav .header-bottom-nav > li > a:hover::after,
body.mct-enterprise-ui #wide-nav .header-bottom-nav > li.current-menu-item > a::after {
  transform: scaleX(1);
}
body.mct-enterprise-ui #wide-nav .cart-item .header-cart-link,
body.mct-enterprise-ui #wide-nav .account-item .nav-top-link {
  color: #f1f5f9;
}

/* Smooth 4-Column Mega Menu */
body.mct-enterprise-ui .nav > li.has-dropdown > .nav-dropdown {
  padding: 0;
  border: 1px solid var(--mct-border);
  border-top: 3px solid var(--mct-blue);
  border-radius: 0 0 var(--mct-radius-md) var(--mct-radius-md);
  box-shadow: var(--mct-shadow-lg);
  background: var(--mct-surface);
  transform: translateY(10px);
  transition:
    opacity 0.28s var(--mct-ease-smooth),
    transform 0.28s var(--mct-ease-smooth),
    visibility 0.28s var(--mct-ease-smooth);
}
body.mct-enterprise-ui .nav > li.has-dropdown.current-dropdown > .nav-dropdown,
body.mct-enterprise-ui .nav > li.has-dropdown:hover > .nav-dropdown {
  transform: translateY(0);
}

.mct-mega-menu {
  padding: 24px 20px;
  background: var(--mct-surface);
  color: var(--mct-text);
  text-transform: none;
  letter-spacing: 0;
}
.mct-mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.mct-mega-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mct-font-heading);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mct-navy);
  padding-bottom: 10px;
  margin: 0 0 12px;
  border-bottom: 2px solid var(--mct-blue);
}
.mct-mega-col__title a {
  color: inherit;
  text-decoration: none;
}
.mct-mega-col__title a:hover {
  color: var(--mct-blue);
}
.mct-mega-group {
  margin-bottom: 14px;
}
.mct-mega-group__head {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--mct-navy);
  text-decoration: none;
  margin-bottom: 6px;
}
.mct-mega-group__head:hover {
  color: var(--mct-blue);
}
.mct-mega-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mct-mega-list li {
  margin: 0 0 4px;
  padding: 0;
}
.mct-mega-list li a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--mct-text-secondary);
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.2s ease, padding-left 0.22s var(--mct-ease-smooth);
}
.mct-mega-list li a:hover {
  color: var(--mct-blue);
  padding-left: 5px;
}

.mct-mega-promo {
  background: linear-gradient(145deg, var(--mct-navy) 0%, #163766 100%);
  border-radius: var(--mct-radius-md);
  padding: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  height: 100%;
}
.mct-mega-promo__tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid rgba(6, 182, 212, 0.45);
  color: #67E8F9;
  padding: 3px 9px;
  border-radius: var(--mct-radius-pill);
}
.mct-mega-promo h4 {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}
.mct-mega-promo p {
  color: #CBD5E1;
  font-size: 12.8px;
  line-height: 1.55;
  margin: 0;
}
.mct-mega-promo__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Enterprise 4-Column Footer */
.mct-footer-wrap {
  background: var(--mct-navy);
  color: var(--mct-text-on-dark);
  padding: 56px 0 36px;
  border-top: 3px solid var(--mct-blue);
}
.mct-footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1.15fr;
  gap: 32px;
}
.mct-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.mct-footer-brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--mct-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}
.mct-footer-brand__name {
  font-family: var(--mct-font-heading);
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}
.mct-footer-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: #94A3B8;
  margin: 0 0 18px;
}
.mct-footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #CBD5E1;
}
.mct-footer-contact strong {
  color: #fff;
}
.mct-footer-contact a {
  color: #60A5FA;
  text-decoration: none;
}
.mct-footer-contact a:hover {
  color: #fff;
  text-decoration: underline;
}
.mct-footer-heading {
  font-family: var(--mct-font-heading);
  font-size: 14.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--mct-blue);
  display: inline-block;
}
.mct-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mct-footer-links li {
  margin: 0;
  padding: 0;
}
.mct-footer-links li a {
  font-size: 13.5px;
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.22s var(--mct-ease-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mct-footer-links li a::before {
  content: '›';
  color: var(--mct-blue);
  font-weight: 700;
}
.mct-footer-links li a:hover {
  color: #fff;
  padding-left: 4px;
}
.mct-footer-cta-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--mct-radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mct-footer-cta-card p {
  font-size: 13px;
  color: #CBD5E1;
  line-height: 1.55;
  margin: 0;
}
.mct-footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.mct-footer-badge {
  font-size: 11px;
  font-weight: 700;
  color: #E2E8F0;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.35);
  padding: 4px 9px;
  border-radius: var(--mct-radius-sm);
}

body.mct-enterprise-ui .absolute-footer {
  background: var(--mct-navy-deep);
  color: #94A3B8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
  font-size: 12.8px;
}
body.mct-enterprise-ui .absolute-footer a {
  color: #60A5FA;
}

/* Smooth Floating Back-To-Top Button */
.mct-back-top {
  position: fixed;
  left: 22px;
  bottom: 24px;
  z-index: 9980;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: var(--mct-navy);
  box-shadow: 0 8px 22px rgba(11, 31, 58, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.3s var(--mct-ease-smooth);
  margin: 0;
  padding: 0;
}
.mct-back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mct-back-top:hover {
  background: var(--mct-blue);
  border-color: var(--mct-blue);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
}

/* Mobile Sticky Bottom Bar */
.mct-mobile-bar {
  display: none;
}

@media (max-width: 1024px) {
  .mct-mega-grid,
  .mct-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body.mct-enterprise-ui.mct-has-mobile-bar {
    padding-bottom: 64px;
  }
  .mct-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .mct-back-top {
    left: 12px;
    bottom: 72px;
    width: 38px;
    height: 38px;
  }
  .mct-mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--mct-border);
    box-shadow: 0 -4px 18px rgba(11, 31, 58, 0.1);
    height: 60px;
  }
  .mct-mobile-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: var(--mct-font-heading);
    font-size: 11px;
    font-weight: 700;
    color: var(--mct-navy);
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 4px 2px;
    margin: 0;
    cursor: pointer;
    line-height: 1.1;
  }
  .mct-mobile-bar__item--call {
    color: var(--mct-accent);
  }
  .mct-mobile-bar__item--ai {
    background: var(--mct-blue);
    color: #fff;
  }
}
