.surfi26-header-shell {
  width: 100%;
}

.surfi26-header-top,
.surfi26-header-bottom {
  width: 100%;
}

.surfi26-header-top-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.surfi26-header-top-right .wpml-ls {
  order: 1;
}

.surfi26-header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-direction: row-reverse;
}

.surfi26-header-navigation {
  min-height: 40px;
}

.surfi26-header-navigation .wp-block-navigation-item__content {
  padding: 0.35rem 0.2rem;
  font-weight: 500;
}

.surfi26-ajax-search {
  position: relative;
}

.surfi26-ajax-search input[type="search"] {
  min-width: 230px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  padding: 0.52rem 0.85rem;
  line-height: 1.2;
  background: #fff;
}

.surfi26-ajax-search input[type="search"]:focus {
  outline: none;
  border-color: var(--wp--preset--color--contrast);
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--wp--preset--color--contrast) 18%, transparent);
}

.surfi26-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
}

.surfi26-search-results li {
  margin: 0;
}

.surfi26-search-results a,
.surfi26-search-empty {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}

.surfi26-search-results a:hover {
  background: color-mix(in srgb, var(--wp--preset--color--accent-5) 70%, #fff);
}

.surfi26-header-account,
.surfi26-header-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.surfi26-header-account:hover,
.surfi26-header-cart:hover {
  background: color-mix(in srgb, var(--wp--preset--color--accent-5) 65%, #fff);
  border-color: color-mix(in srgb, currentColor 38%, transparent);
  transform: translateY(-1px);
}

.surfi26-header-cart-count {
  margin-left: 0.45rem;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--wp--preset--color--contrast);
}

@media (max-width: 960px) {
  .surfi26-header-shell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .surfi26-header-top,
  .surfi26-header-bottom {
    display: contents;
  }

  .surfi26-header-top > .wp-block-site-logo {
    order: 1;
  }

  .surfi26-header-top-actions {
    display: none;
  }

  .surfi26-header-bottom .wc-block-mini-cart {
    order: 2;
    margin-left: auto;
  }

  .surfi26-header-bottom .mct-custom-nav {
    order: 3;
  }

  .wc-block-mini-cart__button,
  .mct-nav-burger {
    min-width: 42px;
    min-height: 42px;
  }

  .mct-mobile-drawer-search,
  .mct-mobile-drawer-search .wp-block-fibosearch-search,
  .mct-mobile-drawer-search .dgwt-wcas-search-wrapp,
  .mct-mobile-drawer-search form {
    width: 100%;
  }

  .mct-mobile-drawer-search input[type="search"],
  .mct-mobile-drawer-search .dgwt-wcas-search-input {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .surfi26-header-shell {
    padding-top: var(--wp--preset--spacing--20) !important;
    padding-bottom: var(--wp--preset--spacing--20) !important;
  }
}

/* ==========================================================================
   [custom_nav] — desktop dropdown + mobile slide-in drawer
   ========================================================================== */

/* ── Desktop nav ─────────────────────────────────────────────────────────── */

.mct-custom-nav {
  display: flex;
  align-items: center;
}

.mct-nav-desktop .menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mct-nav-desktop .menu-item {
  position: relative;
}

.mct-nav-desktop .menu-item > a {
  display: block;
  padding: 0.35rem 0.65rem;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.4;
  transition: color 0.15s ease;
  font-size: 1rem;
  letter-spacing: 0.05rem;
  cursor: pointer;
}

.mct-nav-desktop .menu-item > a:hover,
.mct-nav-desktop .menu-item-has-children:hover > a {
  color: var(--wp--preset--color--accent-3, currentColor);
}

/* Chevron on parent items */
.mct-nav-desktop .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  margin-left: 0.35em;
  vertical-align: 0.1em;
  border: 0.3em solid transparent;
  border-top-color: currentColor;
  transition: transform 0.2s ease;
}

.mct-nav-desktop .menu-item-has-children:hover > a::after {
  transform: rotate(180deg) translateY(-0.15em);
}

/* Dropdown panel */
.mct-nav-desktop .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  background: #fff;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
  z-index: 9999;
}

