/* TT Brand Logo Grid Override - Ultra Specific Styles */

/* Forced Grid Layout */
.brands.brands-grid .brands-grid-container {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    overflow: hidden !important;
    padding: 30px 15px !important;
    background: #ffffff !important;
}

.brands-grid-row .product-count {
    font-size: 11px;
    font-family: "Coda", "Helvetica", "Arial", "sans-serif";
    margin-top: 5px;
}

.brands.brands-grid .load-more-brands:hover:after {
    background: #ffffff;
}

.brands.brands-grid .brands-grid-row {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: row !important;
    flex-direction: row !important;
    -ms-flex-wrap: nowrap !important;
    flex-wrap: nowrap !important;
    -webkit-box-pack: justify !important;
    -ms-flex-pack: justify !important;
    justify-content: space-between !important;
    -webkit-box-align: stretch !important;
    -ms-flex-align: stretch !important;
    align-items: stretch !important;
    margin-bottom: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 20px;
}

.brands.brands-grid .brand-image.grid-item {
    -webkit-box-flex: 0 !important;
    -ms-flex: 0 0 calc(16.666% - 15px) !important;
    flex: 0 0 calc(16.666% - 15px) !important;
    width: calc(16.666% - 15px) !important;
    max-width: calc(16.666% - 15px) !important;
    min-width: calc(16.666% - 15px) !important;
    text-align: center !important;
    padding: 15px 8px !important;
    margin: 0 7.5px 0 0 !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 3px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: column !important;
    flex-direction: column !important;
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    min-height: 100px !important;
    position: relative !important;
    float: none !important;
    font-family: "Coda", "Helvetica", "Arial", "sans-serif";
}

.brands.brands-grid .brand-image.grid-item:last-child {
    margin-right: 0 !important;
}

.brands.brands-grid .brand-image.grid-item:hover {
    -webkit-transform: translateY(-3px) !important;
    transform: translateY(-3px) !important;
    -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    border-color: #940000 !important;
}

.brands.brands-grid .brand-image.grid-item a {
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
}

.brands.brands-grid .brand-image.grid-item img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 70px !important;
    opacity: 0.8 !important;
    -webkit-transition: all 0.3s ease !important;
    transition: all 0.3s ease !important;
    margin: 0 auto !important;
    display: block !important;
    object-fit: contain !important;
    border: none !important;
}

.brands.brands-grid .brand-image.grid-item:hover img {
    opacity: 1 !important;
}

.brands.brands-grid .brand-image.grid-item h3 {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    color: #666 !important;
    font-weight: 500 !important;
}

.brands.brands-grid .brand-image.grid-item h3 a {
    color: #666 !important;
    text-decoration: none !important;
    font-size: 11px !important;
    font-weight: 500 !important;
}

.brands.brands-grid .brand-image.grid-item h3 a:hover {
    color: #940000 !important;
}

/* Product Count Styles */
.brands .brand-product-count {
    font-size: 10px !important;
    color: #999 !important;
    margin-top: 5px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
}

.brands-grid .brand-product-count {
    margin-top: 5px !important;
}

.brands-slider .brand-product-count {
    margin-top: 8px !important;
    text-align: center !important;
}

/* Load More Button */
.brands.brands-grid .brands-load-more {
    text-align: center !important;
    margin-top: 30px !important;
    padding-top: 20px !important;
    clear: both !important;
    width: 100% !important;
}

.brands.brands-grid .load-more-brands {
    background: #940000 !important;
    color: #ffffff !important;
    border: solid 1px transparent !important;
    padding: 10px 15px !important;
    border-radius: 3px;
    font-size: 15px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    -webkit-transition: all 0.3s ease !important;
    transition: all 0.3s ease !important;
    width: 100%;
    max-width: 300px;
    margin: 0;
}

.brands.brands-grid .load-more-brands:hover {
    /* background: #ffffff !important; */
    color: #000 !important;
    border: solid 1px #000000 !important;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .brands.brands-grid .brand-image.grid-item {
        -ms-flex: 0 0 calc(20% - 12px) !important;
        flex: 0 0 calc(20% - 12px) !important;
        width: calc(20% - 12px) !important;
        max-width: calc(20% - 12px) !important;
        min-width: calc(20% - 12px) !important;
    }
}

@media (max-width: 992px) {
    .brands.brands-grid .brand-image.grid-item {
        -ms-flex: 0 0 calc(25% - 12px) !important;
        flex: 0 0 calc(25% - 12px) !important;
        width: calc(25% - 12px) !important;
        max-width: calc(25% - 12px) !important;
        min-width: calc(25% - 12px) !important;
    }
    
    .brands.brands-grid .brands-grid-row {
        -ms-flex-wrap: wrap !important;
        flex-wrap: wrap !important;
    }
}

@media (max-width: 767px) {
    .brands.brands-grid .brand-image.grid-item {
        -ms-flex: 0 0 calc(33.333% - 10px) !important;
        flex: 0 0 calc(33.333% - 10px) !important;
        width: calc(33.333% - 10px) !important;
        max-width: calc(33.333% - 10px) !important;
        min-width: calc(33.333% - 10px) !important;
        margin: 0 5px 15px 5px !important;
    }
    
    .brands.brands-grid .brands-grid-row {
        -webkit-box-pack: center !important;
        -ms-flex-pack: center !important;
        justify-content: center !important;
        -ms-flex-wrap: wrap !important;
        flex-wrap: wrap !important;
    }
}

@media (max-width: 543px) {
    .brands.brands-grid .brand-image.grid-item {
        -ms-flex: 0 0 calc(50% - 10px) !important;
        flex: 0 0 calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
        min-width: calc(50% - 10px) !important;
    }
}

@media (max-width: 400px) {
    .brands.brands-grid .brand-image.grid-item {
        -ms-flex: 0 0 calc(100% - 10px) !important;
        flex: 0 0 calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
        min-width: calc(50% - 10px) !important;
    }
} 