/* ==========================================================================
   KapanStore (zpro.am) /brands Directory Page Scoped Styles
   Tailwind v2.2.19 Safe (360px - 2560px+)
   ========================================================================== */

.zpro-brands-dir-wrap,
.zpro-brands-dir-wrap * {
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .zpro-brands-dir-hero .zpro-bs-header-copy {
        flex: 1 1 260px;
        width: auto;
    }
}

.zpro-brands-reset:focus-visible {
    outline: 3px solid #cc0000;
    outline-offset: 2px;
}

.zpro-brands-dir-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 22px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .zpro-brands-dir-hero {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.zpro-brands-search-box {
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .zpro-brands-search-box {
        width: 340px;
        flex-shrink: 0;
    }
}

.zpro-brands-search-input {
    width: 100%;
    min-block-size: 46px;
    border-radius: 12px;
    border: 1px solid #d4d4d8;
    background-color: #ffffff;
    padding: 10px 38px 10px 40px;
    font-size: 1rem;
    color: #18181b;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.zpro-brands-search-input:focus {
    outline: none;
    border-color: #cc0000;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.12);
}

input[type="search"].zpro-brands-search-input::-webkit-search-decoration,
input[type="search"].zpro-brands-search-input::-webkit-search-cancel-button,
input[type="search"].zpro-brands-search-input::-webkit-search-results-button,
input[type="search"].zpro-brands-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.zpro-brands-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #71717a;
    pointer-events: none;
}

.zpro-brands-clear-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #71717a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.zpro-brands-clear-btn:hover {
    color: #18181b;
    background-color: #f4f4f5;
}

.zpro-brands-empty {
    margin-top: 24px;
    padding: 36px 20px;
    border-radius: 16px;
    border: 1px dashed #d4d4d8;
    background-color: #ffffff;
    text-align: center;
}

.zpro-bs-card.hidden,
.zpro-brands-item.hidden,
.zpro-brands-clear-btn.hidden,
.zpro-brands-empty.hidden {
    display: none !important;
}

.zpro-brands-reset {
    margin-top: 12px;
    min-block-size: 44px;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid #cc0000;
    background-color: #cc0000;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}

.zpro-brands-reset:hover {
    background-color: #b30000;
}

/* ==========================================================================
   /brands/<slug> Studio Brand Hero, Horizontal Category Rail & Toolbar
   ========================================================================== */
.zpro-brand-page-stack {
    min-width: 0;
    max-width: 100%;
}

.zpro-brand-hero-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 0;
}

.zpro-brand-hero-card + .space-y-5 {
    margin-top: 18px;
}

@media (min-width: 640px) {
    .zpro-brand-hero-card {
        padding: 24px 28px;
        margin-bottom: 0;
    }
}

.zpro-brand-hero-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
}

@media (min-width: 641px) {
    .zpro-brand-hero-inner {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
    }
}

.zpro-brand-hero-logo-stage {
    width: 168px;
    max-width: 100%;
    height: 86px;
    border-radius: 12px;
    background-color: #f6f7f8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    flex-shrink: 0;
    overflow: hidden;
}

@media (max-width: 640px) {
    .zpro-brand-hero-logo-stage {
        width: 152px;
        height: 76px;
        padding: 10px 14px;
    }
}

