/* Dynamic A-One Autos category navigation and category directory. */
@media (min-width: 901px) {
  .aone-categories-menu { min-width: 338px; }
  .aone-categories-dropdown {
    width: 338px;
    max-height: min(72vh, 650px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    border-top: 0;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .aone-categories-dropdown::-webkit-scrollbar,
  .aone-category-children::-webkit-scrollbar,
  .aone-category-grandchildren::-webkit-scrollbar { width: 0; height: 0; display: none; }
  .aone-categories-dropdown::-webkit-scrollbar-track,
  .aone-category-children::-webkit-scrollbar-track,
  .aone-category-grandchildren::-webkit-scrollbar-track { background: transparent; }
  .aone-categories-dropdown::-webkit-scrollbar-thumb,
  .aone-category-children::-webkit-scrollbar-thumb,
  .aone-category-grandchildren::-webkit-scrollbar-thumb { border-radius: 999px; background: #AE0000; }
  .aone-categories-dropdown > a,
  .aone-category-flyout > a {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 22px;
    border-bottom: 1px solid #e7e7e7;
    background: #fff;
    color: #202020;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
  }
  .aone-category-flyout { position: relative; }
  .aone-category-flyout:hover > a,
  .aone-category-flyout:focus-within > a { background: #f5f5f5; color: #AE0000; }
  .aone-category-children {
    position: fixed;
    left: var(--aone-panel-left, 338px);
    top: var(--aone-panel-top, 0);
    width: 310px;
    max-height: min(72vh, 650px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-8px);
    border-left: 3px solid #AE0000;
    background: #fff;
    box-shadow: 16px 18px 42px rgba(0,0,0,.2);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .aone-category-flyout[data-loaded="true"]:hover > .aone-category-children,
  .aone-category-flyout[data-loaded="true"]:focus-within > .aone-category-children,
  .aone-category-flyout.is-active > .aone-category-children {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  .aone-category-children > a,
  .aone-category-child > a,
  .aone-category-grandchildren a {
    min-width: 0;
    min-height: 47px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 20px;
    border-bottom: 1px solid #ededed;
    color: #686868;
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .aone-category-children > a:hover,
  .aone-category-children > a:focus,
  .aone-category-child:hover > a,
  .aone-category-child:focus-within > a,
  .aone-category-grandchildren a:hover,
  .aone-category-grandchildren a:focus { background: #f7f7f7; color: #AE0000; }
  .aone-category-children .aone-category-parent { color: #171717; font-weight: 800; }
  .aone-category-child { position: relative; }
  .aone-category-grandchildren {
    position: fixed;
    left: var(--aone-panel-left, 648px);
    top: var(--aone-panel-top, 0);
    width: 300px;
    max-height: min(72vh, 650px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-8px);
    border-left: 3px solid #AE0000;
    background: #fff;
    box-shadow: 16px 18px 42px rgba(0,0,0,.2);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .aone-category-child[data-loaded="true"]:hover > .aone-category-grandchildren,
  .aone-category-child[data-loaded="true"]:focus-within > .aone-category-grandchildren,
  .aone-category-child.is-active > .aone-category-grandchildren {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  .aone-categories-dropdown .aone-dropdown-all,
  .aone-categories-dropdown .aone-dropdown-footer { background: #f7f7f7; color: #171717; font-weight: 850; }
  .aone-categories-dropdown .aone-dropdown-all { position: sticky; top: 0; z-index: 4; }
  .aone-categories-dropdown .aone-dropdown-footer { position: sticky; bottom: 0; z-index: 4; color: #AE0000; }
}

.aone-category-directory { padding: 74px 0 66px; background: #090909; color: #fff; }
.aone-category-heading { text-align: center; }
.aone-category-heading > p { color: #aaa; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.aone-category-heading h1 { margin-top: 8px; font-size: clamp(44px, 6vw, 82px); font-weight: 800; line-height: 1; letter-spacing: -.045em; }
.aone-category-heading > div { max-width: 700px; margin: 16px auto 0; color: #aaa; line-height: 1.65; }
.aone-category-directory-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 32px 28px; margin-top: 54px; text-align: left; }
.aone-category-directory-grid a { min-width: 0; display: grid; gap: 5px; color: #fff; }
.aone-category-directory-grid strong { overflow-wrap: anywhere; font-size: 13px; font-weight: 800; line-height: 1.25; text-transform: uppercase; }
.aone-category-directory-grid span { color: #aaa; font-size: 13px; }
.aone-category-directory-grid a:hover strong,
.aone-category-directory-grid a[aria-current="page"] strong { color: #fff; text-decoration: underline; text-decoration-color: #AE0000; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.aone-category-directory-grid a:hover span { color: #ddd; }
.aone-category-total { margin-top: 20px; color: #aaa; text-align: center; }
.aone-shop-directory .aone-category-heading h1 a{display:inline-block;color:#fff;font-size:.55em;font-weight:400;vertical-align:.13em;transition:transform .2s,color .2s}.aone-shop-directory .aone-category-heading h1 a:hover{color:#AE0000;transform:translateX(-4px)}

/* v1.2.39: reference Store directory density while retaining canonical collection URLs. */
.aone-shop-directory{padding-top:68px}.aone-shop-directory .aone-category-heading h1{font-size:clamp(48px,5.2vw,76px)}.aone-shop-directory .aone-category-directory-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:32px 22px;margin-top:48px}.aone-shop-directory .aone-category-directory-grid strong{font-size:12px}.aone-shop-directory .aone-category-directory-grid span{font-size:12px}
@media(max-width:1200px){.aone-shop-directory .aone-category-directory-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:900px){.aone-shop-directory .aone-category-directory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){.aone-shop-directory{padding-top:36px}.aone-shop-directory .aone-category-heading h1{font-size:42px}.aone-shop-directory .aone-category-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 16px;margin-top:30px}}

@media (max-width: 1100px) and (min-width: 901px) {
  .aone-categories-menu { min-width: 285px; }
  .aone-categories-dropdown { width: 285px; }
  .aone-category-children { width: 285px; }
  .aone-category-grandchildren { width: 270px; }
  .aone-category-directory-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .aone-mobile-categories > div { max-height: min(52vh, 430px); }
  .aone-mobile-categories .aone-mobile-category-root { background: #fff; color: #171717; font-weight: 800; }
  .aone-mobile-categories .aone-mobile-category-children a { padding-left: 22px; background: #f7f7f7; color: #4D4D4D; font-weight: 650; }
  .aone-mobile-categories .aone-mobile-category-grandchildren a { padding-left: 38px; background: #eee; color: #666; font-size: 11px; font-weight: 600; }
  .aone-mobile-categories .aone-mobile-category-children,
  .aone-mobile-categories .aone-mobile-category-grandchildren { display: block; }
  .aone-category-directory { padding: 42px 0 38px; }
  .aone-category-heading h1 { font-size: clamp(36px, 10vw, 52px); }
  .aone-category-heading > div { font-size: 13px; }
  .aone-category-directory-grid {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-bottom: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }
  .aone-category-directory-grid a {
    flex: 0 0 152px;
    min-height: 82px;
    align-content: center;
    padding: 13px;
    border: 1px solid #333;
    background: #111;
    scroll-snap-align: start;
  }
  .aone-category-directory-grid strong { font-size: 12px; }
  .aone-category-directory-grid span { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .aone-category-children,
  .aone-category-grandchildren { transition: none; }
}

/* v1.2.49: keep the mobile store directory useful without dominating the fold. */
@media (max-width: 600px) {
  .aone-shop-directory { padding: 22px 0 20px; }
  .aone-shop-directory .aone-category-heading h1 { margin-top: 0; font-size: 34px; }
  .aone-shop-directory .aone-category-directory-grid { gap: 10px; margin-top: 18px; padding-bottom: 5px; }
  .aone-shop-directory .aone-category-directory-grid a { flex-basis: 142px; min-height: 68px; padding: 10px 12px; }
  .aone-shop-directory .aone-category-directory-grid strong { font-size: 11px; line-height: 1.18; }
  .aone-shop-directory .aone-category-directory-grid span { font-size: 10px; }
}