/* /shop — page-local commerce + layout */

.page-shop {
  overflow-x: clip;
}

.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: var(--placeholder-ratio, 3 / 4);
  width: 100%;
  max-width: 100%;
  background-color: var(--color-indaco);
  color: var(--color-black-70);
  box-sizing: border-box;
}

.media-placeholder.tale-cover__bg {
  aspect-ratio: auto;
  height: 100%;
  min-height: 100%;
}

.media-placeholder__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
  padding: 12px;
  max-width: 90%;
}

.page-shop img {
  max-width: 100%;
  height: auto;
}

.tale-cover {
  position: relative;
}

/* Cover side labels above the hero image. */
.shop-cover .tale-cover__name {
  z-index: 4;
}

.shop-cover__slot {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
}

.shop-cover__slot.is-ready {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
}

.shop-cover__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-cover__slot .media-placeholder.tale-cover__bg {
  aspect-ratio: auto;
  height: 100%;
  min-height: 100%;
}

/*
 * Homepage tale-product-overview is a sticky/absolute overlay stack on a
 * product image. /shop uses page-local .shop-hero / .shop-commerce instead.
 */

.shop-hero {
  background: var(--color-white);
  padding-block: 32px 24px;
  padding-inline: var(--content-inset-inline);
  overflow-x: clip;
}

.chichi-chapter-title--shop {
  color: var(--color-black);
}

@media (min-width: 64em) {
  .shop-hero {
    padding-block: 48px 32px;
  }
}

.shop-hero__inner,
.shop-commerce__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.shop-product__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  row-gap: 8px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.shop-product__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  background: var(--color-beige);
  color: var(--color-black);
  padding: 6px 10px;
}

.shop-commerce {
  background: var(--color-white);
  padding-block: 8px 64px;
  padding-inline: var(--content-inset-inline);
}

@media (min-width: 64em) {
  .shop-commerce {
    padding-bottom: 80px;
  }
}

.shop-commerce__inner {
  gap: 20px;
}

.shop-product__kicker {
  margin: 0;
  max-width: 40rem;
  font-family: var(--font-sans);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 400;
  letter-spacing: var(--sans-letter-spacing);
  line-height: 1.2;
  text-transform: uppercase;
}

.shop-product__lede {
  margin: 0;
  max-width: 40rem;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: var(--sans-letter-spacing);
  line-height: var(--body-line-height);
}

.shop-product__price {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: var(--sans-letter-spacing);
  line-height: 1.05;
}

.shop-product__subtitle {
  margin: 12px 0 0;
  max-width: 36rem;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-black-70);
}

.shop-format {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: min(100%, 520px);
  margin-top: 8px;
}

.shop-format__option {
  appearance: none;
  border: 1px solid var(--color-black-30);
  background: var(--color-white);
  color: var(--color-black);
  padding: 16px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: inherit;
  transition: border-color var(--timing-default) var(--easing-out),
    background-color var(--timing-default) var(--easing-out);
}

.shop-format__option.is-selected {
  border-color: var(--color-black);
  border-width: 2px;
  background: var(--color-beige);
}

.shop-format__option.is-unavailable {
  opacity: 0.45;
  cursor: not-allowed;
}

.shop-format__label {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: var(--sans-letter-spacing);
}

.shop-format__price {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  min-height: 1.2em;
}

.shop-format__status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-pink);
}

.shop-product__add {
  margin-top: 8px;
}

.shop-product__add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Minimal secondary buttons — entry.css btn scope not loaded on interior pages */
.page-shop .btn {
  align-items: center;
  display: inline-flex;
  flex-shrink: 0;
  gap: 4px;
  overflow: hidden;
  padding: 0 2px;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
  width: fit-content;
  border: 0;
  cursor: pointer;
  transition: background-color var(--timing-default) var(--easing-out),
    color var(--timing-default) var(--easing-out);
}

.page-shop .btn--secondary.btn--black {
  background-color: var(--color-black);
  color: var(--color-white);
}

.page-shop .btn--secondary.btn--black:hover,
.page-shop .btn--secondary.btn--black:focus-visible {
  background-color: var(--color-white);
  color: var(--color-black);
}

.page-shop .btn--secondary .btn__text {
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.5vw, 50px);
  font-weight: 400;
  letter-spacing: var(--sans-letter-spacing);
  line-height: 1.05;
  text-transform: uppercase;
  padding: 4px 8px;
}

.shop-trade {
  padding-block: 48px 24px;
  padding-inline: var(--content-inset-inline);
  text-align: center;
}

.shop-trade__line {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 18px;
  letter-spacing: var(--sans-letter-spacing);
  line-height: 1.35;
}

.shop-trade__email {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-pink);
  text-decoration: none;
}

