/* ---------- Rackets mega menu (includes/head.php) ---------- */

.mm-trigger {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Apparel has no page of its own: the label itself opens the panel, styled as a nav link. */
.mm-trigger__label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .3em 0;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: .9375rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
}

.mm-trigger__label::after {
    content: "";
    position: absolute;
    left: 0;
    right: 20px;
    bottom: -2px;
    height: 3px;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--ease);
}

.mm-trigger__label:hover::after,
.mm-trigger__label[aria-expanded="true"]::after,
.mm-trigger__label[aria-current="page"]::after {
    transform: scaleX(1);
}

.mm-trigger__label .ico {
    width: 14px;
    height: 14px;
    transform: rotate(90deg);
    transition: transform .25s var(--ease);
}

.mm-trigger__label[aria-expanded="true"] .ico {
    transform: rotate(-90deg);
}

.mm-trigger__label:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 4px;
}

.mm-trigger__btn {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
}

.mm-trigger__btn .ico {
    width: 14px;
    height: 14px;
    transform: rotate(90deg);
    transition: transform .25s var(--ease);
}

.mm-trigger__btn[aria-expanded="true"] .ico {
    transform: rotate(-90deg);
}

.mm-trigger__btn:focus-visible {
    outline: 2px solid var(--yellow);
}

.mm {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--ink);
    color: var(--white);
    border-top: 3px solid var(--yellow);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
    animation: mm-in .28s var(--ease);
}

@keyframes mm-in {
    from { opacity: 0; transform: translateY(-8px); }
}

.mm__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 64px);
    padding-top: 36px;
    padding-bottom: 40px;
}

.mm__title {
    margin: 0 0 16px;
    color: var(--muted-on-ink);
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: .8125rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mm ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mm a {
    color: inherit;
    text-decoration: none;
}

.mm__lines a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px 8px 8px;
    transition: background .2s;
}

.mm__lines img {
    flex: none;
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: var(--ink-2);
    transform: rotate(-10deg);
    transition: transform .4s var(--ease);
}

.mm__lines span,
.mm__styles a {
    display: grid;
    gap: 2px;
    font-size: .875rem;
    color: var(--muted-on-ink);
}

.mm__lines b,
.mm__styles b {
    color: var(--white);
    font-stretch: 100%;
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1;
    text-transform: uppercase;
}

.mm__styles a {
    padding: 10px 12px;
    transition: background .2s;
}

.mm__lines a:hover,
.mm__styles a:hover {
    background: var(--ink-2);
}

.mm__lines a:hover img {
    transform: rotate(0);
}

.mm__lines a:hover b,
.mm__styles a:hover b {
    color: var(--yellow);
}

.mm__actions {
    display: grid;
    align-content: start;
    gap: 6px;
}

.mm__card {
    position: relative;
    display: grid;
    gap: 2px;
    padding: 16px 44px 16px 18px;
    background: var(--ink-2);
    font-size: .875rem;
    color: var(--muted-on-ink) !important;
    clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
    transition: background .2s;
}

.mm__card b {
    color: var(--white);
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.mm__card .ico {
    position: absolute;
    right: 20px;
    top: 50%;
    margin-top: -.6em;
    transition: transform .25s var(--ease);
}

.mm__card:hover {
    background: var(--ink-3);
}

.mm__card:hover .ico {
    transform: translateX(4px);
}

.mm__card--y {
    background: var(--yellow);
    color: var(--ink) !important;
}

.mm__card--y b {
    color: var(--ink);
}

.mm__card--y:hover {
    background: var(--yellow-press);
}

.mm__card--hot b {
    color: var(--yellow);
}

.mm a:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: -2px;
}

/* Apparel: three photos, each named by a lower-third plate. */
.mm--apparel .mm__inner {
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
}

.mm__apparel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px !important;
}

.mm__apparel a {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--ink-2);
}

.mm__apparel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}

.mm__apparel a:hover img,
.mm__apparel a:focus-visible img {
    transform: scale(1.05);
}

.mm__lower {
    position: absolute;
    left: 0;
    bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px calc(14px + var(--slant)) 6px 12px;
    background: var(--ink);
    color: var(--muted-on-ink);
    font-size: .8125rem;
    font-feature-settings: "tnum" 1;
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}

.mm__lower b {
    color: var(--white);
    font-stretch: 100%;
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1;
    text-transform: uppercase;
    transition: color .2s;
}

.mm__apparel a:hover .mm__lower b {
    color: var(--yellow);
}

@media (max-width: 1080px) {
    .mm {
        display: none;
    }
}

/* ---------- Drawer: rackets accordion ---------- */