.zpro-brand-hero-logo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.zpro-brand-hero-body {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.zpro-brand-hero-title {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.18;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    overflow-wrap: break-word;
}

@media (min-width: 640px) {
    .zpro-brand-hero-title {
        font-size: 1.875rem;
    }
}

.zpro-brand-hero-meta {
    margin: 6px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    line-height: 1.4;
    font-weight: 600;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.zpro-brand-hero-meta-dot {
    color: #cbd5e1;
}

.zpro-brand-hero-desc {
    margin: 10px 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #475569;
    max-width: 52rem;
}

/* Studio Single-Row Visual Category Tile Strip (Option A) */
@property --zpro-rail-fade-start {
    syntax: "<length>";
    inherits: false;
    initial-value: 0px;
}

@property --zpro-rail-fade-end {
    syntax: "<length>";
    inherits: false;
    initial-value: 0px;
}

.zpro-brand-cat-strip-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 16px 0 18px;
}

.zpro-brand-cat-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: manipulation;
    scroll-padding-inline: 36px;
    --zpro-rail-fade-size: 36px;
    mask:
        linear-gradient(#000, #000) no-clip subtract,
        linear-gradient(to right, #000, transparent) 0 0 / var(--zpro-rail-fade-start) 100% no-repeat no-clip,
        linear-gradient(to left, #000, transparent) 100% 0 / var(--zpro-rail-fade-end) 100% no-repeat no-clip;
    -webkit-mask:
        linear-gradient(#000, #000) no-clip subtract,
        linear-gradient(to right, #000, transparent) 0 0 / var(--zpro-rail-fade-start) 100% no-repeat no-clip,
        linear-gradient(to left, #000, transparent) 100% 0 / var(--zpro-rail-fade-end) 100% no-repeat no-clip;
    transition: --zpro-rail-fade-start 160ms ease, --zpro-rail-fade-end 160ms ease;
}

@media (prefers-reduced-motion: no-preference) {
    .zpro-brand-cat-track {
        scroll-behavior: smooth;
    }
}

.zpro-brand-cat-track::-webkit-scrollbar {
    display: none;
}

.zpro-brand-cat-track.more-start {
    --zpro-rail-fade-start: var(--zpro-rail-fade-size);
}

.zpro-brand-cat-track.more-end {
    --zpro-rail-fade-end: var(--zpro-rail-fade-size);
}

.zpro-brand-cat-arrow {
    display: none;
}

@media (min-width: 768px) {
    .zpro-brand-cat-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 4;
        width: 36px;
        height: 36px;
        border-radius: 9999px;
        border: 1px solid #e2e8f0;
        background-color: rgba(255, 255, 255, 0.96);
        color: #0f172a;
        box-shadow: 0 6px 16px -4px rgba(15, 23, 42, 0.14), 0 2px 6px -2px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        touch-action: manipulation;
        transition: opacity 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease, visibility 150ms ease;
    }

    .zpro-brand-cat-arrow--prev {
        left: 6px;
    }

    .zpro-brand-cat-arrow--next {
        right: 6px;
    }

    .zpro-brand-cat-arrow svg {
        width: 17px;
        height: 17px;
    }

    .zpro-brand-cat-arrow:hover {
        border-color: #cbd5e1;
        color: #cc0000;
        box-shadow: 0 10px 22px -6px rgba(15, 23, 42, 0.2);
    }

    .zpro-brand-cat-arrow:active {
        transform: translateY(-50%) scale(0.95);
    }

    .zpro-brand-cat-arrow.is-hidden {
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }
}

.zpro-brand-cat-tile {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: 104px;
    min-height: 108px;
    padding: 8px;
    gap: 7px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

@media (min-width: 768px) {
    .zpro-brand-cat-tile {
        width: 126px;
        min-height: 116px;
    }
}

.zpro-brand-cat-tile:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -10px rgba(15, 23, 42, 0.16);
}

.zpro-brand-cat-tile:active {
    transform: scale(0.98);
}

.zpro-brand-cat-tile:focus-visible,
.zpro-brand-sort-select:focus-visible,
.zpro-brand-filter-btn:focus-visible {
    outline: 3px solid #cc0000;
    outline-offset: -3px;
}

.zpro-brand-cat-arrow:focus-visible {
    outline: 3px solid #cc0000;
    outline-offset: 2px;
}

.zpro-brand-cat-tile.is-active,
.zpro-brand-cat-tile[aria-current="true"] {
    border: 1.5px solid #cc0000;
    background-color: #fef2f2;
}

.zpro-brand-cat-tile.is-active:hover,
.zpro-brand-cat-tile[aria-current="true"]:hover {
    border-color: #b30000;
    background-color: #fef2f2;
}

.zpro-brand-cat-thumb {
    position: relative;
    width: 100%;
    height: 52px;
    border-radius: 8px;
    background-color: #f6f7f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .zpro-brand-cat-thumb {
        height: 58px;
    }
}

.zpro-brand-cat-tile.is-active .zpro-brand-cat-thumb {
    background-color: #ffffff;
}

.zpro-brand-cat-img {
    max-width: 86%;
    max-height: 86%;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.zpro-brand-cat-all-icon {
    width: 24px;
    height: 24px;
    color: #475569;
    flex-shrink: 0;
}

.zpro-brand-cat-tile.is-active .zpro-brand-cat-all-icon {
    color: #cc0000;
}

.zpro-brand-cat-fallback-icon {
    width: 22px;
    height: 22px;
    color: #94a3b8;
    flex-shrink: 0;
}

.zpro-brand-cat-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(255, 255, 255, 0.92);
    color: #334155;
    font-size: 10.5px;
    line-height: 1.25;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    pointer-events: none;
}

.zpro-brand-cat-tile.is-active .zpro-brand-cat-badge {
    background-color: #cc0000;
    border-color: #cc0000;
    color: #ffffff;
}

.zpro-brand-cat-label-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 11.5px;
    line-height: 1.28;
    min-height: 2.56em;
    flex: 1 1 auto;
}

.zpro-brand-cat-label {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    font-size: 11.5px;
    line-height: 1.28;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    overflow-wrap: break-word;
}

.zpro-brand-cat-tile.is-active .zpro-brand-cat-label {
    color: #cc0000;
    font-weight: 700;
}

/* Harmonized Brand Listing Toolbar */
.zpro-brand-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

@media (min-width: 768px) {
    .zpro-brand-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }
}

.zpro-brand-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.zpro-brand-sort-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.zpro-brand-sort-select {
    -webkit-appearance: none;
    appearance: none;
    height: 44px;
    min-height: 44px;
    padding: 0 36px 0 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #0f172a;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    max-width: 100%;
    text-overflow: ellipsis;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.zpro-brand-sort-select:hover {
    border-color: #cbd5e1;
}

.zpro-brand-sort-select:focus {
    outline: none;
    border-color: #cc0000;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

.zpro-brand-sort-chevron {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #64748b;
    pointer-events: none;
}

.zpro-brand-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 44px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #0f172a;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.zpro-brand-filter-btn:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.zpro-brand-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    background-color: #cc0000;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
    .zpro-brand-sort-select,
    .zpro-brand-filter-btn {
        height: 40px;
        min-height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zpro-brand-cat-track {
        scroll-behavior: auto !important;
    }

    .zpro-brand-cat-track,
    .zpro-brand-cat-arrow,
    .zpro-brand-cat-tile,
    .zpro-brand-sort-select,
    .zpro-brand-filter-btn {
        transition: none !important;
    }
}
