/* Jotado Product Filter v1.1 */

/* ── Base ─────────────────────────────────────────────────────────── */
.jpf-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13.5px;
    color: #2d2d2d;
}

/* ── Section ─────────────────────────────────────────────────────── */
.jpf-section {
    border-bottom: 1px solid #ebebeb;
}
.jpf-section:last-child { border-bottom: none; }

.jpf-section-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 2px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #1a1a1a;
    transition: color .15s;
    user-select: none;
}
.jpf-section-hd:hover { color: #c0392b; }

/* +/- icons */
.jpf-icon {
    width: 18px;
    height: 18px;
    position: relative;
    flex-shrink: 0;
}
.jpf-icon::before,
.jpf-icon::after {
    content: '';
    position: absolute;
    background: #888;
    border-radius: 2px;
    transition: background .15s;
}
.jpf-icon::before { width: 12px; height: 2px; top: 8px; left: 3px; }
.jpf-icon--plus::after { width: 2px; height: 12px; top: 3px; left: 8px; }
.jpf-section-hd:hover .jpf-icon::before,
.jpf-section-hd:hover .jpf-icon::after { background: #c0392b; }

.jpf-body { padding-bottom: 14px; }
.jpf-body.hidden { display: none; }

/* ── Category list ───────────────────────────────────────────────── */
.jpf-cat-list,
.jpf-sub { list-style: none; margin: 0; padding: 0; }
.jpf-sub { padding-left: 20px; margin-top: 4px; }
.jpf-sub.hidden { display: none; }
.jpf-cat-item { margin: 0; }

.jpf-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jpf-cat-link {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    text-decoration: none;
    color: #000;
    font-size: 13.5px;
    padding: 5px 0;
    transition: color .15s;
}
.jpf-cat-link:hover,
.jpf-cat-link.active { color: #c0392b; }

/* Radio dot */
.jpf-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #ccc;
    flex-shrink: 0;
    transition: all .15s;
    background: #fff;
    position: relative;
}
.jpf-dot.active,
.jpf-cat-link.active .jpf-dot {
    border-color: #c0392b;
    background: #c0392b;
    box-shadow: inset 0 0 0 3px #fff;
}

/* Expand button */
.jpf-expand {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    color: #000;
    font-size: 15px;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color .15s;
	margin:0;
}
.jpf-expand:hover { color: #c0392b; }
.jpf-expand span { font-style: normal; }
.jpf-expand::before { content: '+'; }
.jpf-expand.open::before { content: '−'; color: #555; }

/* ── Size buttons ────────────────────────────────────────────────── */
.jpf-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 4px;
}

.jpf-size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 5px 10px;
    border: 1.5px solid #ddd;
    border-radius: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: #444;
    text-decoration: none;
    background: #fff;
    letter-spacing: .02em;
    transition: all .15s;
    white-space: nowrap;
}
.jpf-size-btn:hover {
    border-color: #c0392b;
    color: #c0392b;
    background: #fff5f5;
}
.jpf-size-btn.active {
    border-color: #c0392b;
    background: #c0392b;
    color: #fff;
    box-shadow: 0 2px 8px rgba(192,57,43,.25);
}

/* ── Color swatches ──────────────────────────────────────────────── */
.jpf-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
}

.jpf-color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    outline: 2px solid transparent;
    outline-offset: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all .18s;
    position: relative;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    flex-shrink: 0;
}
.jpf-color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0,0,0,.22);
}
.jpf-color-swatch.active {
    outline-color: #c0392b;
    transform: scale(1.12);
}
/* Màu sáng thì outline đen */
.jpf-color-swatch.light.active { outline-color: #555; }

/* Check mark trong swatch */
.jpf-check {
    display: block;
    width: 8px;
    height: 13px;
    border: 2.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(40deg) translate(-1px, -2px);
    flex-shrink: 0;
}
.jpf-color-swatch.light .jpf-check { border-color: #333; }

/* Label màu đang chọn */
.jpf-active-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.jpf-active-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 3px 9px 3px 5px;
    font-size: 12px;
    color: #555;
}
.jpf-label-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.12);
    flex-shrink: 0;
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .jpf-wrap {
        background: #fff;
        border: 1px solid #ebebeb;
        border-radius: 10px;
        padding: 0 14px;
    }
}
