/* ========================================================================
   Miller Equipment 2026 Template V3
   Purpose: visibly stronger rebrand + fixes for duplicate search bars and
   mobile nav always-visible issue. Loaded after main.css.
   ======================================================================== */
:root {
  --miller-black: #000001;
  --miller-black-2: #111111;
  --miller-gold: #d6a100;
  --miller-gold-2: #f3c63d;
  --miller-paper: #f4f2ec;
  --miller-white: #ffffff;
  --miller-muted: #69707a;
  --miller-line: rgba(0,0,1,.10);
  --miller-shadow: 0 18px 55px rgba(0,0,0,.14);
  --miller-soft-shadow: 0 10px 30px rgba(0,0,0,.08);
}

body {
  background:
    radial-gradient(circle at 8% 4%, rgba(214,161,0,.08), transparent 22%),
    linear-gradient(180deg, #fbfaf6 0%, #f1f2f4 100%) !important;
}

/* Header: full redesign, not a tiny template tweak */
.header.miller-2026-header {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.miller-topbar {
  background: var(--miller-black);
  color: rgba(255,255,255,.84);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(214,161,0,.35);
}

.miller-topbar-inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.miller-topbar i { color: var(--miller-gold); margin-right: 6px; }

.header.miller-2026-header .main-header {
  background: rgba(255,255,255,.92) !important;
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0,0,0,.10);
}

.header.miller-2026-header .main-header-row {
  min-height: 86px;
  gap: 22px;
}

.header.miller-2026-header .miller-logo {
  flex: 0 0 auto;
  padding: 10px 18px;
  border-radius: 22px;
  background: var(--miller-white);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--miller-soft-shadow);
}

.header.miller-2026-header .miller-logo img {
  max-height: 58px !important;
  width: auto !important;
  margin: 0 !important;
  filter: none !important;
}

/* One nav only. No old second nav bar. */
.header-nav { display: none !important; }

.header.miller-2026-header .miller-navmenu {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-start;
  min-width: 0;
}

.header.miller-2026-header .main-menu-list {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
  width: auto !important;
  position: static !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.header.miller-2026-header .main-menu-list > li > a,
.header.miller-2026-header .navmenu a,
.header.miller-2026-header .navmenu a:focus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px;
  padding: 0 13px !important;
  border-radius: 999px !important;
  color: var(--miller-black) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: .045em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.header.miller-2026-header .main-menu-list > li > a:hover,
.header.miller-2026-header .navmenu li:hover > a {
  background: #f4f2ec !important;
  border-color: rgba(0,0,1,.08) !important;
  color: var(--miller-black) !important;
}

.header.miller-2026-header .navmenu a::after,
.header.miller-2026-header .main-menu-list a::after { display: none !important; }

.header.miller-2026-header .main-menu-list .nav-cta a {
  background: var(--miller-black) !important;
  color: #fff !important;
  border-color: var(--miller-black) !important;
  padding: 0 18px !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.16);
}

.header.miller-2026-header .main-menu-list .nav-cta a:hover {
  background: var(--miller-gold) !important;
  color: var(--miller-black) !important;
  border-color: var(--miller-gold) !important;
}

.miller-header-tools {
  flex: 0 0 auto;
  gap: 10px;
  margin-left: auto;
}

/* Fix desktop: exactly one search control. It is an icon until opened. */
.header.miller-2026-header .desktop-search-form {
  display: flex !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  width: auto !important;
  margin: 0 !important;
}

.header.miller-2026-header .desktop-search-form .input-group {
  width: 48px !important;
  height: 48px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 1px solid rgba(0,0,0,.10) !important;
  box-shadow: var(--miller-soft-shadow) !important;
  transition: width .28s ease, border-color .2s ease, box-shadow .2s ease !important;
}

.header.miller-2026-header .desktop-search-form.search-open .input-group,
.header.miller-2026-header .desktop-search-form .input-group:focus-within {
  width: 330px !important;
  border-color: rgba(214,161,0,.60) !important;
}

.header.miller-2026-header .desktop-search-form .form-control {
  order: 1 !important;
  width: 0 !important;
  min-width: 0 !important;
  flex: 0 1 auto !important;
  opacity: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 48px !important;
  transition: opacity .2s ease, width .28s ease, padding .28s ease !important;
}

.header.miller-2026-header .desktop-search-form.search-open .form-control,
.header.miller-2026-header .desktop-search-form .input-group:focus-within .form-control {
  width: 270px !important;
  opacity: 1 !important;
  padding: 0 6px 0 16px !important;
}

