/* Route templates built from the live storefront's measured layout. */
.mobile-filter-toggle,
.mobile-filter-drawer {
  display: none;
}

.route-main {
  min-height: calc(100dvh - 109px);
}

.route-loading,
.route-error {
  min-height: 100dvh;
  padding: 98px 20px 40px;
  font-weight: 500;
}

.route-error a {
  display: inline-block;
  margin-top: 18px;
  text-decoration: underline;
}

.remote-media {
  display: block;
  width: 100%;
  height: 100%;
  background: #f2f2f2;
  object-fit: cover;
}

.remote-media.is-missing {
  background: var(--placeholder);
  color: transparent;
}

/* Collection */
.collection-main {
  padding-top: 67px;
}

.collection-grid {
  display: grid;
  margin: 0 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 5px;
  row-gap: 40px;
}

.product-card {
  min-width: 0;
}

.product-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f2f2f2;
}

.product-card-media img {
  position: absolute;
  inset: 0;
  transition: opacity .18s ease;
}

.product-card-media img + img {
  opacity: 0;
}

.product-card-info {
  display: grid;
  margin-top: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  font-weight: 500;
  line-height: 1.35;
}

.product-card-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-price {
  grid-column: 2;
  grid-row: 1;
  white-space: nowrap;
}

.product-card-colors {
  grid-column: 1;
  opacity: .55;
}

.product-card-sizes {
  display: none;
}

/* Product */
.product-main {
  padding-top: 67px;
}

.product-layout {
  width: 100%;
}

.product-media-rail {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  gap: 5px;
}

.product-media-rail::-webkit-scrollbar {
  display: none;
}

.product-media-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  flex: 0 0 100%;
  overflow: hidden;
  scroll-snap-align: start;
  background: #f2f2f2;
  cursor: zoom-in;
}

.product-info {
  padding: 16px 20px 112px;
  font-weight: 500;
}

.product-info-inner {
  width: 100%;
}

.product-heading {
  display: block;
}

