/* ==========================================================================
   YT Digital Power — Global layout
   Header, mega menu, mobile drawer, search, footer and fixed overlays.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.yt-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--yt-z-header);
  background: var(--yt-white);
  color: var(--yt-ink);
  transition:
    background-color var(--yt-dur-fast) var(--yt-ease),
    color var(--yt-dur-fast) var(--yt-ease),
    box-shadow var(--yt-dur-fast) var(--yt-ease);
}

.yt-header--transparent:not(.is-scrolled):not(.is-mega-open) {
  background: transparent;
  color: var(--yt-white);
  box-shadow: none;
}

.yt-header.is-scrolled,
.yt-header.is-mega-open {
  box-shadow: 0 1px 0 var(--yt-line);
}

.yt-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--yt-header-h);
}

/* Brand: both logos are always in the DOM; CSS cross-fades them. */
.yt-header__brand {
  position: relative;
  display: block;
  flex: none;
  width: 126px;
  height: 44px;
}

.yt-header__logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transition: opacity var(--yt-dur-fast) var(--yt-ease);
}

.yt-header__logo--light {
  opacity: 0;
}

.yt-header__logo--dark {
  opacity: 1;
}

.yt-header--transparent:not(.is-scrolled):not(.is-mega-open) .yt-header__logo--light {
  opacity: 1;
}

.yt-header--transparent:not(.is-scrolled):not(.is-mega-open) .yt-header__logo--dark {
  opacity: 0;
}

/* Primary navigation */
.yt-header__nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.yt-nav {
  display: flex;
  align-items: stretch;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yt-nav__item {
  display: flex;
  margin: 0;
}

.yt-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--yt-header-h);
  color: inherit;
  font-size: var(--yt-fs-16);
  font-weight: var(--yt-fw-regular);
  line-height: var(--yt-lh-24);
  white-space: nowrap;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-nav__link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--yt-red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--yt-dur-fast) var(--yt-ease);
}

.yt-nav__link:hover,
.yt-nav__link[aria-expanded="true"],
.yt-nav__link.is-active,
.yt-nav__item.is-active > .yt-nav__link {
  color: var(--yt-red);
}

.yt-nav__link:hover::after,
.yt-nav__link[aria-expanded="true"]::after,
.yt-nav__link.is-active::after,
.yt-nav__item.is-active > .yt-nav__link::after {
  transform: scaleX(1);
}

.yt-header__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.yt-header__cta,
.yt-header__docs {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 4px;
  color: inherit;
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
  white-space: nowrap;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-header__cta:hover,
.yt-header__docs:hover {
  color: var(--yt-red);
}

.yt-header__burger {
  display: none;
}

/* --------------------------------------------------------------------------
   Language panel
   -------------------------------------------------------------------------- */
.yt-lang {
  position: relative;
}

.yt-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-lang__btn:hover,
.yt-lang__btn[aria-expanded="true"] {
  color: var(--yt-red);
}

.yt-lang__btn .yt-icon {
  width: 18px;
  height: 18px;
}

.yt-lang__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2;
  min-width: 232px;
  padding: 8px 0;
  border: 1px solid var(--yt-line);
  background: var(--yt-white);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
  color: var(--yt-ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity var(--yt-dur-fast) var(--yt-ease),
    transform var(--yt-dur-fast) var(--yt-ease),
    visibility 0s linear var(--yt-dur-fast);
}

.yt-lang__panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity var(--yt-dur-fast) var(--yt-ease),
    transform var(--yt-dur-fast) var(--yt-ease),
    visibility 0s;
}

.yt-lang__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.yt-lang__item {
  margin: 0;
}

.yt-lang__item a {
  display: block;
  padding: 10px 20px;
  color: var(--yt-ink);
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
  transition:
    background-color var(--yt-dur-fast) var(--yt-ease),
    color var(--yt-dur-fast) var(--yt-ease);
}

.yt-lang__item a:hover {
  background: var(--yt-bg-soft);
  color: var(--yt-red);
}

/* --------------------------------------------------------------------------
   Mega menu
   -------------------------------------------------------------------------- */
