/* Horizontal Menu Carousel for WooCommerce */
.aw-crsl-wrapper {
    box-sizing: border-box;
    width: 100%;
}

.aw-crsl-wrapper * {
    box-sizing: border-box;
}

/* Level 1 */
.aw-level-1 {
    width: 100%;
    padding: 5px 0;
}

.aw-trck {
    display: flex;
    flex-wrap: nowrap;
    padding-left: 8px;
    width: 100%;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.aw-trck::-webkit-scrollbar {
    display: none;
}

.aw-itm {
    flex-shrink: 0;
    width: 80px;
    padding: 0 4px;
}

.aw-itm > a {
    transition: opacity 0.2s;
    text-decoration: none;
    display: block;
    border: none;
    box-shadow: none;
    color: inherit;
}

.aw-itm > a:hover {
    opacity: 0.8;
}

.aw-cntnt {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    align-items: center;
    padding-top: 2px;
}

.aw-icn-wrpr {
    height: auto;
    width: auto;
    margin: 0 auto;
    position: relative;
}

.aw-icn-sqr {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    width: 48px;
    height: 48px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.aw-icn-sqr img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aw-icn-sqr i,
.aw-icn-sqr svg {
    display: block;
    width: 1em;
    height: 1em;
}

.aw-lbl {
    text-align: center;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    hyphens: auto;
    width: 100%;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 400;
}

/* Level 2 */
.aw-level-2 {
    width: 100%;
    padding: 4px 0;
}

.aw-sub-trck {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-left: 8px;
}

.aw-sub-trck::-webkit-scrollbar {
    display: none;
}

.aw-subcat-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 20px;
    background-color: #f5f5f5;
    color: #333;
    font-size: 13px;
    text-decoration: none;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    max-width: 140px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.aw-subcat-btn:hover {
    background-color: #e8e8e8;
    opacity: 0.9;
}

/* Active states Level 1 */
.aw-level-1 .aw-itm.is-active .aw-icn-sqr {
    border-color: #E91E63;
    border-width: 2px;
    border-style: solid;
    transform: scale(1.05);
}

/* Active states Level 2 */
.aw-subcat-btn.is-active {
    background-color: #E91E63;
    color: #ffffff;
    border-color: transparent;
}

/* Drag scroll cursor */
.aw-trck.active-drag,
.aw-sub-trck.active-drag {
    cursor: grabbing;
}

/* ===== COLLAPSE ON SCROLL ===== */
.aw-crsl-wrapper.aw-collapsible {
    transition: all 0.3s ease;
}

.aw-crsl-wrapper.aw-collapsible.is-collapsed .aw-level-1 {
    padding: 4px 0;
}

.aw-crsl-wrapper.aw-collapsible.is-collapsed .aw-icn-wrpr {
    display: none;
}

.aw-crsl-wrapper.aw-collapsible.is-collapsed .aw-cntnt {
    gap: 0;
}

.aw-crsl-wrapper.aw-collapsible.is-collapsed .aw-itm {
    width: auto;
    padding: 0 3px;
}

.aw-crsl-wrapper.aw-collapsible.is-collapsed .aw-itm > a {
    display: inline-flex;
}

.aw-crsl-wrapper.aw-collapsible.is-collapsed .aw-lbl {
    max-width: none;
    width: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    background-color: #f5f5f5;
    color: #333;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.aw-crsl-wrapper.aw-collapsible.is-collapsed .aw-itm.is-active .aw-lbl {
    background-color: #E91E63;
    color: #ffffff;
}

/* Optional: make it sticky when collapsed */
.aw-crsl-wrapper.aw-collapsible.is-collapsed {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}