/* Filtros da lista de produtos da vitrine (preço, cor, quantidade, ordenação). */
.sf-cf-layout { --cf-brand: var(--brand, #2563eb); --cf-text: #0f172a; --cf-muted: #64748b; --cf-line: #e2e8f0; --cf-soft: #f1f5f9; }
.sf-cf-panel, .sf-cf-toolbar, .sf-cf-active, .sf-cf-empty { --cf-brand: var(--brand, #2563eb); --cf-text: #0f172a; --cf-muted: #64748b; --cf-line: #e2e8f0; --cf-soft: #f1f5f9; }
.sf-cf-panel [hidden], .sf-cf-toolbar [hidden], [data-sfcf-grid] > [hidden] { display: none !important; }

/* ---------- layout ---------- */
.sf-cf-layout { display: block; }
@media (min-width: 1024px) {
    .sf-cf-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 28px; align-items: start; }
    .sf-cf-layout [data-sfcf-grid] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .sf-cf-layout [data-sfcf-grid] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- barra de ferramentas ---------- */
.sf-cf-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sf-cf-total { margin: 0; font-size: 14px; color: var(--cf-muted); }
.sf-cf-total strong { color: var(--cf-text); font-weight: 700; }
.sf-cf-open { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--cf-line); border-radius: 999px; background: #fff; color: var(--cf-text); font-size: 14px; font-weight: 600; cursor: pointer; }
.sf-cf-open:hover { border-color: #cbd5e1; }
.sf-cf-badge { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 999px; background: var(--cf-brand); color: #fff; font-size: 11px; font-weight: 700; }
.sf-cf-sort { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; margin-left: auto; padding: 0 12px; border: 1px solid var(--cf-line); border-radius: 999px; background: #fff; color: var(--cf-muted); font-size: 13px; cursor: pointer; }
.sf-cf-sort:focus-within { border-color: var(--cf-brand); }
.sf-cf-sort select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; padding: 0 18px 0 0; color: var(--cf-text); font-size: 14px; font-weight: 600; cursor: pointer; outline: none;
    background-image: 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' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right center; }
@media (min-width: 1024px) {
    .sf-cf-open { display: none; }
}
@media (max-width: 1023.98px) {
    .sf-cf-toolbar { gap: 8px; }
    .sf-cf-total { order: 3; flex-basis: 100%; font-size: 13px; }
    .sf-cf-open { flex: 1 1 0; justify-content: center; }
    .sf-cf-sort { flex: 1 1 0; margin-left: 0; justify-content: center; }
    .sf-cf-sort-label { display: none; }
    .sf-cf-sort select { max-width: 100%; }
}

/* filtros ativos */
.sf-cf-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -2px 0 16px; }
.sf-cf-active[hidden] { display: none; }
.sf-cf-active ul { display: contents; list-style: none; margin: 0; padding: 0; }
.sf-cf-chip-active { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; border: 1px solid color-mix(in srgb, var(--cf-brand) 35%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--cf-brand) 8%, #fff); color: var(--cf-text); font-size: 13px; font-weight: 600; cursor: pointer; }
.sf-cf-chip-active svg { color: var(--cf-muted); }
.sf-cf-chip-active:hover svg { color: var(--cf-text); }
.sf-cf-clear-all { border: 0; background: none; padding: 4px 2px; color: var(--cf-brand); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- painel ---------- */
.sf-cf-panel { color: var(--cf-text); font-size: 14px; }
.sf-cf-panel-head, .sf-cf-panel-foot { display: none; }
.sf-cf-section { border-bottom: 1px solid var(--cf-line); }
.sf-cf-section:first-child { border-top: 1px solid var(--cf-line); }
.sf-cf-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 2px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.sf-cf-section > summary::-webkit-details-marker { display: none; }
.sf-cf-section > summary svg { color: var(--cf-muted); transition: transform .2s; }
.sf-cf-section[open] > summary svg { transform: rotate(180deg); }
.sf-cf-section-body { padding: 0 2px 16px; }
.sf-cf-options { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; }
.sf-cf-option, .sf-cf-color { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--cf-text); font-size: 14px; text-align: left; cursor: pointer; }
.sf-cf-option:hover, .sf-cf-color:hover { background: var(--cf-soft); }
.sf-cf-option-label { flex: 1 1 auto; min-width: 0; }
.sf-cf-count { color: #94a3b8; font-size: 12px; font-variant-numeric: tabular-nums; }
.sf-cf-option.is-empty, .sf-cf-color.is-empty { opacity: .45; }
.sf-cf-option[aria-pressed="true"], .sf-cf-color[aria-pressed="true"] { opacity: 1; font-weight: 700; }
.sf-cf-radio { flex: 0 0 auto; width: 18px; height: 18px; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; transition: border-color .15s, box-shadow .15s; }
.sf-cf-option[aria-pressed="true"] .sf-cf-radio { border-color: var(--cf-brand); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 10px var(--cf-brand); }

.sf-cf-price-form { display: flex; align-items: flex-end; gap: 6px; }
.sf-cf-price-form label { flex: 1 1 0; min-width: 0; display: grid; gap: 4px; font-size: 12px; color: var(--cf-muted); }
.sf-cf-money { display: flex; align-items: center; height: 38px; padding: 0 8px; border: 1px solid var(--cf-line); border-radius: 8px; background: #fff; }
.sf-cf-money:focus-within { border-color: var(--cf-brand); }
.sf-cf-money i { font-style: normal; color: #94a3b8; font-size: 12px; margin-right: 4px; }
.sf-cf-money input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--cf-text); font-size: 14px; -moz-appearance: textfield; }
.sf-cf-money input::-webkit-outer-spin-button, .sf-cf-money input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sf-cf-dash { padding-bottom: 10px; color: #94a3b8; }
.sf-cf-go { flex: 0 0 38px; height: 38px; border: 0; border-radius: 8px; background: var(--cf-brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

.sf-cf-colors { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sf-cf-swatch { position: relative; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--sw, #fff); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18); }
.sf-cf-swatch.is-unknown { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444); }
.sf-cf-color[aria-pressed="true"] .sf-cf-swatch { box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18), 0 0 0 2px #fff, 0 0 0 4px var(--cf-brand); }
.sf-cf-more { margin-top: 6px; border: 0; background: none; padding: 4px 8px; color: var(--cf-brand); font-size: 13px; font-weight: 600; cursor: pointer; }

.sf-cf-hint { margin: 0 0 10px; color: var(--cf-muted); font-size: 12.5px; line-height: 1.45; }
.sf-cf-stepper { display: flex; align-items: center; height: 42px; border: 1px solid var(--cf-line); border-radius: 10px; background: #fff; overflow: hidden; }
.sf-cf-stepper:focus-within { border-color: var(--cf-brand); }
.sf-cf-stepper button { flex: 0 0 42px; height: 100%; border: 0; background: none; color: var(--cf-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sf-cf-stepper button:hover { background: var(--cf-soft); }
.sf-cf-stepper input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: none; text-align: center; font-size: 15px; font-weight: 700; color: var(--cf-text); -moz-appearance: textfield; }
.sf-cf-stepper input::-webkit-outer-spin-button, .sf-cf-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sf-cf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sf-cf-chip { height: 32px; padding: 0 12px; border: 1px solid var(--cf-line); border-radius: 999px; background: #fff; color: var(--cf-text); font-size: 13px; font-weight: 600; cursor: pointer; }
.sf-cf-chip:hover { border-color: #cbd5e1; }
.sf-cf-chip[aria-pressed="true"] { border-color: var(--cf-brand); background: var(--cf-brand); color: #fff; }

.sf-cf-panel button:focus-visible, .sf-cf-panel summary:focus-visible, .sf-cf-toolbar button:focus-visible, .sf-cf-sort:focus-visible, .sf-cf-active button:focus-visible { outline: 2px solid var(--cf-brand); outline-offset: 2px; }

/* botões do rodapé e estado vazio */
.sf-cf-btn-primary { height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--cf-brand); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.sf-cf-btn-ghost { height: 44px; padding: 0 18px; border: 1px solid var(--cf-line); border-radius: 999px; background: #fff; color: var(--cf-text); font-size: 14px; font-weight: 600; cursor: pointer; }
.sf-cf-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 56px 16px; border: 1px dashed var(--cf-line); border-radius: 16px; background: #fff; text-align: center; color: var(--cf-muted); font-size: 14px; }
.sf-cf-empty[hidden] { display: none; }
.sf-cf-empty svg { color: #cbd5e1; }
.sf-cf-empty strong { color: var(--cf-text); font-size: 16px; }
.sf-cf-empty .sf-cf-btn-primary { margin-top: 8px; }

/* preço por quantidade no card */
.sf-cf-qty-priced [data-sfcf-label] { color: var(--brand, #2563eb) !important; }

/* ---------- gaveta (celular e tablet) ---------- */
.sf-cf-backdrop { position: fixed; inset: 0; z-index: 10000; background: rgba(15, 23, 42, .45); }
.sf-cf-backdrop[hidden] { display: none; }
html.sf-cf-locked, html.sf-cf-locked body { overflow: hidden; }
@media (max-width: 1023.98px) {
    .sf-cf-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10001; display: flex; flex-direction: column; max-height: 88dvh; max-height: 88vh; background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(15, 23, 42, .18);
        transform: translateY(100%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .28s; }
    @supports (height: 100dvh) { .sf-cf-panel { max-height: 88dvh; } }
    .sf-cf-panel.is-open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
    .sf-cf-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--cf-line); font-size: 17px; }
    .sf-cf-panel-head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 99px; background: #cbd5e1; }
    .sf-cf-icon-btn { width: 40px; height: 40px; margin-right: -8px; border: 0; border-radius: 50%; background: none; color: var(--cf-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .sf-cf-panel-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px; -webkit-overflow-scrolling: touch; }
    .sf-cf-section:first-child { border-top: 0; }
    .sf-cf-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 6px; }
    .sf-cf-panel-foot { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--cf-line); background: #fff; }
    .sf-cf-panel-foot .sf-cf-btn-ghost { flex: 0 0 auto; }
    .sf-cf-panel-foot .sf-cf-btn-primary { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .sf-cf-panel, .sf-cf-panel.is-open, .sf-cf-section > summary svg { transition: none; }
}

/* ---------- tema Go Store ---------- */
.go-catalog-sidebar .sf-cf-panel { margin-top: 18px; }
.go-catalog-sidebar .sf-cf-section > summary { font-size: 14px; text-transform: uppercase; letter-spacing: .02em; }
.go-catalog .sf-cf-toolbar { margin-bottom: 18px; }
@media (max-width: 1023.98px) { .go-catalog-sidebar .sf-cf-panel { margin-top: 0; } }
