/* ===========================================================
   USM Car Parts — modern header
   Scoped under .usm-header so nothing else is affected.
   Fonts inherited from style.css (Outfit / Roboto).
   =========================================================== */

.usm-header {
  --usm-accent: var(--theme-color, #F05A28);
  --usm-ink: #111111;
  --usm-muted: #6A6A6A;
  --usm-line: #e8e8ea;
  --usm-soft: #f6f7f9;
  --usm-ease: cubic-bezier(.22, .61, .36, 1);
  position: relative;
  z-index: 999;
}

/* ===========================================================
   1. Top bar
   =========================================================== */
.usm-header .header-top {
  padding: 0;
  background: #0c0c0f;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.usm-header .header-top .top-inner {
  min-height: 44px;
  gap: 16px;
}

.usm-header .header-top .info-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 0;
  margin-right: 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
}

.usm-header .header-top .info-list li i {
  position: static;
  font-size: 14px;
  color: var(--usm-accent);
}

.usm-header .header-top .info-list li button,
.usm-header .header-top .info-list li a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .82);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color .3s var(--usm-ease);
}

.usm-header .header-top .info-list li button:hover,
.usm-header .header-top .info-list li a:hover {
  color: var(--usm-accent);
}

.usm-header .header-top .right-column {
  gap: 20px;
}

/* currency switcher as a segmented pill */
.usm-header .header-top .currency-switcher {
  margin: 0 !important;
  padding: 3px;
  gap: 2px !important;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 30px;
}

.usm-header .header-top .currency-switcher span {
  display: none;
}

.usm-header .header-top .currency-switcher a {
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600 !important;
  line-height: 18px;
  color: rgba(255, 255, 255, .6);
  text-decoration: none !important;
  transition: all .3s var(--usm-ease);
}

.usm-header .header-top .currency-switcher a:hover {
  color: #fff;
}

/* the active one is bolded inline by PHP — pick it up from that */
.usm-header .header-top .currency-switcher a[style*="700"] {
  background: var(--usm-accent);
  color: #fff;
}

.usm-header .header-top .right-column .text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 0;
  margin: 0 !important;
}

.usm-header .header-top .right-column .text i {
  position: static;
  font-size: 14px;
  color: var(--usm-accent);
}

.usm-header .header-top .right-column .text p {
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
}

/* ===========================================================
   2. Upper bar — logo / search / actions
   =========================================================== */
