.shop-page {
  background: #ffffff;
}

.site-chrome {
  z-index: 1000;
}

.site-header {
  position: relative;
  z-index: 1000;
}

.collection-banner {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.collection-banner-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}

.collection-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.76), rgb(255 255 255 / 0.5)),
    linear-gradient(180deg, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.72));
}

.collection-banner-content {
  width: min(100% - 40px, 720px);
  margin: 0 auto;
  padding: 64px 0;
  text-align: center;
}

.collection-breadcrumb {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.collection-banner-content h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--ink);
}

.collection-banner-content p:last-child {
  max-width: 560px;
  margin: 18px auto 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: #565656;
}

.collection-toolbar {
  position: sticky;
  top: var(--header-height, 70px);
  top: var(--site-chrome-height, var(--header-height, 70px));
  z-index: 900;
  border-top: 1px solid #eeeeee;
  border-bottom: 1px solid #e7e7e7;
  background: #ffffff;
  backdrop-filter: blur(12px);
  transform: translate3d(0, 0, 0);
  transition:
    top 0.3s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: top, transform;
}

.collection-toolbar.is-header-hidden-sync,
.filter-bar.is-header-hidden-sync,
.shop-filter-container.is-header-hidden-sync {
  top: 0;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.collection-toolbar-inner {
  width: min(100%, var(--max-width));
  min-height: 64px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 48px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
}

.filter-toggle,
.sort-toggle,
.filter-chip,
.clear-filters,
.filter-close,
.sort-options button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filter-toggle span {
  position: relative;
  width: 17px;
  height: 12px;
  display: inline-block;
}

.filter-toggle span::before,
.filter-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 1px;
  background: currentColor;
}

.filter-toggle span::before {
  top: 2px;
}

.filter-toggle span::after {
  bottom: 2px;
}

.horizontal-filter-bar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.horizontal-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  color: #545454;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.filter-chip:hover,
.filter-chip:focus-visible,
.filter-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.sort-dropdown {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.sort-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sort-caret {
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.sort-dropdown.is-open .sort-caret {
  transform: translateY(2px) rotate(225deg);
}

.sort-options {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 218px;
  padding: 8px;
  border: 1px solid #e3e3e3;
  background: #ffffff;
  box-shadow: 0 18px 38px rgb(18 18 18 / 0.12);
}

.sort-options button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  text-align: left;
}

.sort-options button:hover,
.sort-options button:focus-visible,
.sort-options button[aria-selected="true"] {
  background: #f5f3ef;
}

.sort-options button[aria-selected="true"]::after {
  content: "";
  width: 6px;
  height: 10px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transform: rotate(45deg);
}

.shop-shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 46px clamp(18px, 3vw, 48px) 0;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: start;
  gap: clamp(30px, 4vw, 58px);
}

.shop-sidebar,
.filter-sidebar {
  align-self: start;
  position: sticky;
  top: calc(var(--header-height, 70px) + 60px);
  z-index: 800;
  height: fit-content;
}

.filter-panel {
  padding-right: 24px;
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.filter-panel-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filter-panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.filter-close {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
}

.filter-close span {
  position: relative;
  width: 16px;
  height: 16px;
}

.filter-close span::before,
.filter-close span::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 1px;
  background: var(--ink);
}

.filter-close span::before {
  transform: rotate(45deg);
}

.filter-close span::after {
  transform: rotate(-45deg);
}

.filter-group {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid #e6e6e6;
}

.filter-group legend {
  width: 100%;
  margin: 0;
  padding: 0;
}

.filter-group-toggle {
  width: 100%;
  min-height: 48px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.filter-group-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.filter-group-icon::before,
.filter-group-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 1px;
  background: var(--ink);
  transform: translateY(-50%);
  transition: opacity 160ms ease, transform 160ms ease;
}

.filter-group-icon::after {
  transform: translateY(-50%) rotate(90deg);
}

.filter-group-toggle[aria-expanded="true"] .filter-group-icon::after {
  opacity: 0;
  transform: translateY(-50%);
}

.filter-options {
  display: grid;
  gap: 2px;
  padding: 0 0 22px;
}

.filter-options[hidden] {
  display: none;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  color: #555555;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
}

.filter-option input {
  appearance: none;
  width: 15px;
  height: 15px;
  margin: 0;
  border: 1px solid #bdbdbd;
  border-radius: 0;
  background: #ffffff;
  display: grid;
  place-items: center;
}

