/* Cabecera estándar de Divi: hamburguesa permanente en escritorio y móvil. */
body.fashionteca-hamburger-navigation.ft-force-standard-hamburger #top-menu-nav {
  display: none !important;
}

body.fashionteca-hamburger-navigation.ft-force-standard-hamburger #et_mobile_nav_menu {
  display: block !important;
  float: none;
  margin: 0;
}

body.fashionteca-hamburger-navigation .mobile_menu_bar {
  position: relative;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  transform: translateY(-50%);
}

body.fashionteca-hamburger-navigation {
  --ft-nav-accent: #998484;
  --ft-nav-accent-soft: rgba(153, 132, 132, .12);
  --ft-nav-hover: rgba(153, 132, 132, .18);
  --ft-nav-row-height: 74px;
  --ft-nav-panel-top: 74px;
  --ft-nav-adminbar-space: 0px;
}

body.admin-bar.fashionteca-hamburger-navigation {
  --ft-nav-adminbar-space: 32px;
}

/* Misma escala de cabecera que TEJIDOTECA: fila principal de 74 px. */
body.fashionteca-hamburger-navigation #main-header {
  min-height: var(--ft-nav-row-height);
}

body.fashionteca-hamburger-navigation #main-header .container.et_menu_container,
body.fashionteca-hamburger-navigation #main-header .logo_container,
body.fashionteca-hamburger-navigation #main-header #et-top-navigation,
body.fashionteca-hamburger-navigation #main-header #et_mobile_nav_menu,
body.fashionteca-hamburger-navigation #main-header #et_mobile_nav_menu .mobile_nav {
  height: var(--ft-nav-row-height) !important;
}

body.fashionteca-hamburger-navigation #main-header .container.et_menu_container {
  position: relative;
}

body.fashionteca-hamburger-navigation #main-header .logo_container {
  z-index: 100003;
  pointer-events: none;
}

body.fashionteca-hamburger-navigation #main-header .logo_container > a,
body.fashionteca-hamburger-navigation #main-header #logo {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

body.fashionteca-hamburger-navigation #main-header #et-top-navigation {
  position: relative;
  z-index: 100003;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 !important;
}

body.fashionteca-hamburger-navigation #main-header #et_mobile_nav_menu .mobile_nav {
  position: relative;
  padding: 0 !important;
}

body.fashionteca-hamburger-navigation #main-header #logo {
  max-height: 60% !important;
}

body.et_fixed_nav.fashionteca-hamburger-navigation:not(.et-tb-has-header) #page-container {
  padding-top: var(--ft-nav-row-height) !important;
}

/* Buscador general permanente, equivalente al de TEJIDOTECA. */
body.fashionteca-hamburger-navigation #fashionteca-header-search {
  position: absolute;
  z-index: 100002;
  top: 15px;
  right: 58px;
  display: flex;
  width: min(520px, calc(100% - 380px));
  height: 44px;
  margin: 0;
}

body.fashionteca-hamburger-navigation #fashionteca-header-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid var(--ft-nav-accent);
  border-right: 0;
  border-radius: 0;
  outline: 0;
  background: #000;
  box-shadow: inset 0 0 0 1px var(--ft-nav-accent);
  color: #fff;
  appearance: none;
  font-family: Abel, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1;
}

body.fashionteca-hamburger-navigation #fashionteca-header-search input[type="search"]::placeholder {
  color: #fff !important;
  opacity: 1;
}

body.fashionteca-hamburger-navigation #fashionteca-header-search input[type="search"]:focus,
body.fashionteca-hamburger-navigation #fashionteca-header-search input[type="search"]:focus-visible {
  border-color: var(--ft-nav-accent) !important;
  outline: 0 !important;
  background: #000 !important;
  box-shadow: inset 0 0 0 1px var(--ft-nav-accent) !important;
  color: #fff !important;
}

body.fashionteca-hamburger-navigation #fashionteca-header-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--ft-nav-accent);
  color: #fff;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}

