/*
 * Copperwell shop design system: the shop page, category pages and the product page.
 * Builds on base.css (tokens, controls, product cards); see the note on isolation there.
 */

/* ---- Shop and category pages ------------------------------------------------------------------ */
#cw .cw-shop {
  padding-block: calc(var(--cw-header) + 16px) clamp(56px, 7vw, 96px);
  background: var(--cw-paper);
}

#cw .cw-crumbsnav {
  padding-block: 8px;
}

/* The top of the shop: a few words beside a photo. */
#cw .cw-shophero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  margin-top: 12px;
}

#cw .cw-shophero--plain {
  grid-template-columns: minmax(0, 1fr);
  padding-block: clamp(16px, 3vw, 40px);
}

#cw .cw-shophero__text {
  display: grid;
  align-content: center;
  gap: 16px;
  padding-block: 16px;
}

#cw .cw-shophero__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--cw-radius);
  background: var(--cw-tile);
}

#cw .cw-shophero__offer {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--cw-line);
  font-size: 15px;
  line-height: 1.5;
}

#cw .cw-shophero__offer .cw-icon {
  flex: none;
  align-self: flex-start;
  margin-top: 3px;
}

#cw .cw-shopsec__offer {
  margin-block: 12px;
  color: var(--cw-brown);
  font-size: 15px;
  line-height: 1.5;
}

#cw .cw-shophero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

#cw .cw-playbtn {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 18px 6px 6px;
  border-radius: var(--cw-pill);
  background: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 400;
  transition: background-color 0.2s ease;
}

#cw .cw-playbtn:hover {
  background: #fff;
}

#cw .cw-playbtn__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cw-amber);
}

#cw .cw-playbtn .cw-icon {
  fill: currentColor;
  stroke: none;
}

/* The top of a category page. */
#cw .cw-cathead {
  display: grid;
  gap: 14px;
  max-width: 860px;
  padding-block: clamp(16px, 2.6vw, 36px) 4px;
}

/* The categories as a row of pills; it scrolls sideways where it does not fit. */
#cw .cw-catnav {
  margin-top: clamp(24px, 3vw, 40px);
  border-block: 1px solid var(--cw-line);
}

#cw .cw-catnav ul {
  display: flex;
  gap: 8px;
  margin-inline: calc(-1 * var(--cw-gutter));
  padding: 14px var(--cw-gutter);
  overflow-x: auto;
  scrollbar-width: none;
}

#cw .cw-catnav ul::-webkit-scrollbar {
  display: none;
}

#cw .cw-catnav li {
  flex: none;
}

#cw .cw-catnav__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 5px 18px 5px 6px;
  border: 1px solid var(--cw-line);
  border-radius: var(--cw-pill);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 400;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

#cw .cw-catnav__item--plain {
  padding-left: 20px;
}

#cw .cw-catnav__item:hover {
  border-color: var(--cw-brown);
  background: var(--cw-cream);
}

#cw .cw-catnav__item[aria-current='page'] {
  border-color: var(--cw-brown);
  background: var(--cw-brown);
  color: #fff;
}

#cw .cw-catnav__thumb {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--cw-tile);
}

#cw .cw-catnav__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

#cw .cw-catnav__thumb img.cw-catnav__img--cutout {
  padding: 4px;
  object-fit: contain;
}

#cw .cw-catnav__count {
  font-size: 12px;
  font-weight: 400;
  color: var(--cw-brown-soft);
  font-variant-numeric: tabular-nums;
}

#cw .cw-catnav__item[aria-current='page'] .cw-catnav__count {
  color: rgba(255, 255, 255, 0.78);
}

/* A category on the shop page: its name and a few words in a column, its products beside it. */
#cw .cw-shopsec {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 28px clamp(24px, 4vw, 64px);
  padding-block: clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--cw-line);
  scroll-margin-top: var(--cw-header);
}

#cw .cw-shopsec__intro {
  position: sticky;
  top: calc(var(--cw-header) + 24px);
  display: grid;
  align-content: start;
  align-self: start;
  gap: 14px;
}