.usm-header .header-upper {
  padding: 18px 0;
  background:
    radial-gradient(600px 240px at 12% 0%, rgba(240, 90, 40, .16) 0%, rgba(240, 90, 40, 0) 70%),
    linear-gradient(120deg, #101112 0%, #17161a 100%);
}

.usm-header .header-upper .upper-inner {
  gap: 28px;
}

.usm-header .logo-box img {
  transition: transform .4s var(--usm-ease);
}

.usm-header .logo-box a:hover img {
  transform: scale(1.03);
}

/* ---- search ---- */
.usm-header .header-upper .search-area {
  flex: 1 1 auto;
  width: auto;
  max-width: 720px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px;
  transition: border-color .3s var(--usm-ease), box-shadow .3s var(--usm-ease);
}

.usm-header .header-upper .search-area:focus-within {
  border-color: var(--usm-accent);
  box-shadow: 0 0 0 4px rgba(240, 90, 40, .18);
}

.usm-header .header-upper .search-area .category-inner,
.usm-header .header-upper .search-area .category-inner .nice-select {
  width: 190px;
}

.usm-header .header-upper .search-area .category-inner .nice-select {
  height: 46px;
  line-height: 46px;
  padding: 0 34px 0 22px;
  border: 0;
  border-right: 1px solid var(--usm-line);
  border-radius: 999px 0 0 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}

.usm-header .header-upper .search-area .category-inner .nice-select:before {
  top: 0;
  right: 18px;
  line-height: 46px;
  color: var(--usm-muted);
}

.usm-header .header-upper .search-area .search-box .form-group {
  width: auto;
  flex: 1 1 auto;
}

.usm-header .header-upper .search-area .search-box {
  flex: 1 1 auto;
}

.usm-header .header-upper .search-area .search-box .form-group input[type='search'] {
  height: 46px;
  padding: 0 58px 0 20px;
  border: 0;
  background: transparent;
  font-size: 14px;
}

.usm-header .header-upper .search-area .search-box .form-group input[type='search']:focus {
  outline: none;
}

.usm-header .header-upper .search-area .search-box .form-group button[type='submit'] {
  top: 3px;
  right: 3px;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background: var(--usm-accent);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.usm-header .header-upper .search-area .search-box .form-group input:focus + button,
.usm-header .header-upper .search-area .search-box .form-group button:hover {
  background: var(--usm-ink);
}

/* ---- wishlist / cart ---- */
.usm-header .header-upper .option-list {
  gap: 12px;
}

.usm-header .header-upper .option-list li {
  margin-right: 0 !important;
}

.usm-header .header-upper .option-list li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 17px;
  transition: background .3s var(--usm-ease), border-color .3s var(--usm-ease), transform .3s var(--usm-ease);
}

.usm-header .header-upper .option-list li a:hover {
  background: var(--usm-accent);
  border-color: var(--usm-accent);
  transform: translateY(-2px);
}

.usm-header .header-upper .option-list li a span {
  top: -3px;
  right: -3px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  background: var(--usm-accent);
  border: 2px solid #131315;
  font-size: 11px;
}

.usm-header .header-upper .option-list li a:hover span {
  background: var(--usm-ink);
}

/* ===========================================================
   3. Lower bar — categories / nav / account
   =========================================================== */
.usm-header .header-lower {
  background: #fff;
  border-bottom: 1px solid var(--usm-line);
  box-shadow: 0 6px 20px rgba(17, 17, 17, .05);
}

.usm-header .header-lower .outer-box {
  padding-left: 320px;
  min-height: 66px;
}

/* the "All Categories" trigger becomes a solid accent button */
.usm-header .outer-box .category-box {
  top: 12px;
  width: 292px;
  padding: 13px 20px;
  border: 0 !important;
  border-radius: 10px;
  background: var(--usm-accent);
  box-shadow: 0 8px 20px rgba(240, 90, 40, .28);
  transition: box-shadow .3s var(--usm-ease);
}

.usm-header .outer-box .category-box:hover {
  border-radius: 10px 10px 0 0;
  box-shadow: 0 10px 24px rgba(240, 90, 40, .36);
}

.usm-header .outer-box .category-box .text,
.usm-header .outer-box .category-box .text i,
.usm-header .outer-box .category-box .text:before {
  color: #fff;
}

.usm-header .outer-box .category-box .text {
  font-weight: 600;
  letter-spacing: .2px;
}

.usm-header .outer-box .category-box .text:before {
  transition: transform .3s var(--usm-ease);
}

.usm-header .outer-box .category-box:hover .text:before {
  transform: rotate(180deg);
}

/* dropdown panel */
.usm-header .outer-box .category-box .category-list {
  width: 292px;
  padding: 10px;
  border: 1px solid var(--usm-line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 18px 40px rgba(17, 17, 17, .12);
}

.usm-header .outer-box .category-box .category-list > li > a {
  padding: 11px 34px 11px 16px;
  border-radius: 8px;
  font-size: 14.5px;
  line-height: 22px;
  transition: background .25s var(--usm-ease), color .25s var(--usm-ease), padding-left .25s var(--usm-ease);
}

.usm-header .outer-box .category-box .category-list > li > a:hover {
  background: rgba(240, 90, 40, .09);
  color: var(--usm-accent);
  padding-left: 22px;
}

.usm-header .outer-box .category-box .category-list > li.category-dropdown > a:before {
  top: 10px;
  right: 14px;
}

.usm-header .outer-box .category-box .category-list .list-inner {
  border-radius: 14px;
  box-shadow: 0 24px 50px rgba(17, 17, 17, .14);
  border: 1px solid var(--usm-line);
}

.usm-header .outer-box .category-box .list-inner li a {
  border-radius: 6px;
  transition: color .25s var(--usm-ease);
}

.usm-header .outer-box .category-box .list-inner li a:hover {
  color: var(--usm-accent);
}

/* ---- main nav ---- */
.usm-header .main-menu .navigation > li {
  margin-right: 4px;
}

.usm-header .main-menu .navigation > li > a {
  position: relative;
  padding: 22px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--usm-ink);
  transition: color .3s var(--usm-ease);
}

/* underline grows from centre */
.usm-header .main-menu .navigation > li > a:after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--usm-accent);
  transform: translateX(-50%);
  transition: width .35s var(--usm-ease);
}

.usm-header .main-menu .navigation > li:hover > a,
.usm-header .main-menu .navigation > li.current > a {
  color: var(--usm-accent);
}

