/* =============================================================
   pages/category.css  —  Category / Shop Page Styles
   Loaded only on category pages via @push('styles')
   ============================================================= */

/* ── Breadcrumb ──────────────────────────────────────────────── */
.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--cl-text-3, #aaa);
    margin-bottom: 24px;
}

.page-breadcrumb a {
    color: var(--cl-text-3, #aaa);
    text-decoration: none;
    transition: color .15s;
}

.page-breadcrumb a:hover {
    color: var(--color-primary, var(--primary, #8f002b));
}

.page-breadcrumb .bc-sep {
    font-size: 10px;
}

.page-breadcrumb .bc-current {
    color: var(--color-primary, var(--primary, #8f002b));
    font-weight: 600;
}

/* ── Desktop Category Sidebar ──────────────────────────────── */
.cat-sidebar-wrap {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line, #e8e8e8);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white, #fff);
}

.cat-sidebar-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--line, #e8e8e8);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--cl-text-2, #888);
    flex-shrink: 0;
}

/* Arrow scroll buttons */
.cat-scroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 34px;
    background: #fff;
    border: none;
    border-bottom: 1px solid var(--line, #e8e8e8);
    cursor: pointer;
    color: var(--cl-text-2, #888);
    font-size: 14px;
    transition: background .15s, color .15s;
    flex-shrink: 0;
    z-index: 2;
}

.cat-scroll-btn:last-of-type {
    border-bottom: none;
    border-top: 1px solid var(--line, #e8e8e8);
}

.cat-scroll-btn:hover {
    background: var(--primary, #e53);
    color: #fff;
}

.cat-scroll-btn:disabled {
    opacity: .3;
    cursor: default;
    background: #fff;
    color: #ccc;
}

/* Scrollable body */
.cat-scroll-body {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 8px;
}

.cat-scroll-body::-webkit-scrollbar {
    display: none;
}

/* 2-column grid */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

/* Category card */
.cat-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1.5px solid var(--line, #e8e8e8);
    cursor: pointer;
    text-decoration: none;
    transition: border-color .2s, box-shadow .18s, background .18s;
    background: var(--white, #fff);
    overflow: hidden;
}

.cat-card:hover {
    border-color: var(--primary, #e53);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .07);
}

.cat-card.active {
    border-color: var(--primary, #e53);
    background: var(--primary, #e53);
}

.cat-card.active .cat-card-name {
    color: #fff;
}

.cat-card-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f5f5f5;
}

.cat-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.cat-card.active .cat-card-icon {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

.cat-card-name {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--cl-text, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Products column */
.products-col {
    min-width: 0;
}

/* Hide filter btn on desktop */
@media (min-width: 992px) {
    .tf-btn-filter {
        display: none !important;
    }
}

/* On mobile: sidebar hidden; mobile strip shown */
@media (max-width: 991.98px) {
    .desktop-cat-sidebar {
        display: none !important;
    }
}

/* ── Mobile Sticky Category Strip ────────────────────────────── */
.mobile-cat-strip {
    display: none;
}

@media (max-width: 991.98px) {
    .mobile-cat-strip {
        display: block;
        position: sticky;
        top: 0;
        z-index: 50;
        background: #fff;
        border-bottom: 1px solid var(--line, #e8e8e8);
        margin: 0 -12px 20px;
        padding: 10px 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    }

    .mobile-cat-scroll {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        cursor: grab;
        user-select: none;
    }

    .mobile-cat-scroll::-webkit-scrollbar {
        display: none;
    }

    .mobile-cat-scroll.dragging {
        cursor: grabbing;
    }

    /* Pill chip */
    .mob-cat-chip {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        scroll-snap-align: start;
        text-decoration: none;
        padding: 7px 14px 7px 8px;
        border-radius: 40px;
        border: 1.5px solid var(--line, #e8e8e8);
        background: #fff;
        transition: border-color .18s, background .18s;
    }

    .mob-cat-chip.active {
        border-color: var(--primary, #e53);
        background: var(--primary, #e53);
    }

    .mob-cat-chip.active .mob-cat-name {
        color: #fff;
    }

    .mob-cat-chip-img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
        background: #f5f5f5;
        flex-shrink: 0;
        pointer-events: none;
    }

    .mob-cat-chip-icon {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #f5f5f5;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        flex-shrink: 0;
    }

    .mob-cat-chip.active .mob-cat-chip-icon {
        background: rgba(255, 255, 255, .25);
        color: #fff;
    }

    .mob-cat-name {
        font-size: 11px;
        font-weight: 600;
        color: var(--cl-text, #1a1a1a);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Force 2-col grid, hide switcher */
    .tf-control-layout {
        display: none !important;
    }

    #gridLayout {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    #gridLayout.tf-col-2,
    #gridLayout.tf-col-3,
    #gridLayout.tf-col-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}