/**
 * Mobizeno Brands Public Stylesheet
 * Responsive Brands Directory, A-Z Alphabet Filter, & Single Brand Archive
 */

:root {
    --mbz-brand-primary: #1a73e8;
    --mbz-brand-primary-hover: #1557b0;
    --mbz-brand-primary-light: #e8f0fe;
    --mbz-brand-text: #202124;
    --mbz-brand-muted: #5f6368;
    --mbz-brand-border: #dadce0;
    --mbz-brand-border-light: #edf2f7;
    --mbz-brand-bg: #ffffff;
    --mbz-brand-bg-alt: #f8f9fa;
    --mbz-brand-radius: 12px;
    --mbz-brand-radius-sm: 8px;
    --mbz-brand-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --mbz-brand-shadow-md: 0 4px 14px rgba(0,0,0,0.08);
}

/* ==========================================================================
   1. Brands Directory Container & Header
   ========================================================================== */
.mbz-brands-page-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--mbz-brand-text);
}

.mbz-brands-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #ffffff;
    border: 1px solid var(--mbz-brand-border);
    border-radius: var(--mbz-brand-radius);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: var(--mbz-brand-shadow-sm);
}

.mbz-brands-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--mbz-brand-text);
}

.mbz-brands-title .dashicons {
    color: var(--mbz-brand-primary);
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.mbz-brands-subtitle {
    margin: 0;
    color: var(--mbz-brand-muted);
    font-size: 14px;
}

/* Header Live Search Input */
.mbz-brands-search-box {
    position: relative;
    min-width: 280px;
    flex: 1 1 320px;
    max-width: 440px;
    display: flex;
    align-items: center;
}

.mbz-brands-search-icon {
    position: absolute;
    left: 14px;
    color: #9aa0a6;
    font-size: 20px;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

input[type="text"].mbz-brand-search-input {
    width: 100%;
    padding: 11px 36px 11px 42px;
    font-size: 14px;
    border: 2px solid var(--mbz-brand-border);
    border-radius: 24px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
}

.mbz-brand-search-input:focus {
    border-color: var(--mbz-brand-primary);
    box-shadow: 0 0 0 4px var(--mbz-brand-primary-light);
}

.mbz-brand-search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: #9aa0a6;
    cursor: pointer;
}

/* ==========================================================================
   2. Popular / Featured Manufacturers Section
   ========================================================================== */
.mbz-featured-brands-section {
    background: #ffffff;
    border: 1px solid var(--mbz-brand-border);
    border-radius: var(--mbz-brand-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--mbz-brand-shadow-sm);
}

.mbz-section-subtitle {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mbz-brand-muted);
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mbz-section-subtitle .dashicons {
    color: #fbbc04;
}

.mbz-featured-brands-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mbz-featured-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--mbz-brand-bg-alt);
    border: 1px solid var(--mbz-brand-border-light);
    padding: 7px 14px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--mbz-brand-text);
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.mbz-featured-brand-pill:hover {
    background: var(--mbz-brand-primary);
    color: #ffffff;
    border-color: var(--mbz-brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(26, 115, 232, 0.25);
}

.mbz-fb-count {
    background: rgba(0, 0, 0, 0.06);
    color: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

.mbz-featured-brand-pill:hover .mbz-fb-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* ==========================================================================
   3. A-Z Alphabet Filter Bar
   ========================================================================== */
.mbz-az-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--mbz-brand-border);
    border-radius: var(--mbz-brand-radius);
    padding: 12px 18px;
    margin-bottom: 24px;
    box-shadow: var(--mbz-brand-shadow-sm);
}

