/* Core layout */
.swf-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.swf-sidebar { position: sticky; top: 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.swf-section + .swf-section { margin-top: 16px; }
.swf-section-title { margin: 0 0 8px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #374151; }
.swf-section-title-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.swf-toggle-all { border:1px solid #e5e7eb; background:#fff; border-radius:8px; padding:6px 10px; cursor:pointer; font-size:12px; }

.swf-controls-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.swf-btn { width: 100%; border: 1px solid #111827; background: #111827; color: #fff; padding: 8px 10px; border-radius: 8px; cursor: pointer; }

.swf-price { display: flex; align-items: center; gap: 8px; }
.swf-price input[type="number"] { width: 100%; padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 8px; }
.swf-sep { color: #6b7280; }

.swf-stars { display: flex; align-items: center; gap: 6px; }
.swf-star, .swf-star-clear { border: 1px solid #e5e7eb; border-radius: 6px; padding: 4px 6px; cursor: pointer; background: #fff; }
.swf-star.is-active { color: #ffcb08; border-color: #ffcb08; background: #fff8db; }

.swf-inline { display: inline-flex; align-items: center; gap: 8px; }

/* Accordion */
.swf-acc { border:1px solid #eef0f2; border-radius:10px; margin:8px 0; overflow:hidden; }
.swf-acc-header { width:100%; text-align:left; display:flex; align-items:center; gap:8px; padding:8px 10px; background:#fff; border:none; cursor:pointer; font-weight:700; color:#111827; border-bottom:1px solid #eef0f2; }
.swf-caret { display:inline-block; width:12px; text-align:center; font-size:12px; transform-origin:center; }
.swf-acc.is-open .swf-caret { transform: rotate(0deg); }
.swf-acc:not(.is-open) .swf-caret { transform: rotate(-90deg); }
.swf-acc-panel { padding:8px 12px 12px; display:block; }
.swf-acc:not(.is-open) .swf-acc-panel { display:none; }

/* Categories list */
.swf-checklist { list-style:none; margin:0; padding:0; display:grid; grid-template-columns: 1fr; gap:8px; }
.swf-indent { padding-left: 14px; }
.swf-cat-label { display:flex; align-items:center; gap:8px; cursor:pointer; }
.swf-cat-label.is-active .swf-cat-text { font-weight:700; color:#111827; }

/* Chips */
.swf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.swf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: #f3f4f6; border: 1px solid #0066cc; font-size: 13px; }
.swf-chip .swf-x { cursor: pointer; font-weight: 700; color: #0066cc; }
.swf-chip .swf-x:hover { color: #ffcb08; }

/* Grid */
.swf-main { min-width: 0; }
.swf-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.swf-sort select { padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 8px; }

.swf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.swf-card { background: #fff; border: 1px solid #e6e8eb; border-radius: 12px; padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .2s ease; }
.swf-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.swf-thumb img { width: 100%; height: auto; display: block; border-radius: 10px; }
.swf-title { font-size: 15px; margin: 6px 0 2px; }
.swf-card .swf-price { width:100%; text-align:right; font-weight:700; }
.swf-actions { margin-top: auto; }
.swf-actions .add_to_cart_button { width:100%; text-align:center; display:inline-block; padding:10px 12px; border-radius:10px; }
.swf-actions .add_to_cart_button.button { border: 1px solid #d1d5db; background: #fff; }
.swf-actions .add_to_cart_button.button:hover { background:#111827; color:#fff; border-color:#111827; }

/* Pagination: 10 numbers + Prev/Next */
.swf-pagination { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.swf-page, .swf-prev, .swf-next { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid #e5e7eb; border-radius: 8px; text-decoration: none; cursor: pointer; background: #fff; }
.swf-page.is-active { background: #111827; color: #fff; border-color: #111827; }

/* Shop page compatibility */
.woocommerce .swf-wrap { display: grid !important; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.woocommerce .swf-sidebar { position: sticky; top: 16px; }
.woocommerce .swf-main { min-width: 0; }
.woocommerce .swf-wrap ~ .woocommerce-result-count,
.woocommerce .swf-wrap ~ form.woocommerce-ordering,
.woocommerce .swf-wrap ~ .storefront-sorting,
.woocommerce .swf-wrap ~ .products,
.woocommerce .swf-wrap ~ nav.woocommerce-pagination,
.woocommerce .swf-wrap ~ .woocommerce-pagination { display: none !important; }

@media (max-width: 1024px) { .swf-wrap { grid-template-columns: 1fr; } .swf-sidebar { position: relative; top: auto; } .swf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .swf-grid { grid-template-columns: 1fr; } }