.usm-header .main-menu .navigation > li:hover > a:after,
.usm-header .main-menu .navigation > li.current > a:after {
  width: calc(100% - 32px);
}

/* ---- account button ---- */
.usm-header .menu-right-content .btn-box a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border: 1px solid var(--usm-line);
  border-radius: 30px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--usm-ink);
  transition: all .3s var(--usm-ease);
}

.usm-header .menu-right-content .btn-box a i {
  position: static;
  font-size: 17px;
  color: var(--usm-accent);
  transition: color .3s var(--usm-ease);
}

.usm-header .menu-right-content .btn-box a:hover {
  background: var(--usm-ink);
  border-color: var(--usm-ink);
  color: #fff;
}

.usm-header .menu-right-content .btn-box a:hover i {
  color: #fff;
}

/* ===========================================================
   4. Sticky header — frosted
   =========================================================== */
.usm-header .sticky-header {
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--usm-line);
  box-shadow: 0 6px 24px rgba(17, 17, 17, .08);
}

.usm-header .sticky-header .outer-box {
  padding-left: 320px;
}

/* ===========================================================
   5. Mobile
   =========================================================== */
@media (max-width: 1199px) {
  .usm-header .header-lower .outer-box,
  .usm-header .sticky-header .outer-box {
    padding-left: 0;
  }

  .usm-header .outer-box .category-box {
    position: relative;
    top: 0;
    width: 100%;
    margin: 12px 0;
  }

  .usm-header .outer-box .category-box .category-list {
    width: 100%;
  }
}

@media (max-width: 991px) {
  .usm-header .header-upper .upper-inner {
    flex-wrap: wrap;
    gap: 16px;
  }

  .usm-header .header-upper .search-area {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
  }

  .usm-header .header-upper .search-area .category-inner,
  .usm-header .header-upper .search-area .category-inner .nice-select {
    width: 140px;
  }

  .usm-header .header-top .top-inner {
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 8px 0;
  }

  .usm-header .header-top .right-column .text {
    display: none;
  }
}

@media (max-width: 575px) {
  .usm-header .logo-box img {
    width: 150px !important;
  }

  .usm-header .header-upper .search-area .category-inner {
    display: none;
  }

  .usm-header .header-upper .option-list li a {
    width: 42px;
    height: 42px;
  }
}

/* ===========================================================
   6. Live search dropdown
   =========================================================== */
.usm-header .header-upper .search-area {
  position: relative;
}

.usm-header .search-box {
  position: static;
}

.usm-header .usm-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  max-height: 400px;
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--usm-line);
  border-radius: 14px;
  box-shadow: 0 24px 50px rgba(17, 17, 17, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .25s var(--usm-ease), transform .25s var(--usm-ease), visibility .25s var(--usm-ease);
}

.usm-header .usm-search-results.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.usm-header .usm-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  transition: background .2s var(--usm-ease);
}

.usm-header .usm-search-item:hover {
  background: var(--usm-soft);
}

.usm-header .usm-search-item figure {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--usm-soft);
  border: 1px solid var(--usm-line);
  border-radius: 8px;
  overflow: hidden;
}

.usm-header .usm-search-item figure img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.usm-header .usm-search-text {
  min-width: 0;
}

.usm-header .usm-search-text h6 {
  font-size: 14px;
  line-height: 20px;
  color: var(--usm-ink);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.usm-header .usm-search-text span {
  font-size: 13px;
  font-weight: 600;
  color: var(--usm-accent);
}

.usm-header .usm-search-hint {
  padding: 16px 12px;
  text-align: center;
  font-size: 13.5px;
  color: var(--usm-muted);
}

/* ===========================================================
   7. Shop mega menu
   =========================================================== */
.usm-header .main-menu .navigation > li.usm-mega-parent {
  position: static;   /* panel spans the whole header row */
}

.usm-header .usm-caret {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .3s var(--usm-ease);
}

.usm-header .usm-mega-parent:hover .usm-caret {
  transform: rotate(-135deg) translateY(-2px);
}

.usm-header .usm-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 60;
  padding-top: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity .3s var(--usm-ease), transform .3s var(--usm-ease), visibility .3s var(--usm-ease);
}

.usm-header .usm-mega-parent:hover .usm-mega,
.usm-header .usm-mega-parent:focus-within .usm-mega {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.usm-header .usm-mega-panel {
  max-width: 1480px;
  width: calc(100vw - 40px);
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--usm-line);
  border-radius: 20px;
  box-shadow: 0 34px 80px rgba(17, 17, 17, .22);
  overflow: hidden;
}