.header.miller-2026-header .desktop-search-form .search-expand-btn {
  order: 2 !important;
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  margin: 1px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--miller-black) !important;
  border: 0 !important;
  color: #fff !important;
}

.header.miller-2026-header .desktop-search-form .search-expand-btn:hover {
  background: var(--miller-gold) !important;
  color: var(--miller-black) !important;
}

.header.miller-2026-header .desktop-search-form .search-expand-btn i { font-size: 20px; }

.header.miller-2026-header .header-action-btn,
.header.miller-2026-header .mobile-nav-toggle {
  height: 48px !important;
  min-height: 48px !important;
  width: 48px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(0,0,0,.10) !important;
  background: #fff !important;
  color: var(--miller-black) !important;
  box-shadow: var(--miller-soft-shadow) !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
}

.header.miller-2026-header .account-dropdown .user-btn {
  width: auto !important;
  min-width: 112px !important;
  padding: 0 16px !important;
}

.header.miller-2026-header .icon-with-label {
  display: inline-flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  align-items: center !important;
  line-height: 1 !important;
}

.header.miller-2026-header .header-action-btn i { font-size: 22px !important; }
.header.miller-2026-header .label { font-size: 14px !important; font-weight: 900 !important; margin: 0 !important; }

.header.miller-2026-header .account-dropdown .user-btn:hover,
.header.miller-2026-header .mobile-nav-toggle:hover {
  background: var(--miller-black) !important;
  color: #fff !important;
}

.header.miller-2026-header .account-dropdown .user-btn:hover .label,
.header.miller-2026-header .account-dropdown .user-btn:hover i { color: #fff !important; }

/* Bigger visible template shift: hero/category/cards */
.index-page .hero.section {
  background:
    radial-gradient(circle at 72% 20%, rgba(214,161,0,.22), transparent 20%),
    linear-gradient(135deg, #0b0b0b 0%, #171717 56%, #f2bd1d 56%, #d6a100 100%) !important;
  color: #fff !important;
  overflow: hidden;
}

.index-page .hero .hero-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(42px, 6vw, 86px) 18px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
}

.index-page .hero .hero-title,
.index-page .hero h1 {
  color: #fff !important;
  font-size: clamp(42px, 6vw, 82px) !important;
  line-height: .94 !important;
  letter-spacing: -2.8px !important;
  max-width: 850px;
}

.index-page .hero .hero-description,
.index-page .hero p {
  color: rgba(255,255,255,.82) !important;
  font-size: clamp(16px, 1.5vw, 20px) !important;
  max-width: 700px;
}

.index-page .hero .btn-primary {
  background: var(--miller-gold) !important;
  color: var(--miller-black) !important;
  border-color: var(--miller-gold) !important;
}

.index-page .hero .btn-secondary-modern,
.index-page .hero .btn-secondary {
  border: 1px solid rgba(255,255,255,.28) !important;
  color: #fff !important;
  background: rgba(255,255,255,.08) !important;
  backdrop-filter: blur(8px);
}

.index-page .hero .features-list .feature-item {
  color: #fff !important;
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 999px;
  padding: 10px 14px;
}

.index-page .hero .features-list .feature-item i { color: var(--miller-gold) !important; }

.index-page .hero .hero-visuals img {
  border-radius: 32px !important;
  border: 8px solid rgba(255,255,255,.72) !important;
  box-shadow: 0 35px 90px rgba(0,0,0,.34) !important;
  transform: rotate(-1.5deg);
}

.rebrand-trust-strip {
  margin-top: -28px !important;
  position: relative;
  z-index: 3;
}

.trust-strip-grid {
  background: #fff !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  border-radius: 26px !important;
  box-shadow: var(--miller-shadow) !important;
  padding: 16px !important;
}

.category-card,
.product-item,
.product-card {
  border-radius: 28px !important;
  overflow: hidden !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  box-shadow: 0 14px 42px rgba(0,0,0,.09) !important;
}

.category-card .category-content h4,
.product-name { letter-spacing: -.35px; }

.product-item:hover,
.product-card:hover,
.category-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.16) !important;
}

