/* Shop page — product layout (extends site-shared.css) */
.shop-page.purchase {
  padding: calc(var(--nav-h) + 0.75rem) 0 1.25rem;
}
.shop-page .purchase__title {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}
.shop-page .purchase__lead {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.5;
}
.shop-page__inner {
  max-width: 58rem;
  margin: 0 auto;
}

.shop-book {
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 0.5rem;
}
@media (max-width: 520px) {
  .shop-book {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .shop-book__meta { width: 100%; }
  .shop-book__row { justify-content: center; }
}
.shop-book .book-viewer {
  width: 100%;
  max-width: 16rem;
  margin: 0;
}
.book-viewer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.book-viewer__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(28, 74, 114, 0.08);
  box-shadow: 0 12px 28px rgba(26, 34, 56, 0.07);
  background: var(--cream);
}
.book-viewer__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.book-viewer__track::-webkit-scrollbar { display: none; }
.book-viewer__slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.book-viewer__slide button {
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: var(--cream);
  cursor: zoom-in;
  display: block;
}
.book-viewer__slide picture {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cream);
}
.book-viewer__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--cream);
  mix-blend-mode: multiply;
}
.book-viewer__zoom {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 2px;
  background: rgba(247, 242, 232, 0.92);
  color: var(--navy-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(26,34,56,0.1);
  transition: background 0.2s, color 0.2s;
  border: none;
  cursor: pointer;
}
.book-viewer__zoom:hover { background: var(--cream-dark); color: var(--terracotta); }
.book-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2rem;
  height: 2.5rem;
  background: rgba(247, 242, 232, 0.9);
  color: var(--navy-ink);
  font-size: 1.35rem;
  line-height: 1;
  border: 1px solid rgba(26, 34, 56, 0.1);
  cursor: pointer;
  transition: background 0.2s;
}
.book-viewer__nav:hover { background: var(--cream-dark); }
.book-viewer__prev { left: 0; border-radius: 2px 0 0 2px; }
.book-viewer__next { right: 0; border-radius: 0 2px 2px 0; }
.book-viewer__footer {
  display: flex;
  justify-content: center;
  margin-top: 0.55rem;
}
.book-viewer__dots { display: flex; gap: 0.4rem; }
.book-viewer__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(196, 92, 62, 0.28);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.book-viewer__dot.is-active { background: var(--terracotta); transform: scale(1.15); }
.book-viewer__hint {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
}
p[lang].book-viewer__hint { display: block; }
.shop-book__meta {
  flex: 1;
  min-width: 0;
}
.shop-book__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--navy-ink);
  margin-bottom: 0.25rem;
}
.shop-book__edition {
  font-size: 0.98rem;
  color: var(--terracotta);
  font-style: italic;
  margin-bottom: 0.35rem;
}
.shop-book__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.shop-book__price {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--cobalt);
}

.shop-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.shop-field-head span {
  font-size: 0.98rem;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
}

.shop-mats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-top: 1.25rem;
}
@media (max-width: 720px) {
  .shop-mats { grid-template-columns: 1fr; max-width: 26rem; margin-left: auto; margin-right: auto; }
}

.shop-mat {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--cream);
  border: 1px solid rgba(26, 34, 56, 0.12);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.shop-mat:hover { border-color: rgba(21, 58, 92, 0.28); box-shadow: 0 4px 14px rgba(26, 34, 56, 0.08); }
.shop-mat.is-selected { border-color: var(--cobalt); box-shadow: 0 0 0 1px var(--cobalt); }
.shop-mat__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  line-height: 0;
  overflow: hidden;
}
.shop-mat__thumb:hover .shop-mat__img { opacity: 0.92; }
.shop-mat__thumb:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: -2px;
}
.shop-mat__thumb picture {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 2000 / 1435;
  overflow: hidden;
  background: var(--cream);
}
.shop-mat__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.shop-mat__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem 1rem;
}
.shop-mat__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.02rem, 2vw, 1.12rem);
  color: var(--navy-ink);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}
.shop-mat__subtitle {
  display: block;
  margin-top: 0.15rem;
}
.shop-mat__price {
  font-size: 1rem;
  color: var(--text-soft);
  margin-bottom: 0.65rem;
}
.shop-mat .purchase__stepper button {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1.15rem;
}
.shop-mat .purchase__stepper-val {
  min-width: 2.5rem;
  font-size: 1.2rem;
}