.yt-mega {
  position: fixed;
  top: var(--yt-header-h);
  right: 0;
  left: 0;
  z-index: var(--yt-z-mega);
  max-height: calc(100vh - var(--yt-header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--yt-white);
  color: var(--yt-ink);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition:
    opacity var(--yt-dur-fast) var(--yt-ease),
    transform var(--yt-dur-fast) var(--yt-ease),
    visibility 0s linear var(--yt-dur-fast);
}

.yt-mega.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity var(--yt-dur-fast) var(--yt-ease),
    transform var(--yt-dur-fast) var(--yt-ease),
    visibility 0s;
}

.yt-mega__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: calc(var(--yt-container) + var(--yt-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--yt-gutter);
}

/* Products: rail + solution grid + quick links */
.yt-mega[data-channel="products"] .yt-mega__inner {
  grid-template-columns: 296px minmax(0, 1fr) 272px;
}

.yt-mega:not([data-channel="products"]) .yt-mega__rail,
.yt-mega:not([data-channel="products"]) .yt-mega__quick {
  display: none;
}

.yt-mega__rail {
  display: block;
  padding: 24px 0;
  background: var(--yt-bg-soft);
}

.yt-mega__rail-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 8px 24px;
  border: 0;
  background: none;
  color: var(--yt-ink);
  font-family: inherit;
  font-size: var(--yt-fs-16);
  font-weight: var(--yt-fw-regular);
  line-height: var(--yt-lh-24);
  text-align: left;
  cursor: pointer;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-mega__rail-item:hover,
.yt-mega__rail-item:focus-visible,
.yt-mega__rail-item.is-active {
  color: var(--yt-red);
}

.yt-mega__panels {
  min-width: 0;
  padding: 32px 0 40px 48px;
}

.yt-mega__panel {
  min-width: 0;
}

.yt-mega__eyebrow {
  margin: 0 0 24px;
  color: var(--yt-gray-60);
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
}

.yt-mega__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  row-gap: 36px;
}

.yt-mega__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  color: var(--yt-ink);
  text-decoration: none;
}

.yt-mega__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 104px;
  overflow: hidden;
}

.yt-mega__thumb img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 104px;
  object-fit: contain;
  transition: transform var(--yt-dur) var(--yt-ease);
}

.yt-mega__thumb .yt-media-placeholder {
  height: 100%;
  min-height: 0;
}