/* Mobile: menu is OFF by default, only ON after hamburger click. */
@media (max-width: 1199px) {
  .miller-topbar { display: none !important; }

  .header.miller-2026-header .main-header-row {
    min-height: 72px;
    gap: 10px;
  }

  .header.miller-2026-header .miller-logo {
    padding: 7px 9px;
    border-radius: 16px;
  }

  .header.miller-2026-header .miller-logo img {
    max-height: 48px !important;
    max-width: 165px !important;
  }

  .header.miller-2026-header .desktop-search-form { display: none !important; }

  .header.miller-2026-header .account-dropdown .user-btn {
    min-width: 46px !important;
    width: 46px !important;
    height: 46px !important;
    padding: 0 !important;
  }

  .header.miller-2026-header .account-dropdown .label { display: none !important; }

  .header.miller-2026-header .mobile-nav-toggle {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    z-index: 10001 !important;
    margin: 0 !important;
    font-size: 24px !important;
  }

  body.mobile-nav-active { overflow: hidden !important; }

  .header.miller-2026-header .miller-navmenu {
    position: static !important;
    display: block !important;
    flex: 0 0 auto;
    min-width: 0;
  }

  .header.miller-2026-header .miller-navmenu:before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.62);
    opacity: 0;
    visibility: hidden;
    transition: .22s ease;
    z-index: 9997;
  }

  body.mobile-nav-active .header.miller-2026-header .miller-navmenu:before {
    opacity: 1;
    visibility: visible;
  }

  .header.miller-2026-header .main-menu-list,
  .header.miller-2026-header .navmenu > ul,
  .header.miller-2026-header .navmenu ul.main-menu-list {
    display: none !important;
    position: fixed !important;
    top: 84px !important;
    left: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    width: auto !important;
    max-height: calc(100vh - 106px) !important;
    overflow-y: auto !important;
    padding: 12px !important;
    margin: 0 !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 30px 80px rgba(0,0,0,.35) !important;
    border: 1px solid rgba(214,161,0,.28) !important;
    z-index: 9999 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }

  body.mobile-nav-active .header.miller-2026-header .main-menu-list,
  body.mobile-nav-active .header.miller-2026-header .navmenu > ul,
  .mobile-nav-active .header.miller-2026-header .main-menu-list,
  .mobile-nav-active .header.miller-2026-header .navmenu > ul {
    display: flex !important;
  }

  .header.miller-2026-header .main-menu-list li { width: 100% !important; }

  .header.miller-2026-header .main-menu-list > li > a,
  .header.miller-2026-header .navmenu a,
  .header.miller-2026-header .navmenu a:focus {
    width: 100% !important;
    justify-content: flex-start !important;
    min-height: 48px !important;
    padding: 0 16px !important;
    background: #f7f7f4 !important;
    border: 1px solid rgba(0,0,0,.06) !important;
    border-radius: 14px !important;
    color: var(--miller-black) !important;
  }

  .header.miller-2026-header .main-menu-list .nav-cta a {
    justify-content: center !important;
    background: var(--miller-black) !important;
    color: #fff !important;
  }

  .mobile-menu-search {
    display: block !important;
    padding-bottom: 8px;
  }

  .mobile-menu-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 16px;
    background: #f2f2ef;
    border: 1px solid rgba(0,0,0,.08);
  }

  .mobile-menu-search-form input {
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 10px;
    font-weight: 700;
  }

  .mobile-menu-search-form button {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: var(--miller-black);
    color: #fff;
  }

  #mobileSearch { display: none !important; }

  .index-page .hero .hero-container {
    grid-template-columns: 1fr !important;
    padding-top: 38px !important;
  }

  .index-page .hero.section {
    background: linear-gradient(180deg, #090909 0%, #151515 70%, #d6a100 70%, #d6a100 100%) !important;
  }
}

@media (min-width: 1200px) {
  .mobile-menu-search { display: none !important; }
  .mobile-nav-toggle { display: none !important; }
}

@media (max-width: 575px) {
  .header.miller-2026-header .miller-logo img { max-width: 140px !important; }
  .miller-header-tools { gap: 7px; }
  .header.miller-2026-header .header-action-btn,
  .header.miller-2026-header .mobile-nav-toggle,
  .header.miller-2026-header .account-dropdown .user-btn {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
  .index-page .hero .hero-title,
  .index-page .hero h1 { font-size: 39px !important; }
}

/* Miller 2026 header compatibility guard:
   The live header now uses .miller-mobile-toggle and .miller-mobile-open.
   Prevent older template mobile-nav-active rules from reopening the menu. */
body.mobile-nav-active #header.miller-2026-header:not(.miller-mobile-open) .main-menu-list,
body.mobile-nav-active #header.miller-2026-header:not(.miller-mobile-open) .navmenu > ul {
  display: none !important;
}