.drawer nav {
    /* min-height 0 lets the flex item shrink, so the open accordion scrolls inside the drawer. */
    min-height: 0;
    overflow-y: auto;
}

.drawer__sub summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-stretch: 100%;
    font-weight: 800;
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.05;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ink-3);
    padding: .1em 0;
    list-style: none;
    cursor: pointer;
}

.drawer__sub summary::-webkit-details-marker {
    display: none;
}

.drawer__sub summary::after {
    content: "+";
    color: var(--yellow);
    font-style: normal;
}

.drawer__sub[open] summary::after {
    content: "−";
}

.drawer__sublinks {
    display: grid;
    padding: 8px 0 16px;
    border-bottom: 1px solid var(--ink-3);
}

.drawer nav .drawer__sublinks a {
    padding: 10px 0;
    border: 0;
    font-stretch: 87.5%;
    font-weight: 700;
    font-style: normal;
    font-size: 1.0625rem;
    letter-spacing: .04em;
    color: var(--muted-on-ink);
}

@media (prefers-reduced-motion: reduce) {
    .mm { animation: none; }
}

/* ---------- Utility strip above the header: secondary links, tucks away on scroll ---------- */

:root {
    --util: 34px;
    /* Visible header height for sticky bars below it: strip plus bar, or the bar alone when tucked. */
    --hdr-top: calc(var(--hdr) + var(--util));
}

html {
    scroll-padding-top: calc(var(--hdr-top) + 16px);
}

.hdr-tucked {
    --hdr-top: var(--hdr);
}

.hdr {
    transition: transform .35s var(--ease);
}

.hdr.is-tucked {
    transform: translateY(calc(-1 * var(--util)));
}

.util {
    background: var(--ink);
    border-bottom: 1px solid var(--ink-3);
    font-stretch: 87.5%;
    font-weight: 600;
    font-size: .8125rem;
    letter-spacing: .04em;
}

.util__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: calc(var(--util) - 1px);
}

.util__msg {
    max-width: none;
    margin: 0;
    color: var(--muted-on-ink);
}

.util__nav {
    display: flex;
    gap: 22px;
}

.util__nav a {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    padding-block: 6px;
    color: #c9d4cf;
    text-decoration: none;
    transition: color .2s;
}

.util__nav a:hover,
.util__nav a[aria-current="page"] {
    color: var(--yellow);
}

.util__nav .ico {
    width: 1.1em;
    height: 1.1em;
}

/* Member link: the Membri plate from product cards, so the nav invites rather than lists. */
.hdr__nav .hdr__member {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: center;
    padding: 6px calc(12px + 8px) 6px 10px;
    background: var(--yellow);
    color: var(--ink);
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    transition: background .2s var(--ease);
}

.hdr__nav .hdr__member::after {
    display: none;
}

.hdr__nav .hdr__member:hover,
.hdr__nav .hdr__member[aria-current="page"] {
    background: var(--white);
}

.hdr__member img {
    width: 20px;
    height: auto;
    filter: brightness(0);
}

/* ---------- Panel foot: a quiet "see all" row with the count ---------- */

.mm__foot {
    border-top: 1px solid var(--ink-3);
    margin-top: 4px;
}

.mm__foot a {
    display: inline-flex;
    align-items: center;
    gap: .6em;
    padding: 14px 0 18px;
    color: var(--muted-on-ink);
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: .8125rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color .2s;
}

.mm__foot span {
    color: var(--white);
    font-feature-settings: "tnum" 1;
}

.mm__foot a:hover {
    color: var(--yellow);
}

.mm__foot a:hover .ico {
    transform: translateX(3px);
}

.mm__foot .ico {
    transition: transform .25s var(--ease);
}

/* Accessories: cut-outs on off-white plates instead of full-frame photos. */
.mm--acc .mm__apparel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mm--acc .mm__apparel a {
    aspect-ratio: 1;
    background: var(--white);
}

.mm--acc .mm__apparel img {
    object-fit: contain;
    padding: 10% 10% 26%;
}

.mm--acc .mm__lower b {
    font-size: 1.1rem;
}

/* ---------- Drawer extras ---------- */

.drawer {
    grid-template-rows: auto 1fr auto auto;
}

.drawer nav .drawer__member {
    color: var(--yellow);
}

.drawer__util {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 16px 0 4px;
    border-top: 1px solid var(--ink-3);
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: .9375rem;
}

.drawer__util a {
    color: #c9d4cf;
    text-decoration: none;
}

@media (max-width: 1080px) {
    :root {
        --util: 0px;
    }

    .util {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hdr {
        transition: none;
    }
}