.usm-header .usm-mega-inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  padding: 32px 34px 26px;
  background:
    radial-gradient(700px 260px at 0% 0%, rgba(240, 90, 40, .05) 0%, rgba(240, 90, 40, 0) 70%),
    #fff;
}

/* ---- category columns ---- */
.usm-header .usm-mega-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 26px;
}

.usm-header .usm-mega-col {
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background .3s var(--usm-ease), border-color .3s var(--usm-ease), transform .3s var(--usm-ease);
}

.usm-header .usm-mega-col:hover {
  background: var(--usm-soft);
  border-color: var(--usm-line);
  transform: translateY(-2px);
}

/* category thumbnail beside the heading */
.usm-header .usm-mega-thumb {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  background: var(--usm-soft);
  border: 1px solid var(--usm-line);
  overflow: hidden;
}

.usm-header .usm-mega-col:hover .usm-mega-thumb {
  border-color: rgba(240, 90, 40, .4);
  background: #fff;
}

.usm-header .usm-mega-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.usm-header .usm-mega-col h6 {
  margin: 0 0 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--usm-line);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 20px;
}

.usm-header .usm-mega-col h6 a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--usm-ink);
  transition: color .25s var(--usm-ease);
}

.usm-header .usm-mega-col h6 a:hover {
  color: var(--usm-accent);
}

.usm-header .usm-mega-col ul {
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.usm-header .usm-mega-col ul li a {
  display: block;
  padding: 5px 8px 5px 0;
  font-size: 13.5px;
  line-height: 20px;
  color: var(--usm-muted);
  border-radius: 6px;
  transition: color .2s var(--usm-ease), padding-left .2s var(--usm-ease);
}

.usm-header .usm-mega-col ul li a:hover {
  color: var(--usm-accent);
  padding-left: 6px;
}

.usm-header .usm-mega-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--usm-accent);
}

.usm-header .usm-mega-more:after {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

/* ---- promo card ---- */
.usm-header .usm-mega-promo {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(300px 180px at 50% 0%, rgba(240, 90, 40, .22) 0%, rgba(240, 90, 40, 0) 70%),
    linear-gradient(160deg, #16151a 0%, #241a13 100%);
  color: #fff;
  text-align: center;
  transition: transform .35s var(--usm-ease), box-shadow .35s var(--usm-ease);
}

.usm-header .usm-mega-promo:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg,
      rgba(255, 255, 255, .035) 0px,
      rgba(255, 255, 255, .035) 1px,
      transparent 1px,
      transparent 10px);
  pointer-events: none;
}

.usm-header .usm-mega-promo:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px rgba(0, 0, 0, .35);
}

.usm-header .usm-mega-tag {
  align-self: center;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 30px;
  background: rgba(240, 90, 40, .18);
  border: 1px solid rgba(240, 90, 40, .35);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--usm-accent);
}

.usm-header .usm-mega-promo figure {
  height: 130px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.usm-header .usm-mega-promo figure img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.usm-header .usm-mega-promo h6 {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 20px;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.usm-header .usm-mega-price {
  font-size: 21px;
  font-weight: 700;
  color: var(--usm-accent);
  margin-bottom: 12px;
}

.usm-header .usm-mega-cta {
  margin-top: auto;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--usm-accent);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  transition: background .25s var(--usm-ease);
}

.usm-header .usm-mega-promo:hover .usm-mega-cta {
  background: #d8410f;
}

/* ---- footer strip ---- */
.usm-header .usm-mega-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 15px 34px;
  background: var(--usm-soft);
  border-top: 1px solid var(--usm-line);
}

.usm-header .usm-mega-foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.usm-header .usm-mega-foot li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--usm-muted);
}

.usm-header .usm-mega-foot li i {
  color: var(--usm-accent);
  font-size: 15px;
}

.usm-header .usm-mega-allbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 30px;
  background: var(--usm-accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(240, 90, 40, .3);
  transition: all .3s var(--usm-ease);
}

.usm-header .usm-mega-allbtn:after {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.usm-header .usm-mega-allbtn:hover {
  background: var(--usm-ink);
  color: #fff;
  box-shadow: 0 10px 22px rgba(17, 17, 17, .3);
}

@media (max-width: 1399px) {
  .usm-header .usm-mega-cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- mobile: no hover, so fold it into the normal nav ---- */
@media (max-width: 991px) {
  .usm-header .usm-mega {
    display: none;
  }
}