body.fashionteca-hamburger-navigation #fashionteca-header-search button:hover,
body.fashionteca-hamburger-navigation #fashionteca-header-search button:focus-visible {
  outline: 0;
  background: #fff;
  color: var(--ft-nav-accent);
}

body.fashionteca-hamburger-navigation #fashionteca-header-search button:focus-visible {
  box-shadow: inset 0 0 0 3px var(--ft-nav-accent);
}

body.fashionteca-hamburger-navigation #fashionteca-header-search svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
}

body.fashionteca-hamburger-navigation .mobile_menu_bar::before {
  position: static;
  line-height: 32px;
  color: var(--ft-nav-accent) !important;
}

body.fashionteca-hamburger-navigation #main-header #et_mobile_nav_menu .mobile_menu_bar::before {
  transform: translateY(13px);
}

body.fashionteca-hamburger-navigation #main-header .et_mobile_menu {
  top: var(--ft-nav-panel-top) !important;
  left: auto !important;
  right: 0 !important;
  width: min(480px, 88vw) !important;
  max-height: calc(100vh - var(--ft-nav-panel-top) - var(--ft-nav-adminbar-space));
  max-height: calc(100dvh - var(--ft-nav-panel-top) - var(--ft-nav-adminbar-space));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 0 18px;
  border-top: 3px solid #998484;
  background: #050505;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .35);
}

body.fashionteca-hamburger-navigation #main-header .mobile_nav.closed > .et_mobile_menu {
  display: none !important;
}

body.fashionteca-hamburger-navigation #main-header .mobile_nav.opened > .et_mobile_menu {
  display: block !important;
}

body.fashionteca-hamburger-navigation .et_mobile_menu li {
  position: relative;
}

body.fashionteca-hamburger-navigation .et_mobile_menu li a {
  padding: 12px 52px 12px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  color: #fff;
  font-family: Oswald, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  opacity: 1;
  text-transform: uppercase;
}

body.fashionteca-hamburger-navigation .et_mobile_menu > li > a {
  letter-spacing: .25px;
}

body.fashionteca-hamburger-navigation .et_mobile_menu li a:hover,
body.fashionteca-hamburger-navigation .et_mobile_menu li a:focus-visible {
  background: var(--ft-nav-hover);
  color: #fff;
}

body.fashionteca-hamburger-navigation .et_mobile_menu li a:focus-visible,
body.fashionteca-hamburger-navigation .ft-submenu-toggle:focus-visible,
body.fashionteca-hamburger-navigation .mobile_menu_bar:focus-visible {
  outline: 3px solid var(--ft-nav-accent);
  outline-offset: -3px;
}

/*
 * Divi aplica reglas de apertura con mayor especificidad tras reconstruir el
 * menú. El ID de la cabecera garantiza que solo el estado ft-submenu-open
 * pueda hacer visible cada submenú.
 */
body.fashionteca-hamburger-navigation #main-header .et_mobile_menu li.menu-item-has-children > ul.sub-menu {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  padding-left: 0 !important;
  background: #151313;
}

body.fashionteca-hamburger-navigation #main-header .et_mobile_menu li.menu-item-has-children.ft-submenu-open > ul.sub-menu {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
}

body.fashionteca-hamburger-navigation .et_mobile_menu .sub-menu a {
  padding-left: 34px;
  font-family: Abel, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
}

body.fashionteca-hamburger-navigation .et_mobile_menu .sub-menu .sub-menu a {
  padding-left: 52px;
  font-size: 15px;
}

body.fashionteca-hamburger-navigation .et_mobile_menu .sub-menu .sub-menu .sub-menu a {
  padding-left: 70px;
  font-size: 14px;
}

