.lemax-wheretobuy {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.wtbButton {
    border: 1px solid silver;
    border-radius: 6px;
    background-color: white;
    font-size: 12px;
    margin: 0 0 0 20px;
    cursor: pointer;
    padding: 5px 10px;
}
.wtbButton:hover {
    background-color: #f0f0f0;
}
.menu-active {
    box-shadow: 0px 0px 20px 1px lightgrey;
}
.yes-no-selector .menu-active {
    box-shadow: 0px 0px 20px 1px white;
}
.facet-count {
    line-height: .5;
    margin-bottom: 6px;
}
.lemax-wheretobuy .facet-item {
    cursor: pointer;
    display: inline-block;
    width: 110px;
    padding-top: 4px;
    border-radius: 10px;
    margin-bottom: 10px;
    text-align: center;
    font-family: "Nobel Reg", sans-serif;
    font-size: 14px;
}
#halloween .facet-title {
    font-size: 18px;
    padding: 0px;
}
#online .facet-title {
    font-size: 18px;
    padding: 0px;
}
#physical .facet-title {
    font-size: 18px;
    padding: 0px;
}
#seasonal .facet-title {
    font-size: 18px;
    padding: 0px;
}

#halloween .facet-item {
    width: 60px;
}
#online .facet-item {
    width: 60px;
}
#seasonal .facet-item {
    width: 60px;
}
#physical .facet-item {
    width: 60px;
}
.facet-title {
    font-size: 28px;
    font-weight: 500;
    padding: 10px;
}
.store-filters-container {
    width: fit-content;
    display: block;
    clear: both;
}

.store-filter-box {
    margin: 10px;
    padding: 10px;
    background-color: gainsboro;
    border-radius: 10px;
    text-align: center;
    float: left;
}

#online {
    margin: 10px;
    padding: 10px;
    background-color: gainsboro;
    border-radius: 10px;
}
#physical {
    margin: 10px;
    padding: 10px;
    background-color: gainsboro;
    border-radius: 10px;
}
#seasonal {
    margin: 10px;
    padding: 10px;
    background-color: gainsboro;
    border-radius: 10px;
}
#halloween {
    margin: 10px;
    padding: 10px;
    background-color: gainsboro;
    border-radius: 10px;
}
.yes-no-selector {
    display: inline-block;
}
@media (max-width: 1199px) {
    .hit {
        width: 23%;
    }
}
@media (max-width: 960px) {
    .hit {
        width: 49%;
    }
}
/* Override for 481px-767px to ensure 2 columns - must come after other media queries */
@media (min-width: 481px) and (max-width: 767px) {
    .hit {
        width: 48% !important;
        margin: 1% !important;
        float: left !important;
    }
    
    #lemax-wtb-hits {
        width: 100%;
        box-sizing: border-box;
    }
}
.hit {
    width: 24%;
    float: left;
    padding: 10px 20px 20px;
    margin: .5%;
    border: 1px solid #EEE;
    box-shadow: 0 0 3px #f6f6f6;
    position: relative;
    min-height: 330px;
    background-color: white;
    box-shadow: 1px 1px 15px 0 rgb(95 80 186 / 20%);
    text-align: center;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.region-filter .facet-item img,
.country-filter .facet-item img {
    max-width: 80px;
    height: auto;
}
.product-picture-wrapper {
    margin-bottom: 15px;
    flex-shrink: 0;
}
.product-picture img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}
.product-desc-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.product-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
    flex-shrink: 0;
}
.product-type {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    flex-shrink: 0;
}
.product-type img {
    margin: 0 5px;
    max-width: 30px;
    height: auto;
}

/* Responsive Styles */

