/* =============================================
   PAGINATION — pagi-*
   ============================================= */

.pagi-nav {
    display: flex;
    justify-content: center;
    padding: 10px 0 0;
}

.pagi-list {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

/* Base link / span */
.pagi-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
    cursor: pointer;
    user-select: none;
    line-height: 1;
}

.pagi-link:hover {
    background: #f0f4ff;
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    box-shadow: 0 2px 8px rgba(79, 126, 248, 0.12);
    text-decoration: none;
}

/* Active — trang hiện tại */
.pagi-item.pagi-active .pagi-link {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(79, 126, 248, 0.28);
    cursor: default;
    pointer-events: none;
}

/* Disabled — trang đầu / cuối */
.pagi-item.pagi-disabled .pagi-link {
    background: #f5f5f5;
    border-color: #e8e8e8;
    color: #c0c0c0;
    cursor: not-allowed;
    pointer-events: none;
}

/* Mũi tên prev / next */
.pagi-link.pagi-arrow {
    font-size: 17px;
    font-weight: 700;
    min-width: 42px;
}

/* Dấu "..." */
.pagi-link.pagi-dots {
    border-color: transparent;
    background: transparent;
    color: #999;
    cursor: default;
    pointer-events: none;
    letter-spacing: 2px;
    min-width: 28px;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 576px) {
    .pagi-link {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 7px;
        border-radius: 6px;
    }

    .pagi-link.pagi-arrow {
        min-width: 36px;
    }

    .pagi-list {
        gap: 4px;
    }
}

/* =============================================
   SORT SELECT — <select> override
   ============================================= */

select.sort-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 6px 32px 6px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23888'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    min-width: 130px;
}

select.sort-select:hover,
select.sort-select:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(79, 126, 248, 0.10);
    color: var(--color-secondary);
}

@media (max-width: 480px) {
    select.sort-select {
        font-size: 12px;
        padding: 5px 28px 5px 10px;
        min-width: 110px;
    }
}

/* =============================================
   BRAND TABS — sub-category filter links
   ============================================= */

.brand-tabs-wrap {
    margin: 14px 0 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.brand-tabs-wrap::-webkit-scrollbar {
    display: none;
}

.brand-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.brand-tab {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1.5px solid #ddd;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    background: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    cursor: pointer;
}

.brand-tab:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    text-decoration: none;
}

.brand-tab.active {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #fff;
    font-weight: 600;
    pointer-events: none;
}

/* =============================================
   PRODUCT TOOLBAR — count + sort
   ============================================= */

.product-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 16px;
    padding: 10px 14px;
    background: #f8f9fc;
    border-radius: 8px;
    border: 1px solid #eee;
}

.product-count {
    font-size: 13px;
    color: #666;
}

.product-count strong {
    color: #222;
    font-weight: 700;
}

@media (max-width: 480px) {
    .brand-tabs {
        flex-wrap: nowrap;
    }

    .product-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

}