.yt-mega__label {
  font-size: var(--yt-fs-16);
  line-height: var(--yt-lh-24);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-mega__desc {
  margin-top: -4px;
  color: var(--yt-gray-60);
  font-size: var(--yt-fs-13);
  line-height: var(--yt-lh-21);
}

.yt-mega__badge {
  display: inline-block;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 2px;
  background: var(--yt-red);
  color: var(--yt-white);
  font-size: var(--yt-fs-12);
  line-height: var(--yt-lh-16);
  vertical-align: middle;
  white-space: nowrap;
}

.yt-mega__card:hover .yt-mega__label,
.yt-mega__card:focus-visible .yt-mega__label {
  color: var(--yt-red);
}

.yt-mega__card:hover .yt-mega__thumb img {
  transform: translateY(-3px);
}

.yt-mega__quick {
  padding: 40px 0 40px 40px;
  border-left: 1px solid var(--yt-line);
}

.yt-mega__quick-title {
  margin: 0 0 16px;
  color: var(--yt-gray-60);
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
}

.yt-mega__quick a {
  display: block;
  padding: 8px 0;
  color: var(--yt-ink);
  font-size: var(--yt-fs-16);
  line-height: var(--yt-lh-24);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-mega__quick a:hover {
  color: var(--yt-red);
}

/* Non-products channels: multi-column link lists */
.yt-mega__columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px;
  padding: 48px 0 56px;
}

.yt-mega__column {
  min-width: 0;
}

.yt-mega__column-title {
  margin: 0 0 20px;
  color: var(--yt-gray-60);
  font-size: var(--yt-fs-14);
  font-weight: var(--yt-fw-regular);
  line-height: var(--yt-lh-21);
}

.yt-mega__column-desc {
  margin: -12px 0 16px;
  color: var(--yt-gray-60);
  font-size: var(--yt-fs-13);
  line-height: var(--yt-lh-21);
}

.yt-mega__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yt-mega__list a {
  color: var(--yt-ink);
  font-size: var(--yt-fs-16);
  line-height: var(--yt-lh-24);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-mega__list a:hover {
  color: var(--yt-red);
}

@media (min-width: 1360px) {
  .yt-mega[data-channel="products"] .yt-mega__inner {
    max-width: none;
    padding-inline: 0;
    grid-template-columns: 300px minmax(0, 1fr) 472px;
  }

  .yt-mega[data-channel="products"] .yt-mega__rail {
    padding-top: 32px;
  }

  .yt-mega[data-channel="products"] .yt-mega__rail-item {
    min-height: 40px;
    padding: 4px 24px 4px 80px;
  }

  .yt-mega[data-channel="products"] .yt-mega__panels {
    padding: 48px 0 40px 60px;
  }

  .yt-mega[data-channel="products"] .yt-mega__grid {
    grid-template-columns: repeat(2, 213px);
    column-gap: 0;
    row-gap: 20px;
  }

  .yt-mega[data-channel="products"] .yt-mega__thumb {
    height: 120px;
  }

  .yt-mega[data-channel="products"] .yt-mega__thumb img {
    max-height: 120px;
  }

  .yt-mega[data-channel="products"] .yt-mega__quick {
    padding: 76px 0 40px 64px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .yt-mega[data-channel="products"] .yt-mega__inner {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .yt-mega__quick {
    display: none;
  }

  .yt-mega__rail-item {
    padding-inline: 20px;
    font-size: var(--yt-fs-15);
  }

  .yt-mega__panels {
    padding: 28px 0 36px 32px;
  }

  .yt-mega__grid {
    column-gap: 24px;
    row-gap: 28px;
  }

  .yt-mega__thumb {
    height: 88px;
  }

  .yt-mega__thumb img {
    max-height: 88px;
  }

  .yt-mega__columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    padding: 40px 0 48px;
  }
}

/* --------------------------------------------------------------------------
   Mobile drawer
   -------------------------------------------------------------------------- */
.yt-mobile {
  position: fixed;
  inset: 0;
  z-index: var(--yt-z-mobile);
  visibility: hidden;
  opacity: 0;
  transition:
    opacity var(--yt-dur) var(--yt-ease),
    visibility 0s linear var(--yt-dur);
}

.yt-mobile.is-open {
  visibility: visible;
  opacity: 1;
  transition:
    opacity var(--yt-dur) var(--yt-ease),
    visibility 0s;
}

.yt-mobile__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.yt-mobile__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  height: 100%;
  background: var(--yt-white);
  color: var(--yt-ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform var(--yt-dur) var(--yt-ease);
}

.yt-mobile.is-open .yt-mobile__panel {
  transform: translateX(0);
}

.yt-mobile__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--yt-header-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--yt-line);
  background: var(--yt-white);
}

.yt-mobile__brand {
  display: block;
  width: 112px;
  height: 40px;
}

.yt-mobile__brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.yt-mobile__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--yt-ink);
  cursor: pointer;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-mobile__close:hover {
  color: var(--yt-red);
}

.yt-mobile__nav {
  flex: none;
  padding: 0 20px;
}

.yt-mobile__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.yt-mobile__item {
  margin: 0;
  border-bottom: 1px solid var(--yt-line);
}

.yt-mobile__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 17px 0;
  border: 0;
  background: none;
  color: var(--yt-ink);
  font-family: inherit;
  font-size: var(--yt-fs-16);
  font-weight: var(--yt-fw-regular);
  line-height: var(--yt-lh-24);
  text-align: left;
  cursor: pointer;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-mobile__trigger:hover {
  color: var(--yt-red);
}

.yt-mobile__trigger::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--yt-dur-fast) var(--yt-ease);
}

.yt-mobile__trigger[aria-expanded="true"]::after {
  transform: rotate(-135deg);
}

.yt-mobile__sub {
  margin: 0 -20px;
  padding: 4px 20px 16px;
  border-top: 1px solid var(--yt-line);
  background: var(--yt-bg-soft);
}

.yt-mobile__sub-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.yt-mobile__col-title {
  margin: 16px 0 6px;
  color: var(--yt-ink);
  font-size: var(--yt-fs-14);
  font-weight: var(--yt-fw-bold);
  line-height: var(--yt-lh-21);
}

.yt-mobile__col-title:first-child {
  margin-top: 4px;
}

.yt-mobile__subitem {
  margin: 0;
}

.yt-mobile__subitem > .yt-mobile__link,
.yt-mobile__sub-list .yt-mobile__link {
  display: block;
  padding: 7px 0;
  color: var(--yt-gray-60);
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-mobile__sub-list .yt-mobile__link:hover {
  color: var(--yt-red);
}

.yt-mobile__sub-list .yt-mobile__sub-list {
  padding-left: 14px;
}

.yt-mobile__link {
  display: block;
  padding: 10px 0;
  color: var(--yt-ink);
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-mobile__link:hover {
  color: var(--yt-red);
}

/* Non-expandable top-level items should match the trigger row height. */
.yt-mobile__link--top {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 17px 0;
  color: var(--yt-ink);
  font-size: var(--yt-fs-16);
  line-height: var(--yt-lh-24);
}

.yt-mobile__link--top:hover {
  color: var(--yt-red);
}

.yt-mobile__lang {
  padding: 24px 20px;
  border-top: 1px solid var(--yt-line);
}

.yt-mobile__lang p {
  margin: 0 0 10px;
  color: var(--yt-gray);
  font-size: var(--yt-fs-12);
  line-height: var(--yt-lh-16);
  letter-spacing: var(--yt-tracking-wide);
  text-transform: uppercase;
}

.yt-mobile__lang a {
  display: block;
  padding: 6px 0;
  color: var(--yt-ink);
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-mobile__lang a:hover {
  color: var(--yt-red);
}

.yt-mobile__foot {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--yt-line);
  background: var(--yt-white);
}

.yt-mobile__foot .yt-btn {
  width: 100%;
}

@media (max-width: 767px) {
  .yt-mobile__panel {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .yt-mobile {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Search overlay
   -------------------------------------------------------------------------- */
.yt-search {
  position: fixed;
  inset: 0;
  z-index: var(--yt-z-search);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--yt-white);
  color: var(--yt-ink);
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 250ms var(--yt-ease),
    visibility 0s linear 250ms;
}

.yt-search.is-open {
  visibility: visible;
  opacity: 1;
  transition:
    opacity 250ms var(--yt-ease),
    visibility 0s;
}

.yt-search__dialog {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  padding: calc(var(--yt-header-h) + 48px) 24px 80px;
  transform: translateY(-12px);
  transition: transform var(--yt-dur) var(--yt-ease);
}

.yt-search.is-open .yt-search__dialog {
  transform: translateY(0);
}

.yt-search__form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--yt-ink);
}

.yt-search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 56px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--yt-ink);
  font-family: inherit;
  font-size: var(--yt-fs-32);
  font-weight: var(--yt-fw-regular);
  line-height: 1.2;
}

.yt-search__input::placeholder {
  color: var(--yt-gray);
  opacity: 1;
}

.yt-search__input:focus {
  outline: none;
}

.yt-search__input::-webkit-search-cancel-button,
.yt-search__input::-webkit-search-decoration,
.yt-search__input::-webkit-search-results-button,
.yt-search__input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.yt-search__form:focus-within {
  border-bottom-color: var(--yt-red);
}

.yt-search__submit {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--yt-ink);
  cursor: pointer;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-search__submit:hover {
  color: var(--yt-red);
}

.yt-search__submit .yt-icon {
  width: 24px;
  height: 24px;
}

.yt-search__close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--yt-line);
  background: transparent;
  color: var(--yt-ink);
  font-family: inherit;
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
  cursor: pointer;
  transition:
    color var(--yt-dur-fast) var(--yt-ease),
    border-color var(--yt-dur-fast) var(--yt-ease);
}

.yt-search__close:hover {
  border-color: var(--yt-red);
  color: var(--yt-red);
}

.yt-search__body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  margin-top: 40px;
}

.yt-search__quick-title {
  margin: 0 0 14px;
  color: var(--yt-gray-60);
  font-size: var(--yt-fs-12);
  font-weight: var(--yt-fw-bold);
  line-height: var(--yt-lh-16);
  letter-spacing: var(--yt-tracking-wide);
  text-transform: uppercase;
}

.yt-search__quick a {
  display: block;
  padding: 7px 0;
  color: var(--yt-ink);
  font-size: var(--yt-fs-16);
  line-height: var(--yt-lh-24);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-search__quick a:hover {
  color: var(--yt-red);
}

.yt-search__results {
  min-width: 0;
  min-height: 220px;
}

.yt-search__group + .yt-search__group {
  margin-top: 32px;
}

.yt-search__group-title {
  margin: 0 0 8px;
  color: var(--yt-gray-60);
  font-size: var(--yt-fs-12);
  font-weight: var(--yt-fw-bold);
  line-height: var(--yt-lh-16);
  letter-spacing: var(--yt-tracking-wide);
  text-transform: uppercase;
}

.yt-search__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--yt-line);
  color: var(--yt-ink);
  text-decoration: none;
}

