/* --- Brand loop and single product listings --- */
.bee1-brands-loop, .bee1-brands-single {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.bee1-brand-loop-logo img, .bee1-brand-single-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}
.bee1-brand-loop-text, .bee1-brand-single-text {
    font-weight: 600;
    text-decoration: none;
}

/* --- Brand archive banner & description --- */
.bee1-brand-banner {
    margin-bottom: 20px;
    width: 100%;
}
.bee1-brand-banner img {
    width: 100%;
    height: auto;
    display: block;
}
.bee1-brand-description, .bee1-brand-description-long {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
}

/* --- Brands grid shortcode --- */
.bee1-brands-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 4), 1fr);
    gap: 20px;
    margin: 30px 0;
    box-sizing: border-box;
}
.bee1-brand-grid-item {
    box-sizing: border-box;
    display: flex;
}
.bee1-brand-grid-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 30px 20px;
    border-radius: 12px;
    width: 100%;
    aspect-ratio: 1.15 / 1;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.bee1-brand-grid-item a:hover {
    transform: translateY(-4px);
    border-color: #111827;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}
.bee1-brand-grid-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    width: 100%;
    margin-bottom: 12px;
}
.bee1-brand-grid-logo img {
    max-height: 75px;
    max-width: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(1) contrast(0.9);
    opacity: 0.85;
    transition: all 0.3s ease;
}
.bee1-brand-grid-item a:hover .bee1-brand-grid-logo img {
    filter: grayscale(0) contrast(1);
    opacity: 1;
}
.bee1-brand-grid-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4b5563;
    transition: color 0.3s ease;
    direction: ltr;
}
.bee1-brand-grid-item a:hover .bee1-brand-grid-title {
    color: #111827;
}

/* --- Alphabetical directory shortcode --- */
.bee1-brands-az-directory {
    margin: 30px 0;
}
.bee1-brands-az-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.bee1-brands-az-nav a {
    font-weight: bold;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.bee1-brands-az-nav a:hover {
    background: #f5f5f5;
}
.bee1-brands-az-group {
    margin-bottom: 30px;
    scroll-margin-top: 50px;
}
.bee1-brands-az-group h3 {
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 24px;
}
.bee1-brands-az-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.bee1-brands-az-group li a {
    text-decoration: none;
    font-weight: 500;
}
.bee1-brands-az-group li .count {
    color: #888;
    font-size: 12px;
}

/* --- Brands Carousel Slider (Zero jQuery scroll-snap) --- */
.bee1-brands-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 20px 0;
}
.bee1-brands-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.bee1-brands-carousel::-webkit-scrollbar {
    display: none;
}
.bee1-carousel-item {
    flex: 0 0 calc(100% / var(--carousel-items, 5));
    scroll-snap-align: start;
    box-sizing: border-box;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bee1-carousel-item img {
    max-height: 80px;
    width: auto;
    display: block;
}
.bee1-carousel-prev, .bee1-carousel-next {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    user-select: none;
}
.bee1-carousel-prev:hover, .bee1-carousel-next:hover {
    background: #f5f5f5;
}
.bee1-carousel-prev { left: -18px; }
.bee1-carousel-next { right: -18px; }

/* --- Widgets --- */
.bee1-brands-widget-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.bee1-brands-widget-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.bee1-brands-widget-list li a {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.brand-widget-logo {
    max-height: 24px;
    width: auto;
    margin-right: 8px;
}
.bee1-brands-dropdown-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* --- Inline list --- */
.bee1-product-brands-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.bee1-product-brand-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 6px;
}
.bee1-product-brand-item img {
    max-height: 30px;
    width: auto;
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .bee1-brands-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px;
    }
    .bee1-brand-grid-item a {
        padding: 24px 16px;
    }
    .bee1-brand-grid-logo {
        height: 75px;
    }
    .bee1-brand-grid-logo img {
        max-height: 60px;
    }
    .bee1-carousel-item {
        flex: 0 0 33.333% !important;
    }
}
@media (max-width: 600px) {
    .bee1-brands-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    .bee1-brand-grid-item a {
        padding: 20px 10px;
        aspect-ratio: 1.15 / 1;
    }
    .bee1-brand-grid-logo {
        height: 70px;
    }
    .bee1-brand-grid-logo img {
        max-height: 55px;
    }
    .bee1-brand-grid-title {
        font-size: 11px;
    }
    .bee1-carousel-item {
        flex: 0 0 50% !important;
    }
}