.mbz-az-pill {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid transparent;
    background: var(--mbz-brand-bg-alt);
    color: var(--mbz-brand-text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mbz-az-pill:hover:not(.mbz-az-disabled) {
    background: var(--mbz-brand-primary-light);
    color: var(--mbz-brand-primary);
    border-color: #c2e7ff;
}

.mbz-az-pill.mbz-az-active {
    background: var(--mbz-brand-primary);
    color: #ffffff;
    border-color: var(--mbz-brand-primary);
}

.mbz-az-pill.mbz-az-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: transparent;
}

/* ==========================================================================
   4. Brands Directory Grid & Cards
   ========================================================================== */
.mbz-brands-grid {
    display: grid;
    gap: 16px;
}

.mbz-brands-grid.mbz-cols-4 {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.mbz-brands-grid.mbz-cols-3 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.mbz-brands-grid.mbz-cols-2 {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.mbz-brands-grid.mbz-cols-6 {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.mbz-brand-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid var(--mbz-brand-border);
    border-radius: var(--mbz-brand-radius-sm);
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--mbz-brand-shadow-sm);
}

.mbz-brand-card:hover {
    border-color: var(--mbz-brand-primary);
    transform: translateY(-3px);
    box-shadow: var(--mbz-brand-shadow-md);
}

.mbz-brand-badge-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--mbz-brand-primary-light);
    color: var(--mbz-brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.5px;
    border: 1px solid #c2e7ff;
    transition: all 0.2s ease;
}

.mbz-brand-card:hover .mbz-brand-badge-icon {
    background: var(--mbz-brand-primary);
    color: #ffffff;
    border-color: var(--mbz-brand-primary);
}

.mbz-brand-info {
    flex: 1;
    min-width: 0;
}

.mbz-brand-name {
    margin: 0 0 2px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--mbz-brand-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mbz-brand-count {
    font-size: 12px;
    color: var(--mbz-brand-muted);
}

.mbz-brand-arrow {
    color: #9aa0a6;
    font-size: 18px;
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mbz-brand-card:hover .mbz-brand-arrow {
    color: var(--mbz-brand-primary);
    transform: translateX(4px);
}

/* Empty Search Feedback */
.mbz-brands-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px solid var(--mbz-brand-border);
    border-radius: var(--mbz-brand-radius);
}

.mbz-brands-no-results h3 {
    margin: 12px 0 6px 0;
    font-size: 18px;
}

.mbz-brands-no-results p {
    margin: 0 0 18px 0;
    color: var(--mbz-brand-muted);
}

.mbz-btn-reset-filter {
    background: var(--mbz-brand-primary);
    color: #ffffff;
    border: none;
    padding: 9px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================================================
   5. Single Brand Archive Template Styling
   ========================================================================== */
.mbz-full-width-content,
body.tax-mbz_brand #primary,
body.tax-mbz_brand .site-content,
body.tax-mbz_brand .inside-article {
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    float: none !important;
}

body.tax-mbz_brand #right-sidebar,
body.tax-mbz_brand #left-sidebar,
body.tax-mbz_brand .sidebar {
    display: none !important;
}

.mbz-brand-archive-wrapper {
    max-width: 1200px;
    margin: 24px auto 40px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.mbz-brand-archive-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #ffffff;
    border: 1px solid var(--mbz-brand-border);
    border-radius: var(--mbz-brand-radius);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: var(--mbz-brand-shadow-sm);
}

.mbz-brand-hero-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 300px;
}

.mbz-brand-avatar {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
    flex-shrink: 0;
}

.mbz-brand-breadcrumbs {
    margin-bottom: 4px;
}

.mbz-brand-breadcrumbs a {
    color: var(--mbz-brand-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.15s;
}

.mbz-brand-breadcrumbs a:hover {
    color: var(--mbz-brand-primary-hover);
    text-decoration: underline;
}

.mbz-brand-archive-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: var(--mbz-brand-text);
    line-height: 1.2;
}

.mbz-brand-count-pill {
    display: inline-block;
    background: var(--mbz-brand-bg-alt);
    border: 1px solid var(--mbz-brand-border-light);
    color: var(--mbz-brand-muted);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}

/* In-Brand Live Device Search Box */
.mbz-brand-device-search-box {
    position: relative;
    min-width: 240px;
    flex: 1 1 280px;
    max-width: 360px;
    display: flex;
    align-items: center;
}

.mbz-brand-device-search-icon {
    position: absolute;
    left: 14px;
    color: #9aa0a6;
    font-size: 18px;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

input[type="text"].mbz-brand-device-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    font-size: 13px;
    border: 2px solid var(--mbz-brand-border);
    border-radius: 20px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
}

.mbz-brand-device-search-input:focus {
    border-color: var(--mbz-brand-primary);
    box-shadow: 0 0 0 3px var(--mbz-brand-primary-light);
}

.mbz-brand-device-search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: #9aa0a6;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.mbz-brand-device-search-clear:hover {
    color: #202124;
}

.mbz-brand-archive-desc {
    margin-top: -8px;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid var(--mbz-brand-border);
    border-radius: var(--mbz-brand-radius);
    padding: 18px 24px;
    color: var(--mbz-brand-muted);
    font-size: 14px;
    line-height: 1.6;
    box-shadow: var(--mbz-brand-shadow-sm);
}

.mbz-devices-no-search-results {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px solid var(--mbz-brand-border);
    border-radius: var(--mbz-brand-radius);
    margin: 20px 0;
}

.mbz-devices-no-search-results h3 {
    margin: 12px 0 6px 0;
    font-size: 17px;
}

.mbz-devices-no-search-results p {
    margin: 0;
    color: var(--mbz-brand-muted);
    font-size: 13px;
}

.mbz-empty-brand-catalog {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px solid var(--mbz-brand-border);
    border-radius: var(--mbz-brand-radius);
}

.mbz-btn-back-brands {
    display: inline-block;
    margin-top: 16px;
    background: var(--mbz-brand-primary);
    color: #ffffff;
    padding: 9px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
}

/* Pagination */
.mbz-pagination {
    margin-top: 36px;
    text-align: center;
}

.mbz-pagination ul.page-numbers {
    display: inline-flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mbz-pagination li .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--mbz-brand-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--mbz-brand-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.mbz-pagination li .page-numbers.current,
.mbz-pagination li .page-numbers:hover {
    background: var(--mbz-brand-primary);
    color: #ffffff;
    border-color: var(--mbz-brand-primary);
}

/* ==========================================================================
   6. Responsive Adaptations
   ========================================================================== */
@media (max-width: 768px) {
    .mbz-brands-header {
        flex-direction: column;
        align-items: stretch;
    }

    .mbz-brands-search-box {
        max-width: 100%;
    }

    .mbz-az-filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .mbz-az-filter-bar::-webkit-scrollbar {
        display: none;
    }

    .mbz-brands-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Brand Archive — Results Bar & AJAX Pagination
   ========================================================================== */

.mbz-brand-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f4ff;
    border: 1px solid #d2e3fc;
    border-radius: 8px;
    padding: 10px 18px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #1a73e8;
}

.mbz-brand-clear-search-link {
    background: none;
    border: none;
    color: #5f6368;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.mbz-brand-clear-search-link:hover {
    color: #d93025;
}

/* AJAX Pagination Container */
.mbz-ajax-pagination {
    margin-top: 20px;
}

.mbz-ajax-page-numbers {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.mbz-ajax-page-btn {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mbz-brand-text, #202124);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.mbz-ajax-page-btn:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
}

.mbz-ajax-page-numbers .page-numbers.current {
    background: #1a73e8;
    color: #ffffff;
    border: 1px solid #1a73e8;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
}

.mbz-ajax-page-numbers .page-numbers.dots {
    color: #9aa0a6;
    padding: 6px 4px;
}

