/**
 * Desktop mega menu — single department + subcategory tiles
 */

.ar-mega {
  display: none;
}

@media (min-width: 1024px) {
  .site-header__center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    flex-wrap: wrap;
  }

  .ar-nav-link {
    font-family: var(--ar-sans, Inter, system-ui, sans-serif);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    color: #000;
    background: none;
    border: none;
    padding: 0.35rem 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease, opacity 0.2s ease;
    position: relative;
  }

  .ar-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #000;
    transform: scaleX(0);
    transition: transform 0.3s ease;
  }

  .ar-nav-link:hover::after,
  .ar-nav-link.is-active::after {
    transform: scaleX(1);
  }

  .ar-nav-link:hover,
  .ar-nav-link.is-active {
    color: #000;
  }

  body.ar-mega-open .ar-nav-link--shop .ar-nav-link__chevron {
    transform: rotate(180deg);
  }

  .ar-nav-link__chevron {
    transition: transform 0.3s ease;
  }

  .site-header__inner {
    grid-template-columns: 1fr auto 1fr;
  }

  .site-header__brand {
    justify-self: start;
  }

  .site-header__center {
    justify-self: center;
  }

  .site-header__aside {
    justify-self: end;
  }

  .ar-header-menu-toggle,
  .site-header__gender {
    display: none !important;
  }

  /* Overlay */
  .ar-mega {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 180;
    pointer-events: none;
    visibility: hidden;
  }

  body.ar-mega-open .ar-mega {
    pointer-events: auto;
    visibility: visible;
  }

  .ar-mega[hidden] {
    display: block !important;
  }

  .ar-mega__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  body.ar-mega-open .ar-mega__backdrop {
    opacity: 1;
  }

  .ar-mega__shell {
    position: absolute;
    top: var(--ar-header-offset, 80px);
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    width: min(1100px, calc(100vw - 3rem));
    max-height: calc(100vh - var(--ar-header-offset, 80px) - 2rem);
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.18);
    opacity: 0;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  }

  body.ar-mega-open .ar-mega__shell {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }

  .ar-mega__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .ar-mega__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.25rem;
  }

  .ar-mega__tab {
    font-family: var(--ar-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.65rem 1.1rem;
    border: 1px solid #e8e8e8;
    background: #fafafa;
    color: #666;
    cursor: pointer;
    transition: all 0.25s ease;
  }

  .ar-mega__tab:hover {
    border-color: #000;
    color: #000;
  }

  .ar-mega__tab[aria-selected="true"] {
    background: #000;
    border-color: #000;
    color: #fff;
  }

  .ar-mega__close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  .ar-mega__close:hover {
    background: #000;
    border-color: #000;
    color: #fff;
  }

  .ar-mega__stage {
    position: relative;
    min-height: 320px;
    overflow-y: auto;
    max-height: min(520px, calc(100vh - var(--ar-header-offset, 80px) - 8rem));
  }

  .ar-mega__dept {
    display: none;
    animation: ar-mega-fade 0.4s ease;
  }

  .ar-mega__dept.is-active {
    display: block;
  }

  .ar-mega__dept[hidden] {
    display: none !important;
  }

  .ar-mega__dept.is-active[hidden] {
    display: block !important;
  }

  @keyframes ar-mega-fade {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .ar-mega__dept-inner {
    display: grid;
    grid-template-columns: minmax(220px, 38%) 1fr;
    gap: 0;
    min-height: 300px;
  }

  .ar-mega__hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 300px;
    padding: 1.75rem;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    background: #111;
  }

  .ar-mega__hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .ar-mega__hero-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #1a1a1a, #444);
  }

  .ar-mega__hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.15) 60%, transparent 100%);
    z-index: 1;
  }

  .ar-mega__hero:hover img {
    transform: scale(1.05);
  }

  .ar-mega__hero-label,
  .ar-mega__hero-title,
  .ar-mega__hero-cta {
    position: relative;
    z-index: 2;
  }

  .ar-mega__hero-label {
    font-size: 9px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 0.35rem;
  }

  .ar-mega__hero-title {
    font-family: var(--ar-serif, "Playfair Display", Georgia, serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.05;
    margin-bottom: 0.75rem;
  }

  .ar-mega__hero-cta {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .ar-mega__subs-wrap {
    padding: 1.75rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    background: #fafafa;
  }

  .ar-mega__subs-head {
    font-family: var(--ar-serif, "Playfair Display", Georgia, serif);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 1.25rem;
    color: #000;
  }

  .ar-mega__subs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    flex: 1;
  }

  .ar-mega__sub-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #e8e8e8;
    text-decoration: none;
    color: #000;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  }

  .ar-mega__sub-tile:hover {
    border-color: #000;
    background: #000;
    color: #fff;
    transform: translateY(-2px);
  }

  .ar-mega__sub-tile:hover .ar-mega__sub-arrow {
    color: #fff;
  }

  .ar-mega__sub-name {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .ar-mega__sub-arrow {
    font-size: 14px;
    color: #999;
    transition: color 0.2s ease;
  }

  .ar-mega__empty {
    font-size: 14px;
    color: #666;
    margin: 0;
  }

  .ar-mega__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    justify-content: center;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #eee;
    background: #fff;
  }

  .ar-mega__foot a {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #888;
    text-decoration: none;
  }

  .ar-mega__foot a:hover {
    color: #000;
  }

  body.ar-mega-open {
    overflow: hidden;
  }

  .ar-nav-backdrop--mobile {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .site-header__center {
    display: none;
  }

  .ar-mega {
    display: none !important;
  }
}
