/* Home pieces: chips above the grid, page switcher below (cjc-pieces.js) */
.cjc-pieces__bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.cjc-pieces__chip { min-height: 40px; padding: 0 16px; border: 1px solid rgba(107,87,86,.28); border-radius: 999px; background: var(--cjc-white, #fff); color: var(--cjc-ink, #221c1e); font: 500 13.5px var(--cjc-font-sans, Jost, sans-serif); letter-spacing: .02em; cursor: pointer; transition: background-color 180ms, color 180ms, border-color 180ms; }
.cjc-pieces__chip span { margin-left: 4px; color: var(--cjc-mauve, #6b5756); font-size: 12px; }
.cjc-pieces__chip:hover { border-color: var(--cjc-ink, #221c1e); }
.cjc-pieces__chip[aria-pressed="true"] { background: var(--cjc-ink, #221c1e); border-color: var(--cjc-ink, #221c1e); color: var(--cjc-ivory, #f8f4f1); }
.cjc-pieces__chip[aria-pressed="true"] span { color: rgba(248,244,241,.7); }
@media (max-width: 767px) { .cjc-pieces__bar { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(-1 * var(--cjc-gutter, 20px)); padding-right: var(--cjc-gutter, 20px); scrollbar-width: none; } .cjc-pieces__bar::-webkit-scrollbar { display: none; } .cjc-pieces__chip { flex: none; } }
[data-cjc-pieces] > [hidden] { display: none !important; }
.cjc-pieces__pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 34px 0 0; }
.cjc-pieces__num, .cjc-pieces__arrow { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border: 1px solid rgba(107,87,86,.25); border-radius: 999px; background: var(--cjc-white, #fff); color: var(--cjc-ink, #221c1e); font: 500 14px var(--cjc-font-sans, Jost, sans-serif); cursor: pointer; transition: background-color 180ms, color 180ms, transform 180ms; }
.cjc-pieces__arrow { font-size: 20px; line-height: 1; }
.cjc-pieces__num:hover, .cjc-pieces__arrow:not(:disabled):hover { transform: translateY(-1px); border-color: var(--cjc-ink, #221c1e); }
.cjc-pieces__num[aria-current="page"] { background: var(--cjc-ink, #221c1e); border-color: var(--cjc-ink, #221c1e); color: var(--cjc-ivory, #f8f4f1); box-shadow: 0 0 0 4px rgba(231,174,184,.3); }
.cjc-pieces__arrow:disabled { opacity: .35; cursor: default; }
.cjc-pieces__count { flex: 1 1 100%; margin: 10px 0 0; color: var(--cjc-mauve, #6b5756); font: 13px var(--cjc-font-sans, Jost, sans-serif); text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  [data-cjc-pieces] > .cjc-pieces__in { animation: cjc-pieces-in 420ms cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
}
@keyframes cjc-pieces-in { from { opacity: 0; transform: translateY(10px); } }
/* ---------- one page fits the screen ---------- */
/* the photo's height follows the screen, so 2 rows + chips + page numbers fit under the header */
/* budget: header ~110 + chips 62 + 2 rows of (photo + ~120 of text and buttons) + gap 28 + page numbers ~80 */
[data-cjc-pieces] .cjc-card__media { aspect-ratio: auto !important; height: clamp(150px, calc((100vh - 550px) / 2), 300px); display: flex; align-items: center; justify-content: center; }
/* the box is the photos' own ivory studio background (#f8f4f0), so a square photo in a wide box has no bars */
[data-cjc-pieces] .cjc-card__media { background: #f8f4f0 !important; box-shadow: inset 0 0 0 1px rgba(107,87,86,.07); }
[data-cjc-pieces] .cjc-card__media img { width: 100% !important; height: 100% !important; object-fit: contain; padding: 8px 0; transition: transform 600ms cubic-bezier(.22,1,.36,1); }
[data-cjc-pieces] > article:hover .cjc-card__media img { transform: scale(1.04); }
/* name and price share a line; the tagline sits under them; the two buttons sit under that */
[data-cjc-pieces] > article { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "media media" "title price" "tag tag" "cta cta"; align-content: start; column-gap: 12px; row-gap: 0 !important; }
[data-cjc-pieces] .cjc-card__media { grid-area: media; }
[data-cjc-pieces] .cjc-card__title { grid-area: title; margin: 12px 0 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-cjc-pieces] .cjc-card__tagline { grid-area: tag; margin: 2px 0 0 !important; }
[data-cjc-pieces] .cjc-card__row { display: contents !important; }
[data-cjc-pieces] .cjc-card__price { grid-area: price; align-self: end; margin: 0 !important; line-height: 26px; }
[data-cjc-pieces] .cjc-card__cta { grid-area: cta; margin-top: 12px !important; }
[data-cjc-pieces] .cjc-card__tagline { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
[data-cjc-pieces] { will-change: transform, opacity; }
@media (max-width: 767px) {
  [data-cjc-pieces] { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-auto-flow: row !important; grid-auto-columns: auto !important; gap: 22px 12px !important; overflow: visible !important; margin-right: 0 !important; padding-right: 0 !important; scroll-snap-type: none !important; touch-action: pan-y; }
  [data-cjc-pieces] > article { width: auto !important; min-width: 0 !important; max-width: none !important; flex: none !important; }
  [data-cjc-pieces] .cjc-card__media { height: clamp(110px, calc((100svh - 470px) / 2), 190px); }
  [data-cjc-pieces] .cjc-card__tagline { display: none; }
  /* narrow cards: the name gets the full width (2 lines), price under it */
  [data-cjc-pieces] > article { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "title" "price" "cta"; }
  [data-cjc-pieces] .cjc-card__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 16px !important; line-height: 1.25 !important; margin-top: 8px !important; }
  [data-cjc-pieces] .cjc-card__price { align-self: start; line-height: 1.4; font-size: 15px !important; margin-top: 2px !important; }
  [data-cjc-pieces] .cjc-card__cta { margin-top: 8px !important; }
}

/* ---------- price, then Add to cart and Try it on as a matched pair ---------- */
[data-cjc-pieces] .cjc-card__cta, [data-cjc-pieces] .cjc-card__cta form.cart { width: 100%; }
[data-cjc-pieces] .cjc-card__cta form.cart { margin: 0 !important; }
[data-cjc-pieces] .cjc-card__cta form.cart { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; align-items: stretch; }
[data-cjc-pieces] .cjc-card__cta .quantity { display: none !important; }
[data-cjc-pieces] .cjc-card__cta .single_add_to_cart_button, [data-cjc-pieces] .cjc-card__cta .cjctry-trybtn {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; width: 100% !important; min-width: 0; height: 44px; min-height: 44px !important; margin: 0 !important; padding: 0 10px !important;
  border-radius: 999px !important; font: 500 12px/1 var(--cjc-font-sans, Jost, sans-serif) !important; letter-spacing: .1em !important; text-transform: uppercase; white-space: nowrap; box-shadow: none !important;
  transition: background-color 180ms, color 180ms, border-color 180ms, transform 180ms;
}
[data-cjc-pieces] .cjc-card__cta .single_add_to_cart_button { background: var(--cjc-ink, #221c1e) !important; border: 1px solid var(--cjc-ink, #221c1e) !important; color: var(--cjc-ivory, #f8f4f1) !important; }
[data-cjc-pieces] .cjc-card__cta .single_add_to_cart_button:hover { background: #000 !important; transform: translateY(-1px); }
[data-cjc-pieces] .cjc-card__cta .cjctry-trybtn { background: linear-gradient(135deg, #fbf3f4, #f4e2e6) !important; border: 1px solid rgba(201,135,147,.55) !important; color: var(--cjc-ink, #221c1e) !important; }
[data-cjc-pieces] .cjc-card__cta .cjctry-trybtn:hover { border-color: #c98793 !important; transform: translateY(-1px); }
[data-cjc-pieces] .cjc-card__cta .cjctry-trybtn svg { flex: none; color: #c98793; }
/* phones: the two cards are narrow, so the buttons stack, still a matched pair */
@media (max-width: 479px) {
  [data-cjc-pieces] .cjc-card__cta form.cart { grid-template-columns: 1fr; gap: 6px !important; }
  [data-cjc-pieces] .cjc-card__cta .single_add_to_cart_button, [data-cjc-pieces] .cjc-card__cta .cjctry-trybtn { height: 38px; min-height: 38px !important; font-size: 11px !important; letter-spacing: .08em !important; }
}
.cjc-pieces__pager { margin-top: 22px; }
.cjc-pieces__gap { min-width: 22px; color: var(--cjc-mauve, #6b5756); text-align: center; letter-spacing: .1em; }
@media (max-width: 479px) {
  .cjc-pieces__pager { gap: 4px; margin-top: 18px; }
  .cjc-pieces__num, .cjc-pieces__arrow { min-width: 36px; height: 36px; padding: 0 6px; font-size: 13px; }
  .cjc-pieces__count { margin-top: 6px; font-size: 12px; }
}