.yt-search__item-title {
  min-width: 0;
  font-size: var(--yt-fs-16);
  line-height: var(--yt-lh-24);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-search__item-type {
  flex: none;
  color: var(--yt-gray);
  font-size: var(--yt-fs-12);
  line-height: var(--yt-lh-16);
  white-space: nowrap;
}

.yt-search__item:hover .yt-search__item-title {
  color: var(--yt-red);
}

.yt-search__empty,
.yt-search__loading,
.yt-search__error {
  margin: 0;
  padding: 16px 0;
  color: var(--yt-gray-60);
  font-size: var(--yt-fs-16);
  line-height: var(--yt-lh-24);
}

.yt-search__error {
  color: var(--yt-red);
}

.yt-search__results.is-loading {
  opacity: 0.7;
}

@media (max-width: 767px) {
  .yt-search__dialog {
    padding: calc(var(--yt-header-h) + 24px) var(--yt-gutter-mobile) 56px;
  }

  .yt-search__form {
    gap: 6px;
  }

  .yt-search__input {
    height: 48px;
    font-size: var(--yt-fs-24);
  }

  .yt-search__close {
    padding: 0 10px;
  }

  .yt-search__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    margin-top: 28px;
  }

  .yt-search__quick {
    order: 2;
    padding-top: 24px;
    border-top: 1px solid var(--yt-line);
  }

  .yt-search__results {
    order: 1;
    min-height: 120px;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.yt-footer {
  background: var(--yt-black);
  color: var(--yt-white);
}

.yt-footer__top {
  padding-top: 80px;
  padding-bottom: 40px;
}

.yt-footer__cols {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 32px;
}

.yt-footer__col {
  min-width: 0;
}

.yt-footer__heading {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--yt-white);
  font-family: inherit;
  font-size: var(--yt-fs-14);
  font-weight: var(--yt-fw-bold);
  line-height: var(--yt-lh-21);
  text-align: left;
  cursor: default;
}

.yt-footer__toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: inherit;
}

.yt-footer__toggle::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--yt-dur-fast) var(--yt-ease);
}

.yt-footer__col.is-open .yt-footer__toggle::before {
  transform: rotate(-135deg);
}

.yt-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.yt-footer__link {
  display: inline-block;
  padding: 0;
  color: var(--yt-gray);
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-24);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-footer__link:hover {
  color: var(--yt-white);
}

.yt-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
  padding-top: 24px;
}

.yt-footer__brands {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.yt-footer__brand-link {
  color: #CCCCCC;
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-footer__brand-link:hover {
  color: var(--yt-white);
}

.yt-footer__social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yt-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: var(--yt-white);
  transition:
    background-color var(--yt-dur-fast) var(--yt-ease),
    border-color var(--yt-dur-fast) var(--yt-ease),
    color var(--yt-dur-fast) var(--yt-ease);
}

.yt-footer__social-link:hover {
  border-color: var(--yt-white);
  background: var(--yt-white);
  color: var(--yt-black);
}

.yt-footer__social-link .yt-icon {
  width: 14px;
  height: 14px;
}

.yt-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.yt-footer__copyright {
  margin: 0;
  color: var(--yt-gray);
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
}

.yt-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
}

.yt-footer__legal-links a {
  color: var(--yt-gray);
  font-size: var(--yt-fs-14);
  line-height: var(--yt-lh-21);
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-footer__legal-links a:hover {
  color: var(--yt-white);
}

@media (min-width: 1248px) {
  .yt-footer__top.yt-container,
  .yt-footer__legal.yt-container {
    padding-inline: 0;
  }

  .yt-footer__cols {
    grid-template-columns: repeat(6, auto);
    justify-content: space-between;
    column-gap: 28px;
  }
}

@media (max-width: 1023px) {
  .yt-footer__cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 32px;
  }
}