#cw .cw-shopsec__text {
  max-width: 38ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cw-brown-soft);
}

#cw .cw-shopsec__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-size: 14px;
  font-weight: 400;
}

/* How many products, and the order to list them in. */
#cw .cw-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  padding-block: 20px;
}

#cw .cw-toolbar__count {
  font-size: 14px;
  color: var(--cw-brown-soft);
}

#cw .cw-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

#cw .cw-sort label {
  color: var(--cw-brown-soft);
  white-space: nowrap;
}

#cw .cw-sort select {
  height: 40px;
  padding: 0 38px 0 16px;
  border: 1px solid var(--cw-line-strong);
  border-radius: var(--cw-pill);
  background: var(--cw-paper)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23502b09' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 15px center;
  font-size: 14px;
  font-weight: 400;
  appearance: none;
  cursor: pointer;
}

/* What every order comes with. */
#cw .cw-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px 24px;
  margin-top: clamp(48px, 6vw, 88px);
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--cw-radius);
  background: var(--cw-cream);
}

#cw .cw-values li {
  display: grid;
  justify-items: start;
  gap: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cw-brown-soft);
}

#cw .cw-values .cw-icon {
  margin-bottom: 8px;
  color: var(--cw-copper);
}

#cw .cw-values__title {
  font-size: 15px;
  font-weight: 400;
  color: var(--cw-brown);
}

#cw .cw-empty--page {
  padding-block: 64px;
}

#cw .cw-empty .cw-btn {
  margin-top: 24px;
}

@media (max-width: 900px) {
  #cw .cw-shophero {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  #cw .cw-shophero__media {
    aspect-ratio: 4 / 3;
    order: -1;
  }

  #cw .cw-shopsec {
    grid-template-columns: minmax(0, 1fr);
  }

  #cw .cw-shopsec__intro {
    position: static;
  }

  #cw .cw-shopsec__text {
    max-width: 60ch;
  }
}

/* ---- Product page ----------------------------------------------------------------------------- */
#cw .cw-pdp-page {
  background: var(--cw-paper);
}

#cw .cw-pdp-page > .cw-scope:first-child {
  padding-top: calc(var(--cw-header) + 16px);
}

#cw .cw-pdp {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: clamp(24px, 4vw, 72px);
  padding-block: 12px clamp(40px, 5vw, 72px);
}

#cw .cw-pdp__gallery {
  position: sticky;
  top: calc(var(--cw-header) + 24px);
  min-width: 0;
}

#cw .cw-pdp__info {
  min-width: 0;
  max-width: 540px;
  padding-top: 8px;
}

/* Above the name: the category on the left, "Share" on the right. */
#cw .cw-pdp__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
}

#cw .cw-pdp__category {
  display: inline-block;
  /* Taller to tap than its line of small capitals; see the note on .cw-link in base.css. */
  padding-block: 4px;
  margin-block: -4px;
  transition: color 0.2s ease;
}

#cw .cw-share {
  margin-left: auto;
}

#cw .cw-share__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--cw-line);
  border-radius: var(--cw-pill);
  font-size: 13px;
  line-height: 1.4;
  color: var(--cw-brown);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

#cw .cw-share__button:hover,
#cw .cw-share__button[aria-expanded='true'] {
  border-color: var(--cw-line-strong);
  background: var(--cw-cream);
}

#cw .cw-share__list {
  z-index: 5;
  min-width: 190px;
}

/* Two classes, to outrank the header's rule for links in such a list. */
#cw .cw-share__list .cw-share__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  color: var(--cw-brown);
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

#cw .cw-share__list .cw-share__item:hover {
  background: var(--cw-sand);
}

#cw .cw-pdp__category:hover {
  color: var(--cw-brown);
}

#cw .cw-pdp__title {
  margin-top: 10px;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.15;
  font-weight: 400;
  text-wrap: balance;
}

