/* Shop catalogue page */

.shop-head { padding: 30px 0 22px; }
.shop-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--spruce); margin-bottom: 6px; }
.shop-eyebrow[hidden], .filter-chips[hidden] { display: none; }

.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.f-chip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  background: var(--paper); border-radius: 10px; padding: 4px 12px; font-size: 13px; font-weight: 500;
  transition: border-color .16s ease-out, color .16s ease-out;
}
.f-chip:hover { border-color: var(--sale); color: var(--sale); }
.f-chip svg { flex: none; }
.f-clear { font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.f-clear:hover { color: var(--spruce); }

.shop-layout {
  display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 36px;
  align-items: start; padding-bottom: 16px;
}

/* filter rail */
.shop-rail { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding-right: 6px; }
.f-block { padding: 16px 0 18px; border-top: 1px solid var(--line); }
.shop-rail .f-block:first-child, .sheet-body .f-block:first-child { border-top: 0; padding-top: 4px; }
.f-block h4 { font-size: 13px; font-weight: 700; letter-spacing: .02em; margin-bottom: 8px; }
.f-link { display: block; padding: 5px 0; font-size: 14px; color: var(--ink-2); transition: color .16s ease-out; }
.f-link:hover { color: var(--spruce); }
.f-link.active { color: var(--spruce); font-weight: 600; }
.f-pet-name { font-size: 13px; font-weight: 700; color: var(--ink); margin: 14px 0 2px; }
.f-group { margin-top: 10px; }
.f-group h5 { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; margin-bottom: 2px; }
.f-check { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.f-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--spruce); flex: none; }
.f-check:hover span { color: var(--spruce); }

/* toolbar */
.shop-toolbar { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; }
.filter-open { display: none; }
.result-count { font-size: 14px; margin-right: auto; min-height: 1.5em; }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.sort select { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 8px 12px; font-size: 14px; }
.sort select:focus { outline: none; border-color: var(--spruce); }

/* grid density inside the railed layout */
.shop-content .grid-products { grid-template-columns: repeat(4, 1fr); }

.page-gap { color: var(--ink-2); padding: 0 2px; }

/* filter sheet (mobile) */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(34, 39, 31, .45);
  opacity: 0; pointer-events: none; transition: opacity .2s ease-out;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; background: var(--paper);
  border-radius: var(--r) var(--r) 0 0; box-shadow: var(--shadow);
  transform: translateY(102%); transition: transform .24s ease-out;
  max-height: 84vh; display: flex; flex-direction: column;
}
body.sheet-open { overflow: hidden; }
body.sheet-open .sheet { transform: none; }
body.sheet-open .sheet-scrim { opacity: 1; pointer-events: auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; }
.sheet-close { padding: 6px; color: var(--ink-2); }
.sheet-close:hover { color: var(--ink); }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 20px 8px; }
.sheet-foot { border-top: 1px solid var(--line); padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); }

@media (min-width: 901px) {
  .sheet, .sheet-scrim { display: none; }
}

@media (max-width: 1100px) {
  .shop-layout { grid-template-columns: 208px minmax(0, 1fr); gap: 28px; }
  .shop-content .grid-products { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .shop-layout { display: block; }
  .shop-rail { display: none; }
  .filter-open { display: inline-flex; }
  .shop-head { padding: 22px 0 16px; }
}

@media (max-width: 640px) {
  .shop-content .grid-products { grid-template-columns: repeat(2, 1fr); }
  .shop-toolbar { flex-wrap: wrap; row-gap: 8px; }
  .result-count { order: 3; flex-basis: 100%; margin-right: 0; min-height: 0; }
  .sort { margin-left: auto; }
}