@media (max-width: 767px) {
  .yt-footer__top {
    padding-top: 48px;
    padding-bottom: 24px;
  }

  .yt-footer__cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .yt-footer__col {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .yt-footer__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 10px 0;
    cursor: pointer;
  }

  .yt-footer__heading::after {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-right: 2px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    transition: transform var(--yt-dur-fast) var(--yt-ease);
  }

  .yt-footer__col.is-open .yt-footer__heading::after {
    transform: rotate(-135deg);
  }

  .yt-footer__heading:has(.yt-footer__toggle)::after {
    display: none;
  }

  .yt-footer__toggle {
    display: inline-flex;
  }

  .yt-footer__list {
    display: none;
    padding-bottom: 16px;
  }

  .yt-footer__col.is-open .yt-footer__list {
    display: block;
  }

  .yt-footer__meta {
    margin-top: 32px;
    padding-top: 0;
  }

  .yt-footer__legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 20px;
    padding-bottom: 24px;
  }

  .yt-footer__legal-links {
    gap: 8px 20px;
  }
}

/* --------------------------------------------------------------------------
   Floating rail and back to top
   -------------------------------------------------------------------------- */
.yt-rail {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  transform: translateY(-50%);
}

.yt-rail__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.65);
  color: var(--yt-white);
  transition:
    background-color var(--yt-dur-fast) var(--yt-ease),
    color var(--yt-dur-fast) var(--yt-ease);
}

.yt-rail__btn:hover {
  background: var(--yt-red);
  color: var(--yt-white);
}

.yt-rail__btn .yt-icon {
  width: 20px;
  height: 20px;
}

.yt-backtop {
  position: fixed;
  top: calc(50% + 48px);
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: rgba(0, 0, 0, 0.65);
  color: var(--yt-white);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity var(--yt-dur-fast) var(--yt-ease),
    transform var(--yt-dur-fast) var(--yt-ease),
    background-color var(--yt-dur-fast) var(--yt-ease),
    visibility 0s linear var(--yt-dur-fast);
}

.yt-backtop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity var(--yt-dur-fast) var(--yt-ease),
    transform var(--yt-dur-fast) var(--yt-ease),
    background-color var(--yt-dur-fast) var(--yt-ease),
    visibility 0s;
}

.yt-backtop:hover {
  background: var(--yt-red);
}

.yt-backtop .yt-icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 767px) {
  .yt-rail {
    display: none;
  }

  .yt-backtop {
    top: auto;
    right: 16px;
    bottom: 16px;
  }
}

/* --------------------------------------------------------------------------
   Cookie banner
   -------------------------------------------------------------------------- */
.yt-cookie {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--yt-z-cookie);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 20px clamp(20px, 5.5vw, 80px);
  background: var(--yt-overlay-deep);
  color: var(--yt-white);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity var(--yt-dur) var(--yt-ease),
    transform var(--yt-dur) var(--yt-ease),
    visibility 0s linear var(--yt-dur);
}

.yt-cookie.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity var(--yt-dur) var(--yt-ease),
    transform var(--yt-dur) var(--yt-ease),
    visibility 0s;
}

.yt-cookie__text {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--yt-fs-14);
  line-height: 22px;
}

.yt-cookie__policy {
  color: var(--yt-white);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--yt-dur-fast) var(--yt-ease);
}

.yt-cookie__policy:hover {
  color: var(--yt-red);
}

.yt-cookie__actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.yt-cookie__actions .yt-btn {
  height: 40px;
}

@media (max-width: 767px) {
  .yt-cookie {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-height: 60vh;
    padding: 16px 20px;
    overflow-y: auto;
  }

  .yt-cookie__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .yt-cookie__actions .yt-cookie__policy {
    grid-column: 1 / -1;
    justify-self: start;
    font-size: var(--yt-fs-14);
    line-height: var(--yt-lh-21);
  }
}

@media (max-width: 420px) {
  .yt-cookie__actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .yt-cookie__actions .yt-cookie__policy {
    grid-column: auto;
  }
}

/* --------------------------------------------------------------------------
   Video modal
   -------------------------------------------------------------------------- */
.yt-video-modal {
  position: fixed;
  inset: 0;
  z-index: var(--yt-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 250ms var(--yt-ease),
    visibility 0s linear 250ms;
}

.yt-video-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition:
    opacity 250ms var(--yt-ease),
    visibility 0s;
}

.yt-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.yt-video-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  background: var(--yt-black);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.yt-video-modal__close {
  position: absolute;
  top: -48px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: var(--yt-white);
  cursor: pointer;
  transition:
    background-color var(--yt-dur-fast) var(--yt-ease),
    border-color var(--yt-dur-fast) var(--yt-ease);
}

