/**
 * Frontend styles for Custom WooCommerce Brands
 */

/* Brand display on product page */
.product-brand {
    margin-bottom: 15px;
    clear: both;
}

.product-brand .brand-label {
    font-weight: 600;
}

.product-brand .brand-logo {
    max-height: 30px;
    width: auto;
    vertical-align: middle;
    margin-left: 5px;
}

/* Brand grid */
.custom-brands-grid {
    display: grid;
    grid-gap: 20px;
    margin-bottom: 30px;
}

.custom-brands-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.custom-brands-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.custom-brands-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.custom-brands-grid.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.custom-brands-grid.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 768px) {
    .custom-brands-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .custom-brands-grid {
        grid-template-columns: 1fr !important;
    }
}

.custom-brands-grid .brand-item {
    text-align: center;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.custom-brands-grid .brand-item:hover {
    border-color: #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.custom-brands-grid .brand-logo {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    margin-bottom: 10px;
}

.custom-brands-grid .brand-name {
    font-weight: 600;
    margin: 10px 0 5px;
    display: block;
}

.custom-brands-grid .brand-count {
    color: #777;
    font-size: 0.9em;
}

/* Brand carousel */
.custom-brands-carousel {
    padding: 20px 0;
    margin-bottom: 30px;
}

.custom-brands-carousel .brand-item {
    text-align: center;
    padding: 10px;
}

.custom-brands-carousel .brand-logo {
    max-width: 100%;
    height: auto;
    max-height: 60px;
}

.custom-brands-carousel .brand-name {
    display: block;
    margin-top: 10px;
    font-weight: 600;
}

.custom-brands-carousel .slick-arrow {
    color: #333;
    background: #f5f5f5;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    z-index: 2;
}

.custom-brands-carousel .slick-arrow:hover {
    background: #e5e5e5;
}

/* Same brand products */
.custom-brands-same-products {
    margin-top: 40px;
    margin-bottom: 20px;
    clear: both;
}

.custom-brands-same-products h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Brand filter widget */
.custom-brands-filter {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-brands-filter li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.custom-brands-filter li:last-child {
    border-bottom: none;
}

.custom-brands-filter li.active a {
    font-weight: 600;
}

.custom-brands-filter .brand-logo {
    max-height: 20px;
    width: auto;
    vertical-align: middle;
    margin-right: 5px;
}

.custom-brands-filter .count {
    color: #999;
    font-size: 0.9em;
}

/* Brands list widget */
.brands-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.brands-list .brand-item {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.brands-list .brand-item:last-child {
    border-bottom: none;
}

.brands-list .brand-logo {
    max-height: 20px;
    width: auto;
    vertical-align: middle;
    margin-right: 5px;
}

.brands-list .count {
    color: #999;
    font-size: 0.9em;
}


/* Brand Archive Page Styles */
.brand-archive-wrapper {
    margin-bottom: 50px;
}

/* Banner styles */
.brand-banner-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
}

.brand-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Header section with logo and description */
.brand-header {
    margin-bottom: 40px;
    padding: 0 15px;
}

.brand-identity {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.brand-logo {
    flex: 0 0 180px;
}

.brand-logo img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
}

.brand-info {
    flex: 1;
}

.brand-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 28px;
    color: #333;
}

.brand-description {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.brand-product-count {
    font-weight: 600;
    color: #666;
}

/* Products section */
.brand-products {
    padding: 0 15px;
}

.brand-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.brand-products-header h2 {
    margin: 0;
    font-size: 22px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .brand-identity {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .brand-logo {
        flex: 0 0 auto;
        max-width: 140px;
    }
    
    .brand-banner-container {
        height: 180px;
    }
    
    .brand-products-header {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .brand-banner-container {
        height: 150px;
    }
}