.mct-nav-desktop .menu-item-has-children:hover > .sub-menu {
  display: block;
}

.mct-nav-desktop .sub-menu .menu-item > a {
  padding: 0.45rem 1.1rem;
  font-weight: 400;
  white-space: nowrap;
}

.mct-nav-desktop .sub-menu .menu-item > a:hover {
  background: color-mix(
    in srgb,
    var(--wp--preset--color--accent-5, #f5f5f5) 70%,
    #fff
  );
}

/* Nested: fly out right */
.mct-nav-desktop .sub-menu .menu-item-has-children > .sub-menu {
  top: -0.35rem;
  left: 100%;
}

.mct-nav-desktop .current-menu-item > a,
.mct-nav-desktop .current-menu-ancestor > a {
  color: var(--wp--preset--color--accent-3, currentColor);
  font-weight: 600;
}

/* ── Burger button ───────────────────────────────────────────────────────── */

.mct-nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  width: 42px;
  height: 42px;
  padding: 0;
  margin-top: 1rem;
  line-height: 0;
  background: transparent;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.mct-nav-burger:hover {
  background: color-mix(in srgb, currentColor 6%, transparent);
}

.mct-nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}

.mct-nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mct-nav-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mct-nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile backdrop ─────────────────────────────────────────────────────── */

.mct-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.32s ease,
    visibility 0.32s ease;
}

.mct-mobile-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Mobile drawer ───────────────────────────────────────────────────────── */

.mct-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 380px);
  background: var(--wp--preset--color--base, #fff);
  z-index: 99999;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.12);
}

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

.mct-mobile-drawer-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.25rem 1.5rem 3rem;
}

.mct-mobile-drawer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Close button */
.mct-mobile-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background-color 0.15s ease;
}

.mct-mobile-close:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.mct-mobile-drawer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.mct-mobile-drawer-account,
.mct-mobile-drawer-language {
  display: flex;
  align-items: center;
}

.mct-mobile-drawer-account .wp-block-woocommerce-customer-account,
.mct-mobile-drawer-account .wc-block-customer-account__account-link {
  display: inline-flex;
}

.mct-mobile-drawer-language .wpml-language-switcher-block,
.mct-mobile-drawer-language ul {
  width: auto;
}

.mct-mobile-drawer-language ul {
  justify-content: center;
}

/* Mobile menu list */
.mct-mobile-drawer .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.mct-mobile-drawer .menu-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0.25rem;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
  transition: color 0.15s ease;
}

.mct-mobile-drawer .menu-item > a:hover {
  color: var(--wp--preset--color--accent-3, currentColor);
}

.mct-mobile-drawer .current-menu-item > a,
.mct-mobile-drawer .current-menu-ancestor > a {
  color: var(--wp--preset--color--accent-3, currentColor);
  font-weight: 600;
}

/* Sub-menu toggle arrow */
.mct-mobile-drawer .menu-item-has-children > a::after {
  content: "";
  flex-shrink: 0;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-left: 0.5em;
}

.mct-mobile-drawer .menu-item-has-children.is-open > a::after {
  transform: rotate(225deg) translateY(-0.1em);
}

/* Sub-menu panel (collapsed by default, opened via JS) */
.mct-mobile-drawer .sub-menu {
  display: none;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0 0 0 1rem;
}

.mct-mobile-drawer .menu-item-has-children.is-open > .sub-menu {
  display: flex;
}

.mct-mobile-drawer .sub-menu .menu-item > a {
  font-size: 1rem;
  font-weight: 400;
  padding: 0.65rem 0.25rem;
}

/* ── Scroll lock when drawer is open ─────────────────────────────────────── */

body.mct-nav-open {
  overflow: hidden;
}

/* ── Responsive breakpoints ──────────────────────────────────────────────── */

@media (max-width: 960px) {
  .mct-nav-desktop {
    display: none;
  }

  .mct-nav-burger {
    display: flex;
  }
}
