/* ============================================================
   CATEGORY SHOW PAGE  (csp-*)
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.csp-hero {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
    padding: 0;
    background: #0f172a;
    overflow: hidden;
}

.csp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--hero-img, none);
    background-size: cover;
    background-position: center;
    opacity: 0.45;
    transition: opacity 0.3s ease;
}

.csp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.85) 0%, rgba(15,23,42,0.3) 60%, transparent 100%);
}

.csp-hero-content {
    position: relative;
    z-index: 2;
    padding-top: 60px;
    padding-bottom: 36px;
    color: #fff;
}

.csp-breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.csp-breadcrumb li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.csp-breadcrumb li:not(:last-child)::after {
    content: '/';
    opacity: 0.4;
}

.csp-breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.15s;
}

.csp-breadcrumb a:hover { color: #fff; }

.csp-hero-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
    color: #fff;
    line-height: 1.15;
}

.csp-hero-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.72);
    margin: 0 0 12px;
    max-width: 520px;
    line-height: 1.55;
}

.csp-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.csp-dot { opacity: 0.4; }

@media (max-width: 767px) {
    .csp-hero          { min-height: 200px; }
    .csp-hero-title    { font-size: 26px; }
    .csp-hero-content  { padding-bottom: 24px; }
}

/* ── Subcategory chips ─────────────────────────────────────── */
.csp-chips-bar {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 30;
}

.csp-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.csp-chips::-webkit-scrollbar { display: none; }

.csp-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border: 1.5px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.csp-chip:hover {
    background: #e2e8f0;
    color: #0f172a;
    text-decoration: none;
}

.csp-chip--active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.csp-chip--active:hover {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

.csp-chip-count {
    font-size: 11px;
    opacity: 0.65;
}

/* ── Body layout ───────────────────────────────────────────── */
.csp-body {
    padding-top: 32px;
    padding-bottom: 60px;
}

.csp-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 991px) {
    .csp-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Filter panel ──────────────────────────────────────────── */
.csp-filters {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(15,23,42,0.06);
    overflow: hidden;
    position: sticky;
    top: 72px;
}

.csp-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.csp-filter-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.csp-clear-all {
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
    text-decoration: none;
}

.csp-clear-all:hover { text-decoration: underline; }

.csp-filter-group {
    border-bottom: 1px solid #f1f5f9;
}

.csp-filter-group:last-child { border-bottom: none; }

.csp-filter-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    text-align: left;
}

.csp-filter-group-toggle svg {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.csp-filter-group-toggle[aria-expanded="false"] svg {
    transform: rotate(-90deg);
}

.csp-filter-group-body {
    padding: 0 16px 14px;
}

/* Price inputs */
.csp-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.csp-price-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.csp-price-field label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.csp-price-sep {
    color: #cbd5e1;
    font-size: 18px;
    padding-top: 14px;
    flex-shrink: 0;
}

.csp-price-input {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s;
}

.csp-price-input:focus { border-color: #0f766e; }

.csp-price-apply {
    width: 100%;
    padding: 9px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s;
}

.csp-price-apply:hover { background: #0f766e; }

/* Brand checkboxes */
.csp-check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.csp-check-item {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.csp-check-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.csp-check-box {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.csp-check-item input:checked + .csp-check-box {
    background: #0f766e;
    border-color: #0f766e;
}

.csp-check-item input:checked + .csp-check-box::after {
    content: '';
    width: 8px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
    display: block;
}

.csp-check-label {
    font-size: 13px;
    color: #334155;
}

/* ── Mobile filter panel ───────────────────────────────────── */
@media (max-width: 991px) {
    .csp-filters {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        border-radius: 0;
        overflow-y: auto;
        z-index: 1055;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 32px rgba(15,23,42,0.15);
    }

    .csp-filters--open {
        transform: translateX(0);
    }
}

.csp-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    z-index: 1054;
}

.csp-overlay--show {
    display: block;
}

/* ── Toolbar ───────────────────────────────────────────────── */
.csp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.csp-count {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.csp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.csp-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.15s;
}

.csp-mobile-filter-btn:hover { background: #e2e8f0; }

@media (max-width: 991px) {
    .csp-mobile-filter-btn { display: inline-flex; }
}

.csp-sort-select {
    padding: 8px 32px 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.csp-sort-select:focus { border-color: #0f766e; }

/* ── Product grid ──────────────────────────────────────────── */
.csp-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1199px) {
    .csp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .csp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* swiper-slide reset inside grid */
.csp-grid-item,
.csp-grid-item .swiper-slide {
    width: auto !important;
    height: auto !important;
    flex-shrink: unset !important;
    display: block;
}

.csp-grid-item .pc-card { height: 100%; }

/* ── Empty state ───────────────────────────────────────────── */
.csp-empty {
    text-align: center;
    padding: 64px 24px;
    color: #94a3b8;
}

.csp-empty-icon {
    margin: 0 auto 16px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.csp-empty h3 { font-size: 18px; font-weight: 700; color: #0f172a; margin: 0 0 8px; }
.csp-empty p  { font-size: 14px; margin: 0 0 20px; }

.csp-reset-btn {
    display: inline-flex;
    padding: 10px 24px;
    background: #0f172a;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s;
}

.csp-reset-btn:hover { background: #0f766e; color: #fff; text-decoration: none; }

/* ── Pagination ────────────────────────────────────────────── */
.csp-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.csp-pager {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.csp-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    background: #f1f5f9;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border: 1.5px solid transparent;
}

.csp-pager-btn:hover { background: #e2e8f0; color: #0f172a; text-decoration: none; }

.csp-pager-btn--active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
    pointer-events: none;
}

.csp-pager-btn--disabled {
    opacity: 0.35;
    pointer-events: none;
}

.csp-pager-btn--dots {
    background: transparent;
    pointer-events: none;
    color: #94a3b8;
}