#cw .cw-pdp__rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-block: 8px -4px;
  padding-block: 4px;
  font-size: 14px;
  color: var(--cw-brown-soft);
  text-decoration: underline;
  text-decoration-color: var(--cw-blush);
  text-underline-offset: 4px;
}

#cw .cw-pdp__rating:hover {
  color: var(--cw-brown);
}

/* Photos: thumbnails in a column, the current photo in a square frame that can be swiped. */
#cw .cw-gallery {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

#cw .cw-gallery--single {
  grid-template-columns: minmax(0, 1fr);
}

#cw .cw-gallery__thumbs {
  display: grid;
  gap: 10px;
}

#cw .cw-gallery__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--cw-radius-sm);
  background: var(--cw-tile);
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

#cw .cw-gallery__thumb:hover,
#cw .cw-gallery__thumb[aria-current='true'] {
  opacity: 1;
}

#cw .cw-gallery__thumb[aria-current='true'] {
  outline: 1.5px solid var(--cw-brown);
  outline-offset: 2px;
}

/* The keyboard's ring is told apart from the line around the picture being shown. */
#cw .cw-gallery__thumb:focus-visible {
  outline: 2px solid var(--cw-navy);
  outline-offset: 3px;
  opacity: 1;
}

#cw .cw-gallery__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

#cw .cw-gallery__thumb img.cw-gallery__img--cutout {
  padding: 6px;
  object-fit: contain;
}

#cw .cw-gallery__stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--cw-radius);
  background: var(--cw-tile);
}

#cw .cw-gallery__stage--empty {
  aspect-ratio: 1;
}

#cw .cw-gallery__track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

#cw .cw-gallery__track::-webkit-scrollbar {
  display: none;
}

#cw .cw-gallery__slide {
  flex: 0 0 100%;
  aspect-ratio: var(--cw-frame, 1);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

#cw .cw-gallery__open {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

#cw .cw-gallery__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

#cw .cw-gallery__img--contain {
  object-fit: contain;
}

#cw .cw-gallery__img--cutout {
  padding: 8%;
  object-fit: contain;
}

/* A short film in place of a photo: it fills the frame like one, and has a button to pause it. */
#cw .cw-gallery__film {
  position: relative;
  width: 100%;
  height: 100%;
}

#cw .cw-gallery__film video {
  display: block;
}

#cw .cw-gallery__play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px -8px rgba(46, 26, 8, 0.5);
  transition: background-color 0.2s ease;
}

#cw .cw-gallery__play:hover {
  background: #fff;
}

#cw .cw-gallery__play .cw-icon,
#cw .cw-gallery__thumbplay .cw-icon {
  fill: currentColor;
}

/* Among the small pictures, the one that is a film says so. */
#cw .cw-gallery__thumbplay {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
}

#cw .cw-gallery__thumbplay .cw-icon {
  width: 10px;
  height: 10px;
}

#cw .cw-gallery__arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px -8px rgba(46, 26, 8, 0.5);
  transition:
    opacity 0.2s ease,
    background-color 0.2s ease;
}

#cw .cw-gallery__arrow:hover {
  background: #fff;
}

#cw .cw-gallery__arrow--prev {
  left: 14px;
}

#cw .cw-gallery__arrow--next {
  right: 14px;
}

#cw .cw-gallery__arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

#cw .cw-gallery__count,
#cw .cw-gallery__hint {
  position: absolute;
  bottom: 14px;
  display: grid;
  place-items: center;
  height: 32px;
  border-radius: var(--cw-pill);
  background: rgba(255, 255, 255, 0.94);
  pointer-events: none;
}

#cw .cw-gallery__count {
  left: 14px;
  padding: 0 12px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#cw .cw-gallery__hint {
  right: 14px;
  width: 32px;
}

/* A native modal remains above every page stacking context, including the sticky gallery. */
#cw .cw-zoom {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: var(--cw-cream);
  color: var(--cw-brown);
}

#cw .cw-zoom::backdrop {
  background: var(--cw-cream);
}

#cw .cw-zoom__layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  gap: 8px;
}

#cw .cw-zoom__toolbar,
#cw .cw-zoom__footer,
#cw .cw-zoom__tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