.shop-trade__email:hover,
.shop-trade__email:focus-visible {
  text-decoration: underline;
}

.shop-cta {
  padding-block: 24px 48px;
  padding-inline: var(--content-inset-inline);
}

.shop-cta__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

@media (min-width: 64em) {
  .shop-cta__links {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
  }
}

.shop-shipping {
  margin: 0 auto 48px;
  padding-inline: var(--content-inset-inline);
  max-width: 36rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--color-black-70);
}

/*
 * Homepage tale-product-story uses large sticky-chapter padding/gaps
 * (row-gap 104px, desktop padding ~112/120). Interior /shop has no pin stack.
 * Horizontal inset for story/crafting columns lives in interior.css.
 */
.page-shop .shop-story.tale-product-story {
  max-width: 100%;
}

.page-shop .shop-story .tale-product-story__inner {
  padding-bottom: 0;
  max-width: 100%;
}

.page-shop .shop-story .tale-product-story__content {
  padding-block: 40px 48px;
  row-gap: 32px;
  column-gap: 40px;
  max-width: 100%;
}

@media (min-width: 64em) {
  .page-shop .shop-story .tale-product-story__content {
    flex-direction: row;
    padding-block: 56px 64px;
    row-gap: 40px;
    column-gap: 64px;
  }
}

/*
 * Specs + tasting editorial spread (screenshot composition).
 * Closest reuse pattern: tale-lookbook two-column rhythm — page-local only.
 */
.shop-editorial {
  background: var(--color-beige);
  padding-block: 48px 56px;
  padding-inline: var(--content-inset-inline);
  max-width: 100%;
  overflow-x: clip;
}

@media (min-width: 64em) {
  .shop-editorial {
    padding-block: 64px 80px;
  }
}

.shop-editorial__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Mobile: columns dissolve so children can be reordered. */
.shop-editorial__col {
  display: contents;
}

.shop-editorial .process-numbers {
  order: 0;
  padding: 0;
  background: transparent;
}

.shop-editorial__media--product {
  order: 1;
}

.shop-editorial__media--detail {
  order: 2;
}

.shop-editorial__media--extra[data-shop-media-slot="3"] {
  order: 3;
}

.shop-editorial__media--extra[data-shop-media-slot="4"] {
  order: 4;
}

.shop-editorial .process-tasting {
  order: 5;
  padding: 8px 0 0;
}

.shop-editorial__media {
  width: 100%;
  max-width: 100%;
  margin: 0;
  aspect-ratio: var(--media-ratio, 1);
  overflow: hidden;
  background-color: var(--color-indaco);
}

.shop-editorial__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/*
 * Shared numbers grid goes 4-col at ≥64em — inside this narrower left column
 * that shreds long card copy. Stack cards full-width in the editorial only.
 */
.shop-editorial .process-numbers__grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.shop-editorial .process-numbers__card-value {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

/* Culture + Distilled and bottled — large display type, prose sizing */
.shop-editorial .process-numbers__card--prose .process-numbers__card-value {
  font-family: var(--font-sans);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 400;
  letter-spacing: var(--sans-letter-spacing);
  line-height: 1.2;
}

.shop-editorial .process-numbers__title {
  margin: 0 0 28px;
}

.shop-editorial .process-tasting[data-layout="stacked"] .process-tasting__grid {
  max-width: none;
}

@media (min-width: 64em) {
  .shop-editorial__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    column-gap: 48px;
    row-gap: 0;
    align-items: start;
  }

  .shop-editorial__col {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
  }

  .shop-editorial .process-numbers,
  .shop-editorial__media--product,
  .shop-editorial__media--detail,
  .shop-editorial__media--extra,
  .shop-editorial .process-tasting {
    order: initial;
  }

  .shop-editorial .process-tasting {
    padding: 0;
  }

  .shop-editorial .process-tasting[data-layout="stacked"] .process-tasting__grid {
    gap: 28px;
  }
}

/* Homepage footer pin height — drop on interior pages */
.page-shop .the-footer {
  min-height: 0;
  padding-top: 48px;
  padding-bottom: 32px;
  row-gap: 24px;
  overflow-x: clip;
}

@media (min-width: 64em) {
  .page-shop .the-footer {
    padding-top: 64px;
    row-gap: 32px;
  }
}

/*
 * chichi-overrides.css replaces this h2 with a PNG lockup (font-size: 0).
 * Show the statement in type, sized to the container (same pattern as /process).
 */
.page-shop .the-footer__main {
  width: 100%;
  max-width: 100%;
  padding-inline: 12px;
  box-sizing: border-box;
}

.page-shop .chichi-chapter-title--footer {
  color: var(--color-white);
}