.filter-option input::after {
  content: "";
  width: 5px;
  height: 8px;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  opacity: 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.filter-option input:checked {
  border-color: var(--ink);
  background: var(--ink);
}

.filter-option input:checked::after {
  opacity: 1;
}

.clear-filters {
  min-height: 24px;
  padding: 0 0 3px;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collection-results {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.collection-results-header {
  margin-bottom: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.result-count,
.product-count-badge {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.collection-product-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 18px;
}

.collection-product-grid .product-card {
  position: relative;
  z-index: 1;
}

.collection-product-grid .product-card.is-hidden {
  display: none;
}

.shop-grid-banner {
  position: relative;
  z-index: 1;
  grid-column: span 2;
  min-width: 0;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #eee9df;
}

.shop-grid-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(rgb(18 18 18 / 0.38), rgb(18 18 18 / 0.38)),
    radial-gradient(circle at center, rgb(18 18 18 / 0.18), rgb(18 18 18 / 0.05) 62%);
  pointer-events: none;
}

.shop-grid-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
}

.shop-grid-banner-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: min(100% - 44px, 360px);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
}

.shop-grid-banner-content p {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.shop-grid-banner-content h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
}

.shop-grid-banner-content span {
  display: block;
  margin-top: 10px;
  color: rgb(255 255 255 / 0.86);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
}

.pagination-controls {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pagination-controls[hidden] {
  display: none;
}

.pagination-controls button {
  width: 40px;
  height: 40px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pagination-controls button:hover,
.pagination-controls button:focus-visible {
  border-color: #1a1f2c;
}

.pagination-controls button.is-active {
  border-color: #1a1f2c;
  background: #1a1f2c;
  color: #ffffff;
}

.empty-results {
  margin: 64px 0 0;
  padding: 42px 20px;
  border: 1px solid #e5e5e5;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.closing-banner {
  position: relative;
  width: 100vw;
  height: 400px;
  margin-top: 80px;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.closing-banner-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
  filter: saturate(0.78) contrast(0.9) brightness(0.82);
}

.closing-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgb(18 18 18 / 0.25), rgb(18 18 18 / 0.25)),
    linear-gradient(90deg, rgb(18 18 18 / 0.14), rgb(18 18 18 / 0.04), rgb(18 18 18 / 0.14));
}

.closing-banner-content {
  width: min(100% - 40px, 680px);
  margin: 0 auto;
  text-align: center;
  color: #ffffff;
}

.closing-banner-content p:first-child {
  margin: 0 0 15px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffffff;
}

.closing-banner-content h2 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.closing-banner-content p:last-of-type {
  margin: 0 0 30px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: rgb(255 255 255 / 0.85);
}

.closing-banner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 36px;
  border: 1px solid #ffffff;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.closing-banner-cta:hover,
.closing-banner-cta:focus-visible {
  background: #ffffff;
  color: #121212;
}

@media (max-width: 1180px) {
  .collection-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .collection-banner {
    min-height: 320px;
  }

  .collection-toolbar-inner {
    min-height: auto;
    padding-top: 13px;
    padding-bottom: 13px;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "filters sort"
      "chips chips";
    gap: 12px 18px;
  }

  .filter-toggle {
    grid-area: filters;
    justify-self: start;
  }

  .horizontal-filter-bar {
    grid-area: chips;
    justify-content: flex-start;
  }

  .sort-dropdown {
    grid-area: sort;
  }

  .shop-shell {
    display: block;
    padding-top: 36px;
  }

  .shop-sidebar,
  .filter-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 930;
    width: min(86vw, 360px);
    height: auto;
    background: #ffffff;
    box-shadow: 18px 0 36px rgb(18 18 18 / 0.16);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .shop-sidebar.is-open,
  .filter-sidebar.is-open {
    transform: translateX(0);
  }

  .filter-panel {
    height: 100%;
    overflow-y: auto;
    padding: 26px 24px 34px;
  }

  .filter-close {
    display: grid;
  }

  .collection-results-header {
    align-items: flex-start;
  }

  .collection-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 14px;
  }

  body.has-filter-drawer::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 920;
    background: rgb(18 18 18 / 0.28);
  }
}

@media (max-width: 768px) {
  .closing-banner {
    height: 320px;
  }

  .closing-banner-content h2 {
    font-size: 26px;
  }

  .closing-banner-cta {
    padding: 10px 28px;
  }
}

@media (max-width: 560px) {
  .collection-banner-content {
    width: min(100% - 32px, 420px);
    padding: 52px 0;
  }

  .collection-banner-content h1 {
    font-size: 36px;
  }

  .collection-banner-content p:last-child {
    font-size: 13px;
  }

  .collection-results-header {
    display: block;
  }

  .result-count,
  .product-count-badge {
    margin-top: 16px;
  }

  .collection-product-grid {
    grid-template-columns: 1fr;
  }

  .shop-grid-banner {
    grid-column: 1 / -1;
  }

  .shop-grid-banner-content {
    width: min(100% - 36px, 300px);
  }

  .shop-grid-banner-content h3 {
    font-size: 22px;
  }

  .shop-grid-banner-content span {
    font-size: 11px;
  }

  .sort-options {
    right: -2px;
    width: min(78vw, 218px);
  }
}