body.fashionteca-hamburger-navigation .ft-submenu-toggle {
  position: absolute;
  z-index: 2;
  top: 2px;
  right: 4px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

body.fashionteca-hamburger-navigation .ft-submenu-toggle::before {
  content: "+";
}

body.fashionteca-hamburger-navigation .ft-submenu-toggle[aria-expanded="true"]::before {
  content: "−";
}

body.fashionteca-hamburger-navigation .ft-submenu-toggle:hover,
body.fashionteca-hamburger-navigation .ft-submenu-toggle:focus-visible {
  color: var(--ft-nav-accent);
}

/* Ubicación actual: destino exacto, sección y recorrido hasta el nivel principal. */
body.fashionteca-hamburger-navigation .et_mobile_menu li.current-menu-item > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.current_page_item > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.current-menu-parent > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.current-menu-ancestor > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.current-page-parent > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.current-page-ancestor > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.current_page_parent > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.current_page_ancestor > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.ft-current-item > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.ft-current-section > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.ft-current-ancestor > a,
body.fashionteca-hamburger-navigation .et_mobile_menu a[aria-current="page"] {
  color: var(--ft-nav-accent) !important;
}

body.fashionteca-hamburger-navigation .et_mobile_menu li.current-menu-item > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.current_page_item > a,
body.fashionteca-hamburger-navigation .et_mobile_menu li.ft-current-item > a {
  background: var(--ft-nav-accent-soft) !important;
  box-shadow: inset 3px 0 0 var(--ft-nav-accent);
}

body.fashionteca-hamburger-navigation .et_mobile_menu li.current-menu-item > .ft-submenu-toggle,
body.fashionteca-hamburger-navigation .et_mobile_menu li.current-menu-parent > .ft-submenu-toggle,
body.fashionteca-hamburger-navigation .et_mobile_menu li.current-menu-ancestor > .ft-submenu-toggle,
body.fashionteca-hamburger-navigation .et_mobile_menu li.ft-current-item > .ft-submenu-toggle,
body.fashionteca-hamburger-navigation .et_mobile_menu li.ft-current-section > .ft-submenu-toggle,
body.fashionteca-hamburger-navigation .et_mobile_menu li.ft-current-ancestor > .ft-submenu-toggle,
body.fashionteca-hamburger-navigation .et_mobile_menu li.ft-current-branch > .ft-submenu-toggle {
  color: var(--ft-nav-accent);
}

@media (max-width: 980px) {
  body.fashionteca-hamburger-navigation {
    --ft-nav-panel-top: 144px;
  }

  body.fashionteca-hamburger-navigation #main-header {
    min-height: 144px !important;
  }

  body.et_fixed_nav.fashionteca-hamburger-navigation:not(.et-tb-has-header) #page-container {
    padding-top: 144px !important;
  }

  body.fashionteca-hamburger-navigation #fashionteca-header-search {
    top: var(--ft-nav-row-height);
    right: 4px;
    left: 4px;
    width: auto;
    max-width: none;
    height: 58px;
    padding: 7px 0;
    background: #000;
  }

  body.fashionteca-hamburger-navigation #fashionteca-header-search input[type="search"] {
    font-size: 17px;
  }

  body.fashionteca-hamburger-navigation #main-header .et_mobile_menu {
    width: 88vw !important;
    max-width: none;
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar.fashionteca-hamburger-navigation {
    --ft-nav-adminbar-space: 46px;
  }
}

/*
 * En móviles estrechos WordPress desplaza su barra de administración fuera
 * de la pantalla, mientras Divi conserva por defecto un top fijo de 46 px.
 * JavaScript actualiza esta variable con la parte realmente visible de la
 * barra para que la cabecera la acompañe y termine pegada al borde superior.
 */
@media screen and (max-width: 600px) {
  body.admin-bar.fashionteca-hamburger-navigation {
    --ft-nav-adminbar-space: var(--ft-mobile-adminbar-offset, 46px);
  }

  body.admin-bar.fashionteca-hamburger-navigation.et_fixed_nav #main-header {
    top: var(--ft-mobile-adminbar-offset, 46px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.fashionteca-hamburger-navigation #main-header .et_mobile_menu {
    scroll-behavior: auto;
  }
}
