Back to CSS Sidebar Layouts Sticky Filter Sidebar Pure CSS
Share
.sb-stk {
  display: grid; grid-template-columns: 240px 1fr;
  min-height: 480px;
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  background: #f6efe1;
  color: #3c2818;
  border-radius: 0;
  overflow: hidden;
  accent-color: #b8924a;
  border: 1px solid #b8924a;
}
.sb-stk-side {
  position: sticky; top: 0; align-self: start;
  min-height: 480px; padding: 22px 18px;
  background: #ede2cb;
  border-right: 1px solid #b8924a;
  font-size: 13px;
}
.sb-stk-side header { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid #b8924a; margin-bottom: 12px; }
.sb-stk-tag { font-family: 'Inter', sans-serif; font-size: 9.5px; font-weight: 800; letter-spacing: 0.22em; color: #b8924a; text-transform: uppercase; align-self: end; }
.sb-stk-side h3 { grid-column: 1 / -1; margin: 0; font-size: 26px; font-weight: 500; font-style: italic; color: #3c2818; letter-spacing: -0.01em; line-height: 1; }
.sb-stk-clear { font-family: 'Inter', sans-serif; font-size: 10.5px; font-style: italic; color: #b8924a; cursor: pointer; align-self: end; text-decoration: underline; text-underline-offset: 3px; }
.sb-stk-side details { padding: 12px 0; border-bottom: 1px solid #d4c39c; }
.sb-stk-side details:last-of-type { border-bottom: 0; }
.sb-stk-side summary { cursor: pointer; padding: 4px 0; font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #3c2818; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.sb-stk-side summary::-webkit-details-marker { display: none; }
.sb-stk-side summary em { font-family: 'Cormorant Garamond', serif; font-size: 12px; font-style: italic; font-weight: 500; color: #b8924a; letter-spacing: 0; text-transform: none; }
.sb-stk-side summary::after { content: '+'; font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 400; color: #b8924a; margin-left: 8px; transition: transform 0.2s; }
.sb-stk-side details[open] summary::after { content: '−'; }
.sb-stk-side ul { list-style: none; margin: 10px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sb-stk-side label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; color: #5a4030; cursor: pointer; font-family: 'Cormorant Garamond', serif; font-size: 14.5px; font-weight: 500; }
.sb-stk-side label b { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600; color: #b8924a; letter-spacing: 0.04em; }
.sb-stk-side input[type="checkbox"] { appearance: none; width: 14px; height: 14px; border: 1px solid #b8924a; background: transparent; cursor: pointer; flex-shrink: 0; transition: background 0.14s; position: relative; }
.sb-stk-side input[type="checkbox"]:checked { background: #b8924a; }
.sb-stk-side input[type="checkbox"]:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #f6efe1; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sb-stk-side input[type="checkbox"]:focus-visible { outline: 2px solid #b8924a; outline-offset: 2px; }
.sb-stk-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; }
.sb-stk-chips label { position: relative; cursor: pointer; display: inline-flex; }
.sb-stk-chips input { position: absolute; width: 1px; height: 1px; opacity: 0; clip: rect(0 0 0 0); }
.sb-stk-chips input:focus-visible + span { outline: 2px solid #b8924a; outline-offset: 2px; }
.sb-stk-chips span {
  display: inline-block; padding: 6px 12px;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em;
  background: transparent; color: #3c2818;
  border: 1px solid #b8924a;
  transition: background 0.14s, color 0.14s;
}
.sb-stk-chips input:checked + span { background: #3c2818; color: #f6efe1; border-color: #3c2818; }
.sb-stk-main { padding: 32px 36px; background: #faf3e3; }
.sb-stk-mhead { padding-bottom: 16px; border-bottom: 1px solid #d4c39c; margin-bottom: 22px; }
.sb-stk-eye { font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: 0.22em; color: #b8924a; text-transform: uppercase; }
.sb-stk-main h2 { margin: 4px 0 6px; font-size: clamp(36px, 5vw, 56px); font-weight: 500; color: #3c2818; letter-spacing: -0.02em; line-height: 1; font-style: italic; }
.sb-stk-main p { margin: 0; font-family: 'Inter', sans-serif; font-size: 11.5px; color: #6a4d35; letter-spacing: 0.04em; }
.sb-stk-main p strong { color: #3c2818; font-weight: 700; }
.sb-stk-main p em { color: #b8924a; font-style: italic; font-weight: 600; }
.sb-stk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sb-stk-tile { position: relative; aspect-ratio: 3/4; background: linear-gradient(160deg, #ede2cb 0%, #d8c8a8 100%); border: 1px solid #d4c39c; }
.sb-stk-tile::after { content: ''; position: absolute; inset: 8px; border: 1px dashed rgba(184,146,74,0.4); }
.sb-stk-num { position: absolute; bottom: 14px; right: 14px; font-family: 'Inter', sans-serif; font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; color: #b8924a; }
@media (max-width: 720px) {
  .sb-stk { grid-template-columns: 1fr; }
  .sb-stk-side { position: static; min-height: auto; border-right: 0; border-bottom: 1px solid #b8924a; }
  .sb-stk-grid { grid-template-columns: repeat(2, 1fr); }
}
<div class="sb-stk">
  <aside class="sb-stk-side" aria-label="Filters">
    <header>
      <span class="sb-stk-tag">Refine</span>
      <h3>Filters</h3>
      <span class="sb-stk-clear">Clear all</span>
    </header>
    <details open>
      <summary>Category <em>4</em></summary>
      <ul>
        <li><label><input type="checkbox" name="cat" /> <span>Tops</span><b>148</b></label></li>
        <li><label><input type="checkbox" name="cat" checked /> <span>Knitwear</span><b>62</b></label></li>
        <li><label><input type="checkbox" name="cat" /> <span>Outerwear</span><b>94</b></label></li>
        <li><label><input type="checkbox" name="cat" /> <span>Trousers</span><b>76</b></label></li>
      </ul>
    </details>
    <details open>
      <summary>Size <em>5</em></summary>
      <div class="sb-stk-chips">
        <label><input type="radio" name="sz" /><span>XS</span></label>
        <label><input type="radio" name="sz" /><span>S</span></label>
        <label><input type="radio" name="sz" checked /><span>M</span></label>
        <label><input type="radio" name="sz" /><span>L</span></label>
        <label><input type="radio" name="sz" /><span>XL</span></label>
      </div>
    </details>
    <details>
      <summary>Material</summary>
      <ul>
        <li><label><input type="checkbox" name="mt" /> <span>Cashmere</span><b>18</b></label></li>
        <li><label><input type="checkbox" name="mt" /> <span>Merino wool</span><b>34</b></label></li>
        <li><label><input type="checkbox" name="mt" /> <span>Cotton</span><b>52</b></label></li>
        <li><label><input type="checkbox" name="mt" /> <span>Linen</span><b>21</b></label></li>
      </ul>
    </details>
    <details>
      <summary>Price</summary>
      <ul>
        <li><label><input type="checkbox" name="pr" /> <span>Under $200</span></label></li>
        <li><label><input type="checkbox" name="pr" /> <span>$200 – $400</span></label></li>
        <li><label><input type="checkbox" name="pr" /> <span>$400 – $800</span></label></li>
        <li><label><input type="checkbox" name="pr" /> <span>$800+</span></label></li>
      </ul>
    </details>
  </aside>
  <main class="sb-stk-main">
    <header class="sb-stk-mhead">
      <span class="sb-stk-eye">FW · 26 Collection</span>
      <h2>Knitwear.</h2>
      <p><strong>238</strong> pieces · Sorted by <em>Newest</em></p>
    </header>
    <div class="sb-stk-grid" aria-label="Product grid">
      <article class="sb-stk-tile"><span class="sb-stk-num">01</span></article>
      <article class="sb-stk-tile"><span class="sb-stk-num">02</span></article>
      <article class="sb-stk-tile"><span class="sb-stk-num">03</span></article>
      <article class="sb-stk-tile"><span class="sb-stk-num">04</span></article>
      <article class="sb-stk-tile"><span class="sb-stk-num">05</span></article>
      <article class="sb-stk-tile"><span class="sb-stk-num">06</span></article>
    </div>
  </main>
</div>
Live preview Edit any tab — preview updates live Ready