#cw .cw-zoom__count,
#cw .cw-zoom__level {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#cw .cw-zoom__level {
  min-width: 44px;
  text-align: center;
}

#cw .cw-zoom__fit {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  /* The size of the count and the zoom level beside it. */
  font-size: 14px;
  border: 1px solid var(--cw-line-strong);
  border-radius: var(--cw-pill);
  text-align: center;
}

#cw .cw-zoom .cw-iconbtn {
  flex: 0 0 44px;
  background: var(--cw-paper);
}

#cw .cw-zoom button:disabled {
  opacity: 0.4;
}

#cw .cw-zoom button {
  touch-action: manipulation;
}

#cw .cw-zoom__viewport {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: var(--cw-radius-sm);
}

#cw .cw-zoom__viewport[data-enlarged='true'] {
  cursor: grab;
}

#cw .cw-zoom__viewport[data-enlarged='true']:active {
  cursor: grabbing;
}

#cw .cw-zoom__canvas {
  display: grid;
  place-items: center;
}

#cw .cw-zoom__img {
  max-width: none;
  max-height: none;
  border-radius: var(--cw-radius-sm);
  object-fit: contain;
  user-select: none;
}

#cw .cw-zoom__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#cw .cw-zoom__footer {
  font-size: 14px;
  text-align: center;
}

#cw .cw-zoom__error {
  padding: 24px;
}

@media (max-width: 380px) {
  #cw .cw-zoom__toolbar,
  #cw .cw-zoom__tools {
    gap: 4px;
  }
}

/* Price, choices, quantity, "Add to cart". */
#cw .cw-buy {
  margin-top: 18px;
}

#cw .cw-buy__price {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

/* While a sale is on: the price it goes back to, struck out, before the price it costs now. */
#cw .cw-buy__was {
  margin-right: 10px;
  font-size: 18px;
  color: var(--cw-brown-soft);
  text-decoration-thickness: 1px;
}

#cw .cw-buy__sale {
  margin-left: 12px;
  vertical-align: middle;
}

#cw .cw-buy__form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

/* What a Matka saves on bottles: a panel like the others beside the photos (rounded, no rule
   down its side), and the same as the offer panel of the cart. */
#cw .cw-buy-matka,
#cw .cw-buy__offer {
  padding: 16px 20px;
  border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius-sm);
  background: var(--cw-cream);
  color: var(--cw-brown);
}

#cw .cw-buy-matka { margin-top: 16px; }
#cw .cw-buy-matka__title { margin-bottom: 8px; font-size: 16px; line-height: 1.35; font-weight: 400; }
/* Each row keeps one shape on every width: what the offer is for, then what it gives. */
#cw .cw-buy-matka p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 16px;
  padding-block: 6px;
  font-size: 15px;
}
#cw .cw-buy-matka p > span { text-align: end; }
/* The padding makes the link at least 24 pixels to tap; the margin gives the space back. */
#cw .cw-buy-matka a { padding-block: 4px; margin-block: -4px; text-decoration: underline; text-underline-offset: 3px; }
#cw .cw-buy-matka small,
#cw .cw-buy__offer span {
  display: block;
  margin-top: 6px;
  color: var(--cw-brown-soft);
  font-size: 13px;
  line-height: 1.5;
}

/* A few words about the product, under the purchase form. */
#cw .cw-pdp__short {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--cw-line);
}

#cw .cw-options__legend {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#cw .cw-options__chosen {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--cw-brown-soft);
}

#cw .cw-options__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#cw .cw-option {
  position: relative;
  cursor: pointer;
}

#cw .cw-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

#cw .cw-option__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 84px;
  min-height: 52px;
  padding: 8px 18px;
  border: 1px solid var(--cw-line-strong);
  border-radius: var(--cw-radius-sm);
  background: var(--cw-paper);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 400;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

#cw .cw-option__price {
  font-size: 12px;
  font-weight: 400;
  color: var(--cw-brown-soft);
}

