.ct-product {
  padding-block: clamp(1.25rem, 3vw, 3.5rem) clamp(4rem, 8vw, 8rem);
}

.ct-product-crumbs {
  display: flex;
  gap: .65rem;
  margin-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

.ct-product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

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

.ct-product .ct-product-gallery {
  position: sticky;
  top: clamp(1.25rem, 3vw, 3rem);
}

.ct-product .ct-product-gallery figure { margin: 0; }

.ct-product .ct-product-gallery .mainphoto {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: contain;
  border: 1px solid var(--ct-line, #cbc7be);
  background: #efeae0;
}

.ct-product .ct-product-gallery figcaption {
  padding: .85rem 1rem;
  border-inline: 1px solid var(--ct-line, #cbc7be);
  border-bottom: 1px solid var(--ct-line, #cbc7be);
  font-size: .92rem;
  line-height: 1.45;
}

.ct-product .ct-product-gallery [data-full-cover-status]:not([hidden]) {
  display: block;
  margin-top: .45rem;
  color: var(--ct-muted, #55525b);
}

.ct-product .ct-product-gallery .thumbs {
  display: flex;
  gap: .5rem;
  overflow: auto;
  padding: .25rem .25rem .55rem;
}

.ct-product .ct-product-gallery .thumbs > a {
  flex: 0 0 4rem;
  width: 4rem;
  height: 4rem;
  border: 1px solid var(--ct-line, #cbc7be);
}

.ct-product .ct-product-gallery [aria-current="true"] {
  outline: 2px solid var(--ct-ink, #1b191b);
  outline-offset: 2px;
}

.ct-product .ct-product-gallery .rc-fit-thumbnail {
  position: relative;
  overflow: hidden;
  background: var(--ct-paper, #f8f5ed);
}

.ct-product .ct-product-gallery .rc-fit-thumbnail span {
  position: absolute;
  inset: auto 0 0;
  padding: .07rem .1rem;
  text-align: center;
  color: var(--ct-ink, #1b191b);
  background: var(--ct-lime, #e3ed89);
  font-size: .72rem;
  font-weight: 700;
}

.ct-gallery-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: .5rem;
  font-size: .88rem;
}

.ct-product .ct-product-buy {
  border-top: .375rem solid var(--ct-salmon, #ec684f);
  padding-top: clamp(1.1rem, 2vw, 1.85rem);
}

.ct-cover-type {
  display: inline-block;
  padding: .35rem .55rem;
  color: var(--ct-ink, #1b191b);
  background: var(--ct-lime, #e3ed89);
  font-size: .88rem;
  font-weight: 700;
}

.ct-product .ct-product-buy h1 {
  margin: .7rem 0 .5rem;
  font-family: Display, system-ui, sans-serif;
  font-size: clamp(2.6rem, 5.1vw, 5.3rem);
  line-height: .93;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.ct-product .ct-product-buy .price {
  margin-block: 1.25rem 1.5rem;
  font-size: 1.38rem;
  font-weight: 700;
}

.ct-product .ct-product-buy form { margin: 0; }

.ct-product .ct-product-buy .choicegroup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.ct-product .ct-product-buy .choicegroup > label:only-child { grid-column: 1 / -1; }

.ct-product .ct-product-buy select {
  min-height: 3rem;
  margin-top: .35rem;
  width: 100%;
  border-color: var(--ct-line, #cbc7be);
  border-radius: 0;
  padding-inline: .7rem;
  color: var(--ct-ink, #1b191b);
  background-color: #fffdf7;
}

.ct-product .ct-product-buy .product-variant-swatches {
  grid-column: 1 / -1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(5.25rem, auto);
  gap: .375rem;
  justify-content: start;
  overflow: auto;
  padding: .15rem .15rem .5rem;
}

.ct-product .ct-product-buy .product-variant-swatches button {
  min-height: 3.25rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .35rem;
  padding: .3rem .5rem;
  border: 1px solid var(--ct-line, #cbc7be);
  background: #fffdf7;
  color: var(--ct-ink, #1b191b);
  font: inherit;
  font-size: .82rem;
  white-space: nowrap;
}

.ct-product .ct-product-buy .product-variant-swatches img { object-fit: cover; }

.ct-product .ct-product-buy .product-variant-swatches button[aria-pressed="true"] {
  border-color: var(--ct-ink, #1b191b);
  background: var(--ct-lime, #e3ed89);
}

.ct-option-status {
  margin: .75rem 0 0;
  color: var(--ct-muted, #55525b);
  font-size: .91rem;
}

.ct-product .ct-fit-picker {
  margin-block: 1.15rem .85rem;
  border-block: 1px solid var(--ct-line, #cbc7be);
}

.ct-product .ct-fit-picker summary { padding: .75rem 0; font-weight: 700; }
.ct-fit-picker > p { margin: 0 0 .75rem; }

.ct-fit-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: .55rem;
  padding-bottom: .75rem;
}

.ct-fit-choices > button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3rem;
  min-height: 5rem;
  padding: .5rem;
  color: var(--ct-ink, #1b191b);
  background: #fffdf7;
  border: 1px solid var(--ct-line, #cbc7be);
  text-align: left;
}

.ct-fit-choices > button[aria-pressed="true"] { border: 2px solid var(--ct-ink, #1b191b); }
.ct-fit-choices img { width: 100%; height: auto; object-fit: contain; }
.ct-fit-choices span { font-size: .88rem; }

.ct-flat-cover {
  display: grid;
  grid-template-columns: minmax(5rem, .65fr) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin: .85rem 0;
  padding: .8rem;
  border: 1px solid var(--ct-line, #cbc7be);
  background: #fffdf7;
  font-size: .88rem;
}

.ct-flat-cover div {
  display: flex;
  justify-content: space-around;
  gap: .5rem;
  align-items: center;
  padding: .5rem .35rem;
  border: 1px dashed var(--ct-ink, #1b191b);
  color: var(--ct-muted, #55525b);
  font-weight: 700;
}

.ct-flat-cover figcaption strong { display: block; }
.ct-fit-links { display: flex; flex-wrap: wrap; gap: .5rem .95rem; margin: .75rem 0 1rem; font-size: .88rem; }

.ct-product-actions {
  display: grid;
  align-items: start;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .8rem;
  margin-top: 1.15rem;
}

.ct-product-actions > div > label { display: block; font-weight: 700; font-size: .87rem; }
.ct-quantity-controls { display: flex; height: 3.25rem; margin-top: .375rem; border: 1px solid var(--ct-line, #cbc7be); }

.ct-quantity-controls > * {
  width: 2.45rem;
  margin: 0;
  padding: 0;
  border: 0;
  text-align: center;
  color: var(--ct-ink, #1b191b);
  background: #fffdf7;
  font: inherit;
}

.ct-quantity-controls input { appearance: textfield; }
.ct-quantity-controls input::-webkit-inner-spin-button { appearance: none; }
.ct-quantity-controls button:disabled { opacity: .5; }
.ct-product-actions .cta { margin-top: 1.65rem; min-height: 3.25rem; }
.ct-product-actions [data-quantity-status] { margin: .3rem 0 0; font-size: .85rem; }

.ct-product-details { margin: 1.5rem 0; border-top: 1px solid var(--ct-line, #cbc7be); }
.ct-product-details details { border-bottom: 1px solid var(--ct-line, #cbc7be); }
.ct-product-details summary { padding: .8rem 0; font-weight: 700; }
.ct-product-details details p { max-width: 58ch; margin: .15rem 0 .85rem; }
.ct-product-quick { display: none; }

.ct-product > .detailnav { margin-top: clamp(3rem, 7vw, 7rem); }
.ct-product > .itemstory .product-overview { max-width: 75ch; }

@media (max-width: 800px) {
  .ct-product-layout { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .ct-product .ct-product-gallery { position: static; }
  .ct-product .ct-product-gallery .mainphoto { aspect-ratio: 5 / 4; }
  .ct-product .ct-product-buy h1 { font-size: clamp(2.2rem, 11vw, 3.85rem); }
  .ct-product .ct-product-buy .choicegroup { gap: .7rem; }
  .ct-product-quick {
    position: fixed;
    z-index: 20;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--ct-line, #cbc7be);
    color: var(--ct-ink, #1b191b);
    background: var(--ct-paper, #f8f5ed);
    font-size: .9rem;
  }
  .ct-product-quick div > * { display: block; }
  .ct-product-quick .cta { min-height: 44px; margin: 0; }
}

.ct-product [hidden] { display: none !important; }
