/* PUMA Uzbekistan — three-column mega menu */
.header { position: relative; }
.header .navigation { display: flex; align-items: center; gap: clamp(8px, 2vw, 28px); }
.mega-nav-item { display: inline-flex; align-items: center; white-space: nowrap; }
.mega-nav-item > a { cursor: pointer; padding: 10px 0; }
.mega-nav-item > a:hover, .mega-nav-item > a[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 6px; }
.mega-menu[hidden] { display: none !important; }
.mega-menu {
  position: absolute; z-index: 1000; left: 0; right: 0; top: 100%;
  background: #fff; color: #161616; border-top: 1px solid #ededed;
  border-bottom: 1px solid #ddd; box-shadow: 0 16px 25px rgba(0,0,0,.12);
  padding: 20px clamp(20px, 4vw, 56px) 30px;
}
.mega-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
#mega-menu-title { appearance: none; border: 0; padding: 5px 0; background: none; color: #161616; font-weight: 800; font-size: 14px; letter-spacing: .07em; cursor: pointer; }
#mega-menu-title:hover, #mega-menu-title:focus-visible { text-decoration: underline; text-underline-offset: 5px; }
#mega-menu-close { background: none; border: none; color: #333; cursor: pointer; font-size: 18px; padding: 6px; }
.mega-menu-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px,3vw,48px); }
.mega-menu-column { min-width: 0; }
.mega-menu-column h3 { margin: 0 0 13px; padding-bottom: 13px; border-bottom: 2px solid #222; font-size: 17px; font-weight: 750; }
.mega-menu-column button { display: block; width: 100%; text-align: left; font: inherit; font-size: 14px; color: #424242; background: transparent; border: 0; padding: 8px 0; cursor: pointer; }
.mega-menu-column button:hover, .mega-menu-column button:focus-visible { color: #000; text-decoration: underline; }
.mega-menu-empty { color: #888; font-size: 13px; }
@media (max-width: 760px) {
  .header .navigation { gap: 5px; flex-wrap: wrap; }
  .mega-nav-item { gap: 0; }
  .mega-nav-item > a, .mega-catalog-link { font-size: 11px; }
    .mega-menu { padding: 14px 16px 18px; max-height: 72vh; overflow-y: auto; }
  .mega-menu-columns { grid-template-columns: 1fr; gap: 14px; }
  .mega-menu-column h3 { margin: 0 0 6px; padding-bottom: 7px; font-size: 15px; }
  .mega-menu-column .mega-menu-items { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 12px; }
  .mega-menu-column button { font-size: 13px; padding: 7px 0; }
}

/* First-level ALL / SALE / NEW navigation */
.header .navigation [data-catalog-mode] { white-space: nowrap; }
.header .navigation [data-catalog-mode="sale"] { color: #c41320; font-weight: 750; }

/* Second level: clickable column titles, full section filter */
.mega-menu-column h3 .mega-section-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: #161616;
  cursor: pointer;
  text-align: left;
  text-decoration: none !important;
}
.mega-menu-column h3 .mega-section-link:hover,
.mega-menu-column h3 .mega-section-link:focus-visible {
  color: #000;
  text-decoration: none !important;
}
.mega-menu-column h3 .mega-section-link:disabled { cursor: default; opacity: .5; }
/* Third level: gray normally, black on hover, no underline */
.mega-menu-column .mega-menu-items button {
  color: #747984;
  text-decoration: none !important;
}
.mega-menu-column .mega-menu-items button:hover,
.mega-menu-column .mega-menu-items button:focus-visible {
  color: #000 !important;
  text-decoration: none !important;
}

/* Telegram Mini App: touch-friendly dropdown, no arrows */
@media (max-width: 768px) {
  .mega-nav-item > a:hover,
  .mega-nav-item > a[aria-expanded="true"] {
    text-decoration: none !important;
  }
  .header .mega-menu:not([hidden]) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .header .mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1001;
    width: 100%;
    max-height: min(70dvh, 620px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
    background: white;
  }
  .mega-menu-columns {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .mega-menu-column .mega-menu-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
  }
  .mega-menu-column .mega-menu-items button {
    min-height: 40px;
    color: #747984;
    text-decoration: none !important;
  }
  .mega-menu-column .mega-menu-items button:hover,
  .mega-menu-column .mega-menu-items button:focus-visible,
  .mega-menu-column .mega-menu-items button:active {
    color: #000 !important;
    text-decoration: none !important;
  }
}

/* Temporarily hide NEW from navigation */
.header .navigation [data-catalog-mode="new"] {
    display: none !important;
}

/* Mobile top navigation: five equal columns and identical typography. */
@media screen and (max-width: 768px) {
  .header .navigation {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    overflow: visible !important;
  }

  .header .navigation > :not([data-catalog-mode="new"]) {
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    text-align: center !important;
    justify-self: stretch !important;
  }

  /* Gender links are nested in .mega-nav-item; ALL/SALE are direct links. */
  .header .navigation > .mega-nav-item > a,
  .header .navigation > a,
  .header .navigation > [data-catalog-mode],
  .header .navigation > :not(.mega-nav-item) > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 13px 0 !important;
    font-family: inherit !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    white-space: nowrap !important;
  }

  /* Keep SALE red without making its text larger or heavier. */
  .header .navigation [data-catalog-mode="sale"] {
    color: #c41320 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
  }
}

/* Default navigation text */
.header .navigation a:not([data-catalog-mode="sale"]) {
  color: #111 !important;
}

/* Hover and selected state */
.header .navigation a:not([data-catalog-mode="sale"]):hover,
.header .navigation a:not([data-catalog-mode="sale"]):focus-visible,
.header .navigation [data-mega-gender] > a[aria-expanded="true"] {
  color: #50565e !important;
}

/* SALE stays red */
.header .navigation [data-catalog-mode="sale"],
.header .navigation [data-catalog-mode="sale"]:hover,
.header .navigation [data-catalog-mode="sale"]:focus-visible {
  color: #c41320 !important;
}

/* Hide NEW for now */
.header .navigation [data-catalog-mode="new"] {
  display: none !important;
}

/* Mobile accordion category navigation */
@media (max-width: 768px) {

  /* Stack the three main departments vertically */
  .mega-menu-columns {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  .mega-menu-column {
    width: 100%;
  }

  /* Accordion heading */
  .mega-menu-column h3 {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #e5e5e5 !important;
  }

  .mega-menu-column h3 .mobile-category-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 12px 4px !important;
    color: #171717;
    font-size: 14px;
    font-weight: 700;
  }

  /* Chevron */
  .mobile-category-toggle::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #50565e;
    border-bottom: 1.5px solid #50565e;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-right: 6px;
  }

  .mobile-category-toggle[aria-expanded="true"]::after {
    transform: rotate(225deg);
  }

  /* Important: override existing display:grid rules */
  .mega-menu-column .mega-menu-items[hidden] {
    display: none !important;
  }

  .mega-menu-column .mega-menu-items:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
    padding: 10px 4px 16px;
  }

}