#cw .cw-option:hover .cw-option__box {
  border-color: var(--cw-brown);
}

#cw .cw-option input:checked + .cw-option__box {
  border-color: var(--cw-brown);
  background: var(--cw-brown);
  color: #fff;
}

#cw .cw-option input:checked + .cw-option__box .cw-option__price {
  color: rgba(255, 255, 255, 0.8);
}

#cw .cw-option input:focus-visible + .cw-option__box {
  outline: 2px solid var(--cw-navy);
  outline-offset: 2px;
}

#cw .cw-option--out,
#cw .cw-option--out input {
  cursor: not-allowed;
}

#cw .cw-option--out .cw-option__box,
#cw .cw-option--out:hover .cw-option__box {
  border-style: dashed;
  border-color: var(--cw-line-strong);
  background: none;
  color: #7c6a58;
  text-decoration: line-through;
}

#cw .cw-buy__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

#cw .cw-buy__row .cw-stepper {
  height: 58px;
}

/* Keep the full-size quantity controls and price label inside very small screens. */
@media (max-width: 360px) {
  #cw .cw-buy__row {
    grid-template-columns: minmax(0, 1fr);
  }

  #cw .cw-buy__row .cw-stepper {
    justify-self: start;
  }
}

#cw .cw-buy__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  font-size: 13px;
  line-height: 1.4;
}

#cw .cw-buy__status:empty {
  display: none;
}

#cw .cw-buy__stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
}

#cw .cw-buy__stock--in {
  color: var(--cw-success);
}

#cw .cw-buy__stock--low {
  color: #8f5400;
}

#cw .cw-buy__stock--out {
  color: var(--cw-error);
}

#cw .cw-assure {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: var(--cw-radius-sm);
  background: var(--cw-cream);
  font-size: 14px;
  line-height: 1.4;
}

#cw .cw-assure li {
  display: flex;
  align-items: center;
  gap: 12px;
}

#cw .cw-assure .cw-icon {
  color: var(--cw-copper);
}

#cw .cw-specs {
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
}

#cw .cw-specs > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
}

#cw .cw-specs dt {
  color: var(--cw-brown-soft);
}

/* On phones and tablets: a bar with the price and "Add to cart" at the bottom of the screen. */
#cw .cw-buybar {
  position: fixed;
  z-index: 9989;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--cw-line);
  background: rgba(255, 255, 255, 0.97);
  transform: translateY(110%);
  transition: transform 0.35s var(--cw-ease);
}

#cw .cw-buybar[data-shown='true'] {
  transform: none;
}

#cw .cw-buybar__text {
  flex: 1;
  min-width: 0;
}

#cw .cw-buybar__title {
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#cw .cw-buybar__price {
  font-size: 13px;
  color: var(--cw-brown-soft);
}

@media (max-width: 1024px) {
  #cw .cw-buybar {
    display: flex;
  }
}

/* Beside the text the photos stay in view while the page scrolls, so on a low window the photo
   is no taller than the room under the header: it is always seen whole. */
@media (min-width: 901px) {
  #cw .cw-gallery__slide {
    max-height: max(420px, calc(100svh - var(--cw-header) - 48px));
  }
}

@media (max-width: 900px) {
  #cw .cw-pdp {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  #cw .cw-pdp__gallery {
    position: static;
  }

  #cw .cw-pdp__info {
    max-width: none;
    padding-top: 0;
  }

  #cw .cw-gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  #cw .cw-gallery__thumbs {
    display: flex;
    order: 2;
    overflow-x: auto;
    padding: 3px;
    scrollbar-width: none;
  }

  #cw .cw-gallery__thumbs li {
    flex: 0 0 64px;
  }
}

/* ---- Reviews ---------------------------------------------------------------------------------- */
#cw .cw-reviews {
  padding-block: clamp(48px, 6vw, 88px);
  background: var(--cw-cream);
  scroll-margin-top: var(--cw-header);
}

#cw .cw-reviews__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  align-items: start;
  gap: clamp(24px, 4vw, 72px);
}

