/* Category filter layout fix - preserves the existing design and only constrains category chips/icons. */
.category-filter-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

#offerFilters {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 4px 30px 10px !important;
    margin: 0 !important;
    scrollbar-width: none;
    box-sizing: border-box;
}

#offerFilters::-webkit-scrollbar {
    display: none;
}

#offerFilters .filter {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 4px 12px !important;
    gap: 5px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    border: none !important;
    background: linear-gradient(180deg, #162534 0%, #0b141e 100%) !important;
    box-shadow: none !important;
}

#offerFilters .filter.active,
#offerFilters .filter:focus-visible,
#offerFilters .filter:hover,
#offerFilters > .filter.active {
    box-shadow: none !important;
}

#offerFilters .filter img,
#offerFilters .filter .ui-icon,
#offerFilters .filter .icon-inline {
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    height: 28px !important;
    min-width: 0 !important;
    min-height: 28px !important;
    max-width: 80px !important;
    max-height: 28px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 !important;
    filter: none !important;
}

.category-filter-arrow {
    top: 50% !important;
    z-index: 20 !important;
}

@media (max-width: 600px) {
    .category-filter-wrap {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 50% !important;
        transform: translateX(-50%) !important;
    }

    #offerFilters {
        gap: 6px !important;
        padding: 3px 12px 7px !important;
    }

    #offerFilters .filter {
        min-height: 34px !important;
        height: 34px !important;
        padding: 3px 11px !important;
        gap: 5px !important;
        border-radius: 17px !important;
        font-size: 11px !important;
    }

    #offerFilters .filter.active {
        box-shadow: none !important;
    }

    #offerFilters .filter img,
    #offerFilters .filter .ui-icon,
    #offerFilters .filter .icon-inline {
        flex-basis: auto !important;
        width: auto !important;
        height: 22px !important;
        min-width: 0 !important;
        min-height: 22px !important;
        max-width: 60px !important;
        max-height: 22px !important;
    }

    .category-filter-arrow {
        width: 32px !important;
        height: 32px !important;
        margin-top: 0 !important;
        transform: translateY(-50%) !important;
        background: #0a1828 !important;
        border: 1px solid rgba(41,193,255,0.4) !important;
        border-radius: 50% !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }
    .category-filter-arrow.left { left: 8px !important; }
    .category-filter-arrow.right { right: 8px !important; }
    .category-filter-arrow svg {
        width: 17px !important;
        height: 17px !important;
        stroke-width: 2.5 !important;
        color: #36caff !important;
        filter: none !important;
    }
}

/* HARD CATEGORY CHIP RESET - fixes inherited image/card sizing without touching other sections */
#offerFilters,
#offerFilters.filters {
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:flex-start !important;
    flex-wrap:nowrap !important;
    width:100% !important;
    height:56px !important;
    min-height:56px !important;
    max-height:56px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    box-sizing:border-box !important;
}

#offerFilters > .filter,
#offerFilters > button.filter {
    position:relative !important;
    display:inline-flex !important;
    flex:0 0 auto !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:center !important;
    width:max-content !important;
    min-width:max-content !important;
    max-width:max-content !important;
    height:44px !important;
    min-height:44px !important;
    max-height:44px !important;
    margin:0 !important;
    padding:6px 14px !important;
    line-height:1 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
}

#offerFilters > .filter > img,
#offerFilters > .filter > .ui-icon,
#offerFilters > .filter > .icon-inline,
#offerFilters > .filter > img[class*="icon-"] {
    position:static !important;
    display:inline-block !important;
    flex:0 0 auto !important;
    width:auto !important;
    min-width:0 !important;
    height:28px !important;
    max-width:80px !important;
    max-height:28px !important;
    margin:0 8px 0 0 !important;
    padding:0 !important;
    object-fit:contain !important;
    object-position:center !important;
    transform:none !important;
}

#offerFilters > .filter > span {
    display:inline-block !important;
    width:auto !important;
    max-width:none !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
}

@media (max-width:600px) {
    #offerFilters,
    #offerFilters.filters {
        height:50px !important;
        min-height:50px !important;
        max-height:50px !important;
        padding:3px 6px 5px !important;
    }
    #offerFilters > .filter,
    #offerFilters > button.filter {
        height:40px !important;
        min-height:40px !important;
        max-height:40px !important;
        padding:5px 12px !important;
        font-size:10px !important;
    }
    #offerFilters > .filter > img,
    #offerFilters > .filter > .ui-icon,
    #offerFilters > .filter > .icon-inline,
    #offerFilters > .filter > img[class*="icon-"] {
        flex-basis:auto !important;
        width:auto !important;
        min-width:0 !important;
        max-width:60px !important;
        height:22px !important;
        min-height:22px !important;
        max-height:22px !important;
        margin-right:6px !important;
    }
}

/* Removed hardcoded scale adjustments to allow CSS height to manage sizes consistently */

/* DESKTOP SPECIFIC FIXES */
@media (min-width: 601px) {
    .category-filter-wrap {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 50% !important;
        transform: translateX(-50%) !important;
        overflow: hidden !important;
    }
    
    #offerFilters {
        padding: 5px 24px 10px !important;
        cursor: grab;
    }
    
    #offerFilters.dragging {
        cursor: grabbing;
        user-select: none;
    }

    .category-filter-arrow.desktop-only {
        width: 36px !important;
        height: 36px !important;
        margin-top: 0 !important;
        transform: translateY(-50%) !important;
        background: #0a1828 !important;
        border: 1px solid rgba(41,193,255,0.4) !important;
        border-radius: 50% !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        z-index: 20 !important;
        transition: transform 0.2s, box-shadow 0.2s !important;
    }
    
    .category-filter-arrow.desktop-only:hover {
        transform: translateY(-50%) scale(1.1) !important;
        box-shadow: none !important;
    }

    .category-filter-arrow.left.desktop-only { left: 16px !important; }
    .category-filter-arrow.right.desktop-only { right: 16px !important; }
    
    .category-filter-arrow.desktop-only svg {
        width: 20px !important;
        height: 20px !important;
        stroke-width: 2.5 !important;
        color: #36caff !important;
        filter: none !important;
    }
}

@media (max-width: 600px) {
    .desktop-only {
        display: none !important;
    }
}
