/* ===== Shop filters ===== */
.cropp-sf { font-family: var(--font, inherit); color: var(--ink, #121212); }
.cropp-sf *, .cropp-sf *::before, .cropp-sf *::after { box-sizing: border-box; }

/* Bar */
.cropp-sf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; }
.cropp-sf-open {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; cursor: pointer;
  border: 1px solid var(--line-strong, rgba(18,18,18,.55)); border-radius: 999px; background: var(--bg, #fff); color: var(--ink, #121212);
  font: inherit; font-size: 15px; font-weight: 600; transition: background .2s, color .2s;
}
.cropp-sf-open:hover { background: var(--btn, #121212); color: var(--btn-text, #fff); }
.cropp-sf-badge { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--btn, #121212); color: var(--btn-text, #fff); font-size: 12px; font-weight: 700; }
.cropp-sf-open:hover .cropp-sf-badge { background: var(--btn-text, #fff); color: var(--btn, #121212); }
.cropp-sf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cropp-sf-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.06); color: inherit; font-size: 13px; text-decoration: none; }
.cropp-sf-chip::after { content: "×"; font-size: 15px; line-height: 1; opacity: .6; }
.cropp-sf-chip:hover { background: rgba(0,0,0,.12); }
.cropp-sf-clearall { font-size: 13px; color: inherit; text-decoration: underline; }

/* Drawer */
.cropp-sf-overlay { position: fixed; inset: 0; z-index: 99998; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.cropp-sf-drawer {
  --dir: 1; position: fixed; top: 0; bottom: 0; z-index: 99999; width: min(var(--sf-w, 380px), 92vw); background: #fff; color: var(--ink, #121212);
  display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(0,0,0,.2); transition: transform .3s ease, visibility 0s linear .3s; visibility: hidden;
}
html[dir="rtl"] .cropp-sf-drawer { --dir: -1; }
.cropp-sf.side-start .cropp-sf-drawer { inset-inline-start: 0; transform: translateX(calc(-102% * var(--dir))); }
.cropp-sf.side-end .cropp-sf-drawer { inset-inline-end: 0; transform: translateX(calc(102% * var(--dir))); }
.cropp-sf.is-open .cropp-sf-overlay { opacity: 1; visibility: visible; }
.cropp-sf.is-open .cropp-sf-drawer { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }
html.cropp-sf-lock { overflow: hidden; }
.cropp-sf-drawer form { display: flex; flex-direction: column; height: 100%; margin: 0; }

.cropp-sf-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line, rgba(18,18,18,.2)); font-size: 18px; }
.cropp-sf-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.cropp-sf-close:hover { background: rgba(0,0,0,.07); }
.cropp-sf-body { flex: 1; overflow-y: auto; padding: 4px 20px 16px; overscroll-behavior: contain; }
.cropp-sf-foot { display: flex; align-items: center; gap: 14px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line, rgba(18,18,18,.2)); background: #fff; }
.cropp-sf-apply { flex: 1; height: 46px; border: 0; border-radius: var(--r, 6px); background: var(--btn, #121212); color: var(--btn-text, #fff); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.cropp-sf-apply:hover { opacity: .88; }
.cropp-sf-clear { font-size: 14px; color: inherit; text-decoration: underline; white-space: nowrap; }

/* Sections */
.cropp-sf-sec { border-bottom: 1px solid var(--line, rgba(18,18,18,.2)); padding: 4px 0 14px; }
.cropp-sf-sec summary { list-style: none; cursor: pointer; padding: 14px 0 10px; font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.cropp-sf-sec summary::-webkit-details-marker { display: none; }
.cropp-sf-sec summary::after { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; }
.cropp-sf-sec[open] summary::after { content: "\2212"; }

/* Checkbox rows */
.cropp-sf-list { display: grid; gap: 2px; max-height: 280px; overflow-y: auto; }
.cropp-sf-opt { display: flex; align-items: center; gap: 10px; padding: 7px 0; padding-inline-start: calc(var(--d, 0) * 18px); font-size: 14px; cursor: pointer; }
.cropp-sf-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--btn, #121212); flex: none; }
.cropp-sf-opt span { flex: 1; }
.cropp-sf-opt em { font-style: normal; font-size: 12px; opacity: .55; }

/* Price */
.cropp-sf-price { display: flex; align-items: center; gap: 10px; }
.cropp-sf-price i { font-style: normal; opacity: .5; }
.cropp-sf-price label { position: relative; flex: 1; display: block; }
.cropp-sf-price label span { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .6; pointer-events: none; }
.cropp-sf-price input { width: 100%; height: 44px; padding: 0 12px; padding-inline-start: 44px; border: 1px solid var(--line-strong, rgba(18,18,18,.55)); border-radius: var(--r, 6px); font: inherit; font-size: 14px; background: #fff; color: inherit; }

/* Pills / color swatches */
.cropp-sf-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cropp-sf-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--line-strong, rgba(18,18,18,.55)); border-radius: var(--pill, 40px); font-size: 14px; cursor: pointer; transition: background .15s, color .15s; }
.cropp-sf-pill input { position: absolute; opacity: 0; pointer-events: none; }
.cropp-sf-pill:hover { border-color: var(--ink, #121212); }
.cropp-sf-pill:has(input:checked) { background: var(--btn, #121212); color: var(--btn-text, #fff); border-color: var(--btn, #121212); }
.cropp-sf-pill:has(input:focus-visible) { outline: 2px solid var(--ink, #121212); outline-offset: 2px; }
.cropp-sf-pill input:checked ~ .cropp-sf-txt { font-weight: 700; }
.cropp-sf-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--sw, #ccc); border: 1px solid rgba(0,0,0,.25); flex: none; }
.cropp-sf-pills.is-circle .cropp-sf-pill.has-dot { padding: 0; width: 34px; height: 34px; justify-content: center; border-radius: 50%; border-color: rgba(0,0,0,.15); background: var(--sw, #ccc); }
.cropp-sf-pills.is-circle .cropp-sf-pill.has-dot .cropp-sf-dot, .cropp-sf-pills.is-circle .cropp-sf-pill.has-dot .cropp-sf-txt { display: none; }
.cropp-sf-pills.is-circle .cropp-sf-pill.has-dot:has(input:checked) { background: var(--sw, #ccc); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink, #121212); }
.cropp-sf-txt { line-height: 1.2; }

@media (prefers-reduced-motion: reduce) { .cropp-sf-drawer, .cropp-sf-overlay { transition: none; } }

/* ===== Side column layout ([cropp_shop] with "Side column" layout) ===== */
.cropp-shop-top > .cropp-sf-bar { flex: 1 1 auto; min-width: 0; }
.cropp-sf-main { min-width: 0; }
@media (min-width: 901px) {
  .cropp-sf.is-sidebar { display: grid; grid-template-columns: var(--sf-sw, 300px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .cropp-sf.is-sidebar.side-end .cropp-sf-drawer { order: 2; }
  .cropp-sf.is-sidebar.side-start .cropp-sf-drawer,
  .cropp-sf.is-sidebar.side-end .cropp-sf-drawer {
    position: sticky; top: 24px; inset: auto; width: auto; max-height: calc(100vh - 48px); transform: none; visibility: visible;
    background: transparent; box-shadow: none; border: 1px solid var(--line, rgba(18,18,18,.2)); border-radius: 14px; transition: none;
  }
  .cropp-sf.is-sidebar .cropp-sf-overlay, .cropp-sf.is-sidebar .cropp-sf-close, .cropp-sf.is-sidebar .cropp-sf-open { display: none; }
  .cropp-sf.is-sidebar .cropp-sf-head { padding: 14px 18px; }
  .cropp-sf.is-sidebar .cropp-sf-body { padding-inline: 18px; }
  .cropp-sf.is-sidebar .cropp-sf-foot { padding: 12px 18px; background: transparent; }
  .cropp-sf.is-sidebar .cropp-sf-bar { min-height: 0; }
  .cropp-sf.is-sidebar .cropp-sf-bar:not(:has(.cropp-sf-chips)) { display: none; }
}

/* ===== Mobile polish ===== */
@media (max-width: 900px) {
  .cropp-sf-bar { gap: 8px 10px; }
  .cropp-sf-chips { gap: 6px; }
  .cropp-sf-body { padding-inline: 16px; }
  .cropp-sf-head, .cropp-sf-foot { padding-inline: 16px; }
  .cropp-sf-opt { padding-block: 11px; }                 /* easier to tap */
  .cropp-sf-pill { padding: 10px 16px; }
  .cropp-sf-price input { font-size: 16px; }             /* 16px stops iPhones from zooming in */
  .cropp-sf-list { max-height: none; }
}
@media (max-width: 400px) {
  .cropp-sf-drawer { width: 100vw; }
}