#cw .cw-reviews__summary {
  position: sticky;
  top: calc(var(--cw-header) + 24px);
  display: grid;
  justify-items: start;
  gap: 16px;
}

#cw .cw-reviews__average {
  display: flex;
  align-items: center;
  gap: 16px;
}

#cw .cw-reviews__number {
  font-size: 48px;
  line-height: 1;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
}

#cw .cw-reviews__based {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--cw-brown-soft);
}

#cw .cw-reviews__bars {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 380px;
  font-size: 13px;
}

#cw .cw-reviews__bars li {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
}

#cw .cw-reviews__bar {
  height: 6px;
  overflow: hidden;
  border-radius: var(--cw-pill);
  background: #ecdfd0;
}

#cw .cw-reviews__bar > span {
  display: block;
  height: 100%;
  border-radius: var(--cw-pill);
  background: var(--cw-amber-deep);
}

#cw .cw-reviews__bars li > span:last-child {
  color: var(--cw-brown-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#cw .cw-reviews__recommend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--cw-success);
}

#cw .cw-reviews__none {
  max-width: 36ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cw-brown-soft);
}

#cw .cw-reviews__main {
  min-width: 0;
}

/* Without reviews there is only the invitation to write one. */
#cw .cw-reviews__grid--empty {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

#cw .cw-reviews__grid--empty .cw-reviews__summary {
  position: static;
  justify-items: center;
  text-align: center;
}

#cw .cw-reviews__grid--empty .cw-reviews__main {
  width: 100%;
  max-width: 760px;
}

#cw .cw-reviews__grid--empty .cw-reviews__main:empty {
  display: none;
}

#cw .cw-reviews .cw-toolbar {
  padding-top: 0;
}

#cw .cw-review {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--cw-line);
}

#cw .cw-review__avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cw-blush);
  font-size: 18px;
  font-weight: 400;
}

#cw .cw-review__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 6px;
}

#cw .cw-review__author {
  font-size: 15px;
  font-weight: 400;
}

#cw .cw-review__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--cw-success);
}

#cw .cw-review__date {
  margin-left: auto;
  font-size: 13px;
  color: var(--cw-brown-soft);
}

#cw .cw-review__title {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 400;
}

#cw .cw-review__text {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cw-brown-soft);
  white-space: pre-line;
}

#cw .cw-reviews__more {
  margin-top: 24px;
}

/* The form for a new review. */
#cw .cw-reviewform {
  display: grid;
  gap: 20px;
  margin-bottom: 32px;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--cw-radius);
  background: var(--cw-paper);
}

#cw .cw-reviewform--sent {
  justify-items: start;
}

#cw .cw-reviewform__title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
}

#cw .cw-reviewform__ratings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px 24px;
}

#cw .cw-rate__label {
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--cw-brown-soft);
}

#cw .cw-rate__stars {
  display: flex;
  gap: 2px;
}

#cw .cw-rate__star {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #d9c6b0;
  cursor: pointer;
}

#cw .cw-rate__star.is-on {
  color: var(--cw-amber-deep);
}

#cw .cw-rate__star input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

#cw .cw-rate__star svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

#cw .cw-rate__star:focus-within {
  outline: 2px solid var(--cw-navy);
  outline-offset: 1px;
}

#cw .cw-reviewform__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#cw .cw-reviewform__fields > :first-child,
#cw .cw-reviewform__wide {
  grid-column: 1 / -1;
}

#cw .cw-reviewform__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  #cw .cw-reviews__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #cw .cw-reviews__summary {
    position: static;
  }
}

@media (max-width: 560px) {
  #cw .cw-reviewform__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  #cw .cw-review {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  #cw .cw-review__avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  #cw .cw-review__date {
    width: 100%;
    margin-left: 0;
  }
}

/* ---- Frequently bought together: the product with what goes with it, bought in one go ---------- */
#cw .cw-fbt {
  margin-top: 28px;
  padding: 20px;
  border-radius: var(--cw-radius);
  background: var(--cw-cream);
}

#cw .cw-fbt__title {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
}