/* Tablet Styles (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .facet-title {
        font-size: 24px;
        padding: 8px;
    }
    
    .lemax-wheretobuy .facet-item {
        width: 100px;
        font-size: 13px;
    }
    
    .region-filter .facet-item img,
    .country-filter .facet-item img {
        max-width: 70px;
    }
    
    .store-filter-box,
#online, #physical, #seasonal, #halloween {
        margin: 8px;
        padding: 8px;
    }
    
    #online .facet-title,
    #physical .facet-title,
    #seasonal .facet-title,
    #halloween .facet-title {
        font-size: 16px;
    }
    
    .hit {
        width: 31%;
        margin: 1%;
        padding: 10px 15px 15px;
    }
    
    .product-picture img {
        max-height: 180px;
    }
}

/* Mobile Styles (480px - 767px) - 2 columns */
@media (min-width: 481px) and (max-width: 767px) {
    .lemax-wheretobuy {
        padding: 0 10px;
    }
    
    .filtersControl {
        padding: 10px 0;
    }
    
    .facet-title {
        font-size: 20px;
        padding: 8px 5px;
    }
    
    .facet-title span {
        display: block;
        margin-top: 10px;
    }
    
    .wtbButton {
        margin: 10px 0 0 0;
        font-size: 11px;
        padding: 6px 12px;
        width: 100%;
        max-width: 200px;
    }
    
    .region-filter,
    .country-filter {
        margin-bottom: 20px;
    }
    
    .lemax-wheretobuy .facet-item {
        width: 90px;
        font-size: 12px;
        margin: 5px;
        padding: 8px 4px;
    }
    
    .region-filter .facet-item img,
    .country-filter .facet-item img {
        max-width: 60px;
    }
    
    .store-filter-box,
    #online, #physical, #seasonal, #halloween {
        margin: 5px;
        padding: 8px;
        float: none;
        display: block;
        width: 100%;
        margin-bottom: 15px;
    }
    
    #online .facet-title,
    #physical .facet-title,
    #seasonal .facet-title,
    #halloween .facet-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    #online .facet-item,
    #physical .facet-item,
    #seasonal .facet-item,
    #halloween .facet-item {
        width: 70px;
        margin: 5px;
    }
    
    .yes-no-selector {
        display: inline-block;
        margin: 5px;
    }
    
    .hit {
        width: 48% !important;
        margin: 1% !important;
        padding: 10px;
        min-height: 280px;
        box-sizing: border-box;
        float: left;
    }
    
    .product-picture-wrapper {
        margin-bottom: 10px;
    }
    
    .product-picture img {
        max-height: 150px;
    }
    
    .product-name {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .product-type {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .product-type img {
        max-width: 25px;
        margin: 0 3px;
    }
    
    /* Clear float for filter container on mobile */
    .store-filters-container {
        width: 100% !important;
        display: block !important;
    }
    
    .store-filter-box {
        float: none !important;
    }
    
    #lemax-wtb-hits {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Small Mobile Styles (below 480px) */
@media (max-width: 480px) {
    .lemax-wheretobuy {
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .filtersControl {
        padding: 5px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .facet-title {
        font-size: 18px;
        padding: 6px 3px;
    }
    
    .lemax-wheretobuy .facet-item {
        width: 80px;
        font-size: 11px;
        margin: 3px;
        padding: 6px 3px;
    }
    
    .region-filter .facet-item img,
    .country-filter .facet-item img {
        max-width: 50px;
    }
    
    .store-filter-box,
    #online, #physical, #seasonal, #halloween {
        margin: 3px 0;
        padding: 6px;
        width: 100%;
        box-sizing: border-box;
    }
    
    #online .facet-title,
    #physical .facet-title,
    #seasonal .facet-title,
    #halloween .facet-title {
        font-size: 14px;
    }
    
    #online .facet-item,
    #physical .facet-item,
    #seasonal .facet-item,
    #halloween .facet-item {
        width: 60px;
        margin: 3px;
    }
    
    .hit {
        width: 100% !important;
        margin: 10px 0 !important;
        padding: 10px;
        min-height: auto;
        float: none;
        box-sizing: border-box;
    }
    
    #lemax-wtb-hits {
        width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }
    
    .product-picture img {
        max-height: 180px;
    }
    
    .product-name {
        font-size: 13px;
    }
    
    .product-type {
        font-size: 11px;
    }
    
    .wtbButton {
        font-size: 10px;
        padding: 5px 10px;
    }
    
    .region-filter,
    .country-filter {
        width: 100%;
        box-sizing: border-box;
        padding: 5px;
        margin: 0 0 15px 0;
    }
    
    .store-filters-container {
        width: 100% !important;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
}

/* Landscape Mobile (480px - 768px, landscape) */
@media (max-width: 768px) and (orientation: landscape) {
    .hit {
        width: 32%;
        margin: 0.5%;
    }
    
    .lemax-wheretobuy .facet-item {
        width: 85px;
    }
}

/* Large Tablets (1024px - 1199px) */
@media (min-width: 1025px) and (max-width: 1199px) {
    .hit {
        width: 23%;
        margin: 1%;
    }
}

/* Ensure hits container clears properly on all devices */
#lemax-wtb-hits {
    clear: both;
    width: 100%;
    box-sizing: border-box;
}

/* Fix for equal height function on responsive */
@media (max-width: 480px) {
    .hit {
        height: auto !important;
    }
}

/* Ensure heights are equalized for 481px-767px (2 columns) */
@media (min-width: 481px) and (max-width: 767px) {
    .hit {
        height: auto;
        /* Height will be equalized by JavaScript */
    }
}

