.collection-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.filter-sidebar {
  position: sticky;
  top: 22px;
  display: flex;
  flex-direction: column;
  gap: 19px;
  padding: 20px 18px;
  background: var(--white);
  border: 1px solid var(--line);
}

.filter-header,
.collection-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.filter-header strong {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1;
}

.reset-filters {
  color: var(--muted);
  font-size: 9px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.filter-sidebar > label,
.price-filter > span {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.catalog-filter,
.sort-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--cream);
  color: var(--ink);
  padding: 9px 8px;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}

.price-filter > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.price-filter label {
  color: var(--muted);
  font-size: 9px;
  text-transform: none;
  letter-spacing: 0;
}

.price-filter input {
  width: 100%;
  margin-top: 4px;
  padding: 8px 5px;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
}

.filter-note {
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--clay);
  font-size: 9px;
  line-height: 1.4;
}

.collection-results {
  min-width: 0;
}

.collection-toolbar {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 11px;
}

.sort-select {
  width: auto;
  min-width: 150px;
}

.load-more {
  display: flex;
  margin: 36px auto 0;
}

.collection-story-break {
  grid-column: 1 / -1;
  position: relative;
  min-height: 225px;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  grid-template-rows: auto 1fr auto;
  column-gap: 45px;
  align-items: center;
  overflow: hidden;
  margin: 12px 0 20px;
  padding: 34px 42px;
  background: var(--ink);
  color: var(--white);
}

.collection-story-break::before,
.collection-story-break::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  pointer-events: none;
}

.collection-story-break::before {
  width: 270px;
  height: 270px;
  right: 7%;
  top: -145px;
}

.collection-story-break::after {
  width: 180px;
  height: 180px;
  right: 16%;
  bottom: -105px;
}

.collection-story-break .eyebrow {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  color: #e0a18a;
}

.collection-story-break h3 {
  grid-column: 1;
  grid-row: 2 / 4;
  z-index: 1;
  align-self: center;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.03em;
}

.collection-story-break > p:not(.eyebrow) {
  grid-column: 2;
  grid-row: 1 / 3;
  z-index: 1;
  align-self: end;
  max-width: 420px;
  margin: 0 0 16px;
  color: rgba(255,255,255,.75);
  font-size: 14px;
}

.collection-story-break .text-link {
  grid-column: 2;
  grid-row: 3;
  z-index: 1;
  justify-self: start;
  color: var(--white);
  border-color: rgba(255,255,255,.65);
}

.story-break-1 {
  background: #9d6b5c;
}

.story-break-2 {
  background: #c18b72;
}

.product-image {
  isolation: isolate;
}

.product-image img.product-image-main,
.product-image img.product-image-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .35s ease, transform .6s ease;
}

.product-image img.product-image-hover {
  opacity: 0;
}

.product-card:hover .product-image img.product-image-main,
.product-card:focus-within .product-image img.product-image-main {
  opacity: 0;
}

.product-card:hover .product-image img.product-image-hover,
.product-card:focus-within .product-image img.product-image-hover {
  opacity: 1;
  transform: scale(1.05);
}

.image-count {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  color: var(--white);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}

.modal-gallery {
  min-width: 0;
  background: #e5ddd1;
}

.modal-product-copy #modal-product-name {
  font-size: clamp(29px, 3vw, 42px);
  line-height: .98;
}

.modal-main-image {
  position: relative;
  height: 470px;
}

.modal-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(247,244,239,.88);
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
}

.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }

.modal-thumbnails {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px;
}

.gallery-thumb {
  flex: 0 0 55px;
  height: 55px;
  padding: 0;
  border: 1px solid transparent;
  overflow: hidden;
  opacity: .65;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: var(--clay);
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-progress {
  padding: 15px 0 4px;
}

.cart-progress-message {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.cart-progress-track {
  height: 4px;
  background: var(--sand);
}

.cart-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--clay);
  transition: width .3s ease;
}

.cart-recommendations {
  border-top: 1px solid var(--line);
  padding: 15px 0;
}

.recommendation-label {
  margin: 0 0 9px;
  color: var(--clay);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cart-recommendation {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 6px 0;
}

.cart-recommendation img {
  width: 45px;
  height: 50px;
  object-fit: cover;
}

.cart-recommendation strong,
.cart-recommendation span {
  display: block;
}

.cart-recommendation strong {
  overflow: hidden;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-recommendation span {
  color: var(--muted);
  font-size: 10px;
}

.cart-recommendation button {
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
}

.payment-methods {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 13px;
}

.payment-methods span {
  padding: 5px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.back-to-top {
  position: fixed;
  z-index: 8;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 43px;
  height: 43px;
  padding-top: 2px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-family: var(--display);
  font-size: 22px;
  line-height: .75;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top span {
  font-family: var(--sans);
  font-size: 6px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .collection-layout {
    grid-template-columns: 175px minmax(0, 1fr);
    gap: 20px;
  }

  .filter-sidebar {
    padding: 16px 13px;
  }

  .modal-main-image {
    height: 390px;
  }
}

@media (max-width: 620px) {
  .collection-layout {
    display: block;
  }

  .filter-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    margin-bottom: 24px;
  }

  .filter-header,
  .filter-note {
    grid-column: 1 / -1;
  }

  .filter-header {
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
  }

  .collection-toolbar {
    align-items: flex-start;
  }

  .sort-select {
    min-width: 130px;
  }

  .product-image img.product-image-main,
  .product-image img.product-image-hover {
    transition: none;
  }

  .product-card:hover .product-image img.product-image-main {
    opacity: 1;
  }

  .product-card:hover .product-image img.product-image-hover {
    opacity: 0;
  }

  .product-card:focus-within .product-image img.product-image-main {
    opacity: 1;
  }

  .collection-story-break {
    display: block;
    min-height: 0;
    margin: 6px 0 12px;
    padding: 30px 23px 32px;
  }

  .collection-story-break h3 {
    margin: 20px 0 22px;
    font-size: 43px;
  }

  .collection-story-break > p:not(.eyebrow) {
    margin-bottom: 20px;
    font-size: 13px;
  }

  .modal-main-image {
    height: 300px;
  }

  .back-to-top {
    right: 15px;
    bottom: 15px;
  }
}