.product-heading h1,
.product-heading p {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.product-heading p {
  margin-top: 8px;
}

.product-color {
  margin-top: 8px;
  color: #6b6b6b;
}

.product-selector {
  margin-top: 8px;
}

.selector-options {
  display: flex;
  margin-left: -10px;
  flex-wrap: wrap;
  gap: 0;
}

.selector-options button {
  min-width: 30px;
  height: 17px;
  padding: 0 10px;
  text-align: center;
}

.selector-options button.is-selected {
  text-decoration: none;
}

.selector-options button[disabled] {
  color: #a9a9a9;
  text-decoration: line-through;
}

.color-swatches {
  display: flex;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 5px;
}

.color-swatch {
  display: block;
  width: 45px;
  aspect-ratio: 4 / 5;
  border: 1px solid #d6d6d6;
  background: #f2f2f2;
}

.color-swatch.is-selected {
  border-color: var(--black);
}

.add-to-bag {
  display: flex;
  width: 100%;
  height: 35px;
  margin-top: 23px;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: var(--white);
}

.product-notice {
  margin-top: 8px;
  font-size: 10px;
  line-height: 14px;
}

.product-info .detail-list {
  margin-top: 24px;
  border-top: 0;
}

.detail-list {
  border-top: 1px solid var(--black);
}

.detail-item {
  border-bottom: 1px solid var(--black);
}

.detail-item > button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.product-info .detail-item {
  border: 0;
}

.product-info .detail-item > button {
  min-height: 21px;
}

.product-info .detail-item > button::after {
  content: ">";
  margin-right: auto;
  margin-left: 6px;
}

.product-info .detail-item.is-open > button::after {
  content: "⌄";
}

.product-chat {
  min-height: 21px;
}

.product-chat button {
  min-height: 21px;
}

.detail-item > button::after {
  content: "+";
}

.detail-item.is-open > button::after {
  content: "−";
}

.detail-panel {
  display: none;
  padding: 0 0 20px;
  text-transform: none;
}

.detail-panel ul {
  padding-left: 14px;
  list-style: disc;
}

.detail-panel p + p,
.detail-panel li + li {
  margin-top: 4px;
}

.detail-item.is-open .detail-panel {
  display: block;
}

.product-zoom {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  overflow: auto;
  background: var(--white);
}

.product-zoom.is-open {
  display: block;
}

.product-zoom img {
  display: block;
  width: min(100%, 1000px);
  height: auto;
  margin: auto;
}

.product-zoom button {
  position: fixed;
  z-index: 2;
  top: 20px;
  right: 20px;
}

.cart-line-item {
  display: grid;
  padding: 0 20px 20px;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 15px;
}

.cart-line-item img {
  width: 96px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.cart-line-copy p {
  padding: 0;
}

.cart-line-copy p + p {
  margin-top: 3px;
}

.cart-total {
  display: flex;
  margin-bottom: 10px;
  justify-content: space-between;
}

/* Archive */
.archive-main {
  padding: 99px 0 80px;
}

.archive-feed {
  overflow: hidden;
}

.archive-entry {
  margin-bottom: 90px;
}

.archive-date,
.archive-copy,
.archive-link {
  width: calc(100% - 40px);
  max-width: 600px;
  margin-right: auto;
  margin-left: auto;
  font-weight: 500;
  white-space: pre-line;
}

.archive-date,
.archive-copy {
  margin-bottom: 20px;
}

.archive-link {
  display: block;
  margin-top: 20px;
  text-decoration: underline;
}

.archive-gallery {
  display: flex;
  width: max-content;
  margin-left: max(20px, calc((100vw - 600px) / 2));
  overflow: visible;
  gap: 5px;
}

.archive-gallery figure {
  width: min(600px, calc(100vw - 40px));
  margin: 0;
  flex: 0 0 auto;
}

.archive-gallery img {
  width: 100%;
  height: auto;
}

/* Chapters */
.chapters-main {
  padding: 99px 20px 80px;
}

.chapters-content {
  width: 100%;
}

.chapter-directory-heading {
  margin-bottom: 32px;
  font-size: inherit;
  font-weight: 500;
}

.chapter-feature {
  margin-bottom: 58px;
}

.chapter-feature img {
  display: block;
  width: 100%;
  height: auto;
}

.chapter-meta {
  margin-top: 10px;
  font-weight: 500;
}

.chapter-meta address {
  margin-top: 2px;
  font-style: normal;
  white-space: pre-line;
}

.chapter-index-heading {
  margin: 105px 0 26px;
  font-size: inherit;
  font-weight: 500;
}

.chapter-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 15px;
}

.chapter-index article {
  min-width: 0;
  font-weight: 500;
}

.chapter-index address {
  margin-top: 4px;
  font-style: normal;
  white-space: pre-line;
}

/* Information, account and search */
.info-main,
.account-main,
.search-main {
  padding: 99px 20px 90px;
}

.info-content,
.account-content,
.search-content {
  width: 100%;
  max-width: 972px;
}

.info-content h1,
.account-content h1,
.search-content h1 {
  margin-bottom: 38px;
  font-size: inherit;
  font-weight: 500;
}

.info-copy {
  max-width: 560px;
  font-weight: 500;
  text-transform: none;
}

.info-copy h2 {
  margin: 42px 0 14px;
  font-size: inherit;
  font-weight: 500;
  text-transform: uppercase;
}

.info-copy p + p {
  margin-top: 14px;
}

.support-contacts {
  display: grid;
  margin-bottom: 80px;
  gap: 25px;
  font-weight: 500;
}

.support-contacts h2 {
  margin-bottom: 5px;
  font-size: inherit;
  font-weight: inherit;
}

.support-faq {
  border-top: 1px solid var(--black);
}

.support-page > h1 {
  margin-bottom: 20px;
}

.support-intro {
  font-weight: 500;
}

.support-intro section + section {
  margin-top: 18px;
}

.support-intro h2 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.support-intro em {
  font-style: italic;
}

.support-social {
  display: flex;
  margin-top: 20px;
  flex-direction: column;
}

.support-faq-heading {
  margin-top: 44px;
  font-size: inherit;
  font-weight: 500;
}

.support-faq-live {
  margin-top: 12px;
}

.support-faq-live .detail-item {
  border: 0;
}

.support-faq-live .detail-item > button {
  min-height: 30px;
  justify-content: flex-start;
}

.support-faq-live .detail-item > button::after {
  content: ">";
  margin-left: 4px;
}

.support-faq-live .detail-item.is-open > button::after {
  content: "⌄";
}

.support-faq-live .detail-panel {
  max-width: 600px;
}

.rail-top .is-current {
  text-decoration: underline;
}

.info-rail-spacer {
  display: block;
  height: 28px;
}

.account-form,
.search-route-form {
  max-width: 405px;
}

.account-form label {
  display: block;
  margin: 20px 0 5px;
  font-weight: 500;
}

.account-form input,
.search-route-form input {
  width: 100%;
  height: 35px;
  padding: 0;
  border-bottom: 1px solid var(--black);
  outline: 0;
}

.account-form button,
.search-route-form button {
  width: 100%;
  height: 35px;
  margin-top: 20px;
  background: var(--black);
  color: var(--white);
}

.search-results {
  margin-top: 45px;
}

/* Mobile filter */
body.route-collection .left-rail {
  display: none;
}

body.route-collection .mobile-filter-toggle {
  position: absolute;
  z-index: 5;
  top: 25px;
  left: 20px;
  display: block;
  height: 17px;
  font-weight: 500;
  line-height: 12px;
  pointer-events: auto;
}

.mobile-filter-drawer {
  position: fixed;
  z-index: 2;
  top: 80px;
  right: 0;
  left: 0;
  padding: 10px 20px 25px;
  background: var(--white);
  pointer-events: auto;
}

.mobile-filter-drawer.is-open {
  display: block;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-weight: 500;
}

.filter-group + .filter-group {
  margin-top: 28px;
  flex-direction: column;
}

.filter-group button.is-active {
  text-decoration: underline;
}

.filter-group div {
  display: flex;
  gap: 16px;
}

@media (hover: hover) {
  .product-card-media:hover img + img {
    opacity: 1;
  }
}

@media (min-width: 1025px) {
  .route-main {
    min-height: 100dvh;
  }

  .route-loading,
  .route-error {
    padding: 99px 4vw 80px 180px;
  }

  body.route-collection .left-rail {
    display: flex;
  }

  body.route-collection .mobile-filter-toggle,
  .mobile-filter-drawer {
    display: none !important;
  }

  .collection-main {
    max-width: calc(96vw - 180px);
    margin-right: 4vw;
    margin-left: 180px;
    padding-top: 54px;
  }

  .collection-grid {
    margin: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 30px;
  }

  .product-card-sizes {
    display: flex;
    margin-top: 5px;
    flex-wrap: wrap;
    gap: 5px;
    color: #6b6b6b;
    font-weight: 500;
  }

  .product-main {
    margin-left: 180px;
    padding-top: 54px;
  }

  .product-layout {
    display: grid;
    grid-template-columns: minmax(0, 45vw) minmax(0, 1fr);
    gap: 50px;
  }

  .product-media-rail {
    display: block;
    overflow: visible;
  }

  .product-media-item {
    width: 45vw;
    margin-bottom: 10px;
  }

  .product-info {
    position: relative;
    min-width: 0;
    padding: 45px 0 80px;
  }

  .product-info-inner {
    position: sticky;
    top: 99px;
    width: 325px;
    max-width: calc(100% - 30px);
  }

  .selector-options button {
    height: 14px;
  }

  .add-to-bag {
    margin-top: 16px;
  }

  .product-info .detail-list {
    margin-top: 16px;
  }

  .archive-main {
    margin-left: 180px;
  }

  .archive-date,
  .archive-copy,
  .archive-link {
    margin-right: 0;
    margin-left: max(20px, calc((100vw - 600px) / 2 - 180px));
  }

  .archive-gallery {
    margin-left: max(20px, calc((100vw - 600px) / 2 - 180px));
  }

  .chapters-main {
    margin-left: 180px;
    padding-right: 0;
    padding-left: 0;
  }

  .chapters-content {
    width: 66.6667%;
    max-width: 840px;
  }

  .chapter-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .info-main,
  .account-main,
  .search-main {
    margin-left: 180px;
    padding-right: 20vw;
    padding-left: 0;
  }

  .info-main {
    padding-top: 80px;
  }

  .support-contacts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