.yt-video-modal__close:hover {
  border-color: var(--yt-white);
  background: var(--yt-red);
}

.yt-video-modal__video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 96px);
  aspect-ratio: 16 / 9;
  background: var(--yt-black);
  object-fit: contain;
}

@media (max-width: 767px) {
  .yt-video-modal {
    padding: 16px;
  }

  .yt-video-modal__dialog {
    width: 100%;
  }

  .yt-video-modal__close {
    top: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
  }

  .yt-video-modal__video {
    max-height: calc(100vh - 48px);
  }
}

/* --------------------------------------------------------------------------
   Header responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) and (min-width: 1024px) {
  .yt-header__inner {
    gap: 12px;
  }

  .yt-header__brand {
    width: 112px;
    height: 40px;
  }

  .yt-nav {
    gap: 12px;
  }

  .yt-nav__link {
    font-size: var(--yt-fs-14);
  }

  .yt-header__actions {
    gap: 4px;
  }

  .yt-header__cta,
  .yt-header__docs {
    padding-inline: 4px;
    font-size: var(--yt-fs-13);
  }
}

@media (max-width: 1023px) {
  .yt-header__inner {
    gap: 12px;
  }

  .yt-header__brand {
    width: 100px;
    height: 22px;
  }

  /* nothing */

  .yt-nav {
    gap: 10px;
  }

  .yt-nav__link {
    font-size: var(--yt-fs-13);
  }

  .yt-header__actions {
    gap: 2px;
  }

  .yt-header__cta,
  .yt-header__docs {
    display: none;
  }

  .yt-lang__btn {
    font-size: var(--yt-fs-13);
    padding-inline: 2px;
  }
}

@media (max-width: 767px) {
  .yt-header__nav {
    display: none;
  }

  .yt-header__cta,
  .yt-header__docs {
    display: none;
  }

  .yt-header__burger {
    display: inline-flex;
  }

  .yt-header__inner {
    gap: 8px;
  }

  .yt-header__brand {
    width: 92px;
    height: 21px;
  }

  .yt-header__actions {
    gap: 0;
  }

  .yt-mega {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Target header alignment: full-width bar, 80px optical margin at 1440,
   brand-to-nav gap 70px and 40px nav rhythm.
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
  .yt-header__inner {
    max-width: none;
    padding-inline: 80px;
  }

  .yt-header__brand {
    margin-right: 54px;
  }

  .yt-nav {
    gap: 40px;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .yt-header__inner {
    max-width: none;
    padding-inline: 40px;
  }

  .yt-header__brand {
    margin-right: 24px;
  }

  .yt-nav {
    gap: 28px;
  }
}

/* --------------------------------------------------------------------------
   Products mega menu: match the target's fixed 172px cards on a 214px
   rhythm. The grid therefore shows 2 columns at 1440, 3 at 1600 and 5 at
   1920, exactly like digitalpower.huawei.com.
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .yt-mega[data-channel="products"] .yt-mega__panels {
    padding-top: 68px;
  }

  .yt-mega[data-channel="products"] .yt-mega__eyebrow {
    margin: 0;
    line-height: 14px;
  }

  .yt-mega[data-channel="products"] .yt-mega__grid {
    grid-template-columns: repeat(auto-fill, 214px);
    column-gap: 0;
    row-gap: 0;
  }

  .yt-mega[data-channel="products"] .yt-mega__card {
    width: 172px;
    gap: 0;
  }

  .yt-mega[data-channel="products"] .yt-mega__thumb {
    height: auto;
    padding: 20px 0 24px;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .yt-mega[data-channel="products"] .yt-mega__thumb img {
    max-height: 113px;
  }

  .yt-mega[data-channel="products"] .yt-mega__label {
    font-size: 14px;
    line-height: 21px;
  }
}

@media (min-width: 1920px) {
  .yt-mega[data-channel="products"] .yt-mega__panels {
    padding-top: 48px;
  }
}

@media (min-width: 1920px) {
  .yt-mega[data-channel="products"] .yt-mega__inner {
    min-height: 453px;
  }
}

/* Narrow desktop/tablet: keep two readable columns instead of collapsing to a
   single 911px-tall column. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .yt-mega[data-channel="products"] .yt-mega__grid {
    grid-template-columns: repeat(2, 172px);
    column-gap: 16px;
  }
}