#cw .cw-fbt__items {
  display: grid;
  margin-top: 8px;
}

#cw .cw-fbt__item {
  display: grid;
  grid-template-columns: 24px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-block: 14px;
}

#cw .cw-fbt__item + .cw-fbt__item {
  border-top: 1px solid var(--cw-line);
}

/* Something left out is still shown, quieter, so that it can be taken back in. */
#cw .cw-fbt__item[data-included='false'] :where(.cw-fbt__media, .cw-fbt__text, .cw-fbt__price) {
  opacity: 0.55;
}

#cw .cw-fbt__check {
  width: 24px;
  height: 24px;
  accent-color: var(--cw-brown);
  cursor: pointer;
}

#cw .cw-fbt__fixed {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--cw-brown);
  color: #fff;
}

#cw .cw-fbt__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--cw-paper);
}

#cw .cw-fbt__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

#cw .cw-fbt__media img.cw-fbt__img--cutout {
  padding: 5px;
  object-fit: contain;
}

#cw .cw-fbt__text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#cw .cw-fbt__name {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 400;
}

#cw label.cw-fbt__name {
  cursor: pointer;
}

#cw .cw-fbt__this {
  color: var(--cw-brown-soft);
}

#cw .cw-fbt__choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--cw-brown-soft);
}

/* A small list to choose the size or design from, drawn like the shop's other fields. */
#cw .cw-fbt__select {
  min-height: 36px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--cw-line-strong);
  border-radius: 10px;
  background: var(--cw-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23502b09' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  font-size: 14px;
  color: var(--cw-brown);
  appearance: none;
  cursor: pointer;
}

#cw .cw-fbt__view {
  padding-block: 4px;
  margin-block: -4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#cw .cw-fbt__view:hover {
  color: var(--cw-brown);
}

#cw .cw-fbt__price {
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
}

#cw .cw-fbt__foot {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--cw-line-strong);
}

#cw .cw-fbt__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  line-height: 1.4;
}

#cw .cw-fbt__total strong {
  font-size: 20px;
  font-weight: 400;
}

#cw .cw-fbt__notes {
  display: grid;
  gap: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cw-success);
}

#cw .cw-fbt__notes li {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 420px) {
  #cw .cw-fbt {
    padding: 16px;
  }

  #cw .cw-fbt__item {
    grid-template-columns: 24px 52px minmax(0, 1fr);
  }

  /* The price moves under the name, beside the choice. */
  #cw .cw-fbt__price {
    grid-column: 3;
  }
}

/* ---- The six yantras on a product page, between the product and its story ----------------------- */
#cw .cw-yantrasec {
  padding-bottom: clamp(48px, 6vw, 88px);
  background: var(--cw-paper);
}

#cw .cw-yantrasec__title {
  margin: 8px 0 28px;
}

/* ---- The story under the product ---------------------------------------------------------------
 * The sections every product page shares (why copper, the rules of care, cleaning, what copper
 * does), put together from parts in the admin panel. The parts' own styles are in content.css.
 */
#cw .cw-pdp__story {
  padding-bottom: clamp(48px, 6vw, 88px);
  background: var(--cw-paper);
}

/* The section above already ends a part's distance away. */
#cw .cw-pdp__story .cw-part:first-child {
  margin-top: 0;
}

/* ---- You may also like ------------------------------------------------------------------------ */
#cw .cw-related {
  padding-block: clamp(48px, 6vw, 88px);
  background: var(--cw-paper);
}

#cw .cw-related__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

/* ---- The film of the shop page, shown over the page ---------------------------------------------
 * Built by src/shop/ui/video.ts and added to the end of <body>, outside any .cw-scope.
 */
#cw .cw-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 14, 9, 0.88);
}

#cw .cw-lightbox__frame {
  width: min(1100px, 100%);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--cw-radius-sm);
  background: #000;
}

#cw .cw-lightbox__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

#cw .cw-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-family: var(--cw-font);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

#cw .cw-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.26);
}

#cw .cw-lightbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
