body,
.catalog-head,
.topbar {
  background: #fcfaf8;
}

.topbar {
  border-bottom-color: #ede6e2;
}

.catalog-head {
  padding-top: 34px;
  padding-bottom: 30px;
  text-align: center;
}

.catalog-head .breadcrumbs {
  display: inline-flex;
  margin-bottom: 7px;
}

.catalog-head h1 {
  margin-top: 11px;
}

.catalog-head > p {
  max-width: 680px;
  margin-inline: auto;
}

.category-rail {
  justify-content: center;
  margin-inline: auto;
  overflow: visible;
}

.catalog-content {
  padding-top: 36px;
}

.product-image {
  display: grid;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  overflow: hidden;
}

.product-image img,
.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-card .product-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card h3 {
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card .product-model {
  min-height: 17px;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--green);
  font:
    700 11px/1.3 "DM Sans",
    sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card .product-meta {
  display: -webkit-box;
  height: auto;
  min-height: 30px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.filter-group .filter-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 1px;
  border: 1px solid #d8d9d4;
  border-radius: 50%;
  background: var(--swatch);
}

.color-filter-options {
  display: grid;
  gap: 7px;
}

.color-filter-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 23px;
  color: #47544f;
  font-size: 12px;
  cursor: pointer;
}

.color-filter-options label[data-extra-color] {
  display: none;
}

.color-filter-options.is-expanded label[data-extra-color] {
  display: flex;
}

.show-more-colors {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font:
    700 11px "DM Sans",
    sans-serif;
  cursor: pointer;
}

.show-more-colors:hover,
.show-more-colors:focus-visible {
  color: var(--orange);
  text-decoration: underline;
  outline: 0;
}

.modal-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.modal-layout > * {
  min-width: 0;
}

.modal-image {
  display: grid;
  grid-template-rows: minmax(320px, 420px) auto;
  min-height: 0;
  aspect-ratio: auto;
  position: relative;
  overflow: hidden;
}

.modal-image > img {
  display: block;
  aspect-ratio: 1;
}

.modal-content h2 {
  overflow-wrap: anywhere;
}

.modal-content {
  min-width: 0;
}

.modal-thumbnails {
  grid-column: 1;
  grid-row: 2;
  max-width: 100%;
  background: #fff;
}

.modal-thumbnail {
  position: relative;
  width: 66px;
  height: 82px;
}

.modal-thumbnail span {
  display: block;
  max-width: 62px;
  padding: 2px 3px;
  overflow: hidden;
  color: var(--ink);
  font:
    700 8px/1.2 "DM Sans",
    sans-serif;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.gallery-main-image {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #f4f4f0;
  cursor: zoom-in;
}

.gallery-main-image img {
  display: block;
  width: 100%;
  height: 100% !important;
  aspect-ratio: auto;
  object-fit: cover;
}

.gallery-arrow,
.preview-arrow {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #e2dcd8;
  border-radius: 50%;
  background: #fffffff0;
  color: var(--ink);
  font:
    400 31px/1 Arial,
    sans-serif;
  cursor: pointer;
}

.gallery-arrow:disabled {
  display: none;
}
.gallery-arrow-previous {
  top: calc(50% - 52px);
  left: 12px;
}
.gallery-arrow-next {
  top: calc(50% - 52px);
  right: 12px;
}

.modal-content h2 {
  margin-bottom: 2px;
}

.modal-model {
  min-height: 18px;
  margin: 0 0 12px !important;
  color: var(--green) !important;
  font:
    700 13px/1.3 "DM Sans",
    sans-serif !important;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 20px;
  padding: 0;
  overflow: visible;
}

.color-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-option i {
  flex: 0 0 auto;
}

#image-preview-modal {
  position: relative;
  width: min(960px, calc(100% - 32px));
  max-width: 960px;
  background: #171514;
}

#image-preview-modal img {
  display: block;
  width: 100%;
  max-height: min(78vh, 760px);
  object-fit: contain;
}

.preview-arrow {
  top: calc(50% - 19px);
}
.preview-arrow-previous {
  left: 18px;
}
.preview-arrow-next {
  right: 18px;
}
#image-preview-modal .modal-close {
  color: #fff;
}

@media (max-width: 760px) {
  #product-modal {
    width: calc(100% - 20px);
    max-width: 430px;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }

  .modal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal-image {
    grid-template-rows: 250px auto;
    height: auto;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .product-image {
    height: auto;
  }

  .modal-image {
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .catalog-head {
    padding-top: 25px;
    text-align: left;
  }

  .catalog-head .breadcrumbs {
    display: flex;
  }

  .catalog-head > p {
    margin-inline: 0;
  }

  .category-rail {
    justify-content: flex-start;
    overflow: auto;
  }
}