/* Fixed checkout bar */
.shop-checkout {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 190;
  background: rgba(247, 242, 232, 0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(26, 34, 56, 0.1);
  box-shadow: 0 -8px 32px rgba(26, 34, 56, 0.1);
  padding: 0.65rem clamp(1rem, 4vw, 2rem) 0.75rem;
}
.shop-checkout__inner {
  max-width: 58rem;
  margin: 0 auto;
}
.shop-shipping-zones {
  display: inline-flex;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
  padding: 0.2rem;
  border-radius: 3px;
  background: rgba(26, 34, 56, 0.06);
}
.shop-shipping-zones__btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.shop-shipping-zones__btn:hover { color: var(--navy-ink); }
.shop-shipping-zones__btn.is-active {
  background: #fff;
  color: var(--cobalt);
  box-shadow: 0 1px 4px rgba(26, 34, 56, 0.08);
  font-weight: 600;
}
.shop-checkout__shipping {
  margin-bottom: 0.35rem;
}
.shop-checkout__shipping-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}
.shop-checkout__shipping-goal {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-muted);
}
.shop-checkout__shipping-track {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-soft);
  white-space: nowrap;
}
.shop-checkout__progress {
  height: 5px;
  background: rgba(26, 34, 56, 0.1);
  border-radius: 3px;
  margin-bottom: 0.3rem;
  overflow: hidden;
}
.shop-checkout__fill {
  height: 100%;
  background: var(--cobalt);
  border-radius: 3px;
  width: 0;
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}
.shop-checkout__fill.is-unlocked { background: var(--sage); }
.shop-checkout__shipping.is-unlocked .shop-checkout__shipping-goal { color: var(--sage); }
.shop-checkout__shipping-status {
  font-size: 1.12rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
  min-height: 0;
}
.shop-checkout__shipping-status em {
  font-style: normal;
  color: var(--terracotta);
  font-weight: 500;
}
.shop-checkout__shipping-status.is-unlocked {
  color: var(--sage);
  font-weight: 600;
}
.shop-checkout__shipping-note {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-soft);
  line-height: 1.3;
}
.shop-checkout__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.shop-checkout__summary {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-style: italic;
}
.shop-checkout__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.shop-checkout__total {
  text-align: right;
}
.shop-checkout__total-label {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
}
.shop-checkout__total-amount {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--navy-ink);
  line-height: 1.2;
}
.shop-checkout__ship {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
}
.shop-checkout .btn--purchase {
  font-size: 1.12rem;
  padding: 0.95rem 1.5rem;
}
@media (max-width: 620px) {
  .shop-checkout__row { flex-wrap: wrap; }
  .shop-checkout__actions { width: 100%; justify-content: space-between; }
  .shop-checkout .btn--purchase { flex: 1; }
}

/* Footer — full site chrome, clearance above sticky checkout bar */
.footer--shop {
  padding-bottom: calc(2rem + 9.5rem);
}

/* Placemat lightbox */
.mat-lb {
  position: fixed;
  inset: 0;
  z-index: 320;
  background: rgba(26, 34, 56, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.mat-lb.open { opacity: 1; pointer-events: auto; }
.mat-lb__panel {
  display: flex;
  flex-direction: column;
  width: min(56rem, 100%);
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  padding: 1rem 1.25rem 1.1rem;
  background: var(--cream);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.mat-lb__media {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.65rem;
}
.mat-lb__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
}
.mat-lb__caption {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--navy-ink);
  text-align: center;
  margin: 0;
}
.mat-lb__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--navy-ink);
  z-index: 1;
}
.mat-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--navy-ink);
  background: rgba(247, 242, 232, 0.85);
  border: 1px solid rgba(26, 34, 56, 0.12);
  border-radius: 2px;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.mat-lb__nav:hover { background: var(--cream-dark); }
.mat-lb__prev { left: 0.5rem; }
.mat-lb__next { right: 0.5rem; }

.shop-stepper-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
@media (max-width: 520px) {
  .shop-stepper-wrap { align-items: center; }
}
.shop-max-note {
  margin: 0;
  max-width: 14rem;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: right;
}
@media (max-width: 520px) {
  .shop-max-note { text-align: center; max-width: none; }
}
.shop-max-note a {
  color: var(--cobalt);
  border-bottom: 1px solid rgba(21, 58, 92, 0.25);
}
.shop-max-note a:hover { border-bottom-color: var(--cobalt); }

