/* BB Stills v3 — Prints shop only (loaded after main.css) */

body.shop-lock {
  overflow: hidden !important;
}

.shop-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2rem) 1.15rem 3rem;
  box-sizing: border-box;
}

.shop-header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.shop-header .eyebrow {
  text-align: center;
  width: 100%;
  padding-left: 0.22em;
}

.shop-header .section-title {
  margin-bottom: 0.75rem;
  text-align: center;
}

.shop-intro {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
}

.shop-note {
  margin: 2.5rem auto 0;
  max-width: 28rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.6;
}

/* ---- Grid: 2 col phone, 3 col desktop ---- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 0.75rem;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 800px) {
  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem 1rem;
  }
}

/* ---- Card ---- */
.shop-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.shop-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Fixed 3:4 frame — padding trick (no absolute blow-up) */
.shop-card__media {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 133.333%;
  overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
}

.shop-card__media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 0;
  pointer-events: none;
  -webkit-user-drag: none;
}

.shop-card__body {
  padding: 0.85rem 0.9rem 1rem;
}

.shop-card__title {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
  color: var(--text);
}

.shop-card__meta {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
  font-weight: 300;
}

.shop-card__price {
  font-size: 0.72rem;
  margin: 0;
  color: var(--text);
}

/* ---- Modal ---- */
.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
  box-sizing: border-box;
  /* Outer scroll fallback (iOS) */
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.shop-modal.is-open {
  display: flex;
}

.shop-modal__panel {
  width: min(880px, 100%);
  max-height: min(92vh, 92dvh);
  background: var(--surface);
  color: var(--text);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  margin: auto;
}

.shop-modal__photo {
  position: relative;
  min-height: 260px;
  min-width: 0;
  background: var(--surface2);
  overflow: hidden;
}

.shop-modal__photo img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.shop-modal__content {
  padding: 1.5rem 1.35rem 1.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
  min-width: 0;
}

.shop-modal__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.shop-modal__title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shop-modal__loc,
.shop-modal__edition {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.shop-modal__desc {
  margin: 0.75rem 0 1rem;
  color: var(--muted);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.65;
}

.shop-modal__close {
  border: 0;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  opacity: 0.7;
  padding: 0.15rem;
  touch-action: manipulation;
}

.shop-modal__close:hover {
  opacity: 1;
}

.shop-size-label {
  margin: 0.5rem 0 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.shop-size {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.45rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.shop-size.is-active,
.shop-size:hover {
  border-color: var(--text);
  color: var(--text);
}

.shop-size__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-size__sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 300;
  margin-top: 0.2rem;
  opacity: 0.85;
}

.shop-size__price {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.shop-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 1rem;
  font-size: 0.85rem;
}

.shop-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.95rem 1rem;
  border: 0;
  background: var(--text);
  color: var(--bg);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 2.85rem;
  flex-shrink: 0;
}

.shop-btn:hover {
  opacity: 0.9;
}

.shop-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Keep Add to cart visible while scrolling sizes */
.shop-modal__content .shop-btn[data-shop-add] {
  position: sticky;
  bottom: 0;
  margin-top: 1rem;
  z-index: 2;
  box-shadow: 0 -10px 18px var(--surface);
}

@media (max-width: 720px) {
  .shop-modal {
    padding: 0;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: hidden;
  }

  .shop-modal__panel {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: min(94vh, 94dvh);
    height: min(94vh, 94dvh);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0;
  }

  /* Smaller photo so the form can scroll to Add to cart */
  .shop-modal__photo {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: 32vw;
    min-height: 9.5rem;
    max-height: 12rem;
    padding-bottom: 0;
  }

  .shop-modal__content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1.1rem 1.15rem;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .shop-modal__desc {
    margin: 0.5rem 0 0.75rem;
    font-size: 0.85rem;
  }
}

/* ---- Cart drawer ---- */
.shop-cart {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: none;
}

.shop-cart.is-open {
  display: block;
}

.shop-cart__dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.shop-cart__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(380px, 100%);
  height: 100%;
  background: var(--surface);
  color: var(--text);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.shop-cart__hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.shop-cart__hdr h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.shop-cart__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.2rem;
}

.shop-cart__empty {
  text-align: center;
  color: var(--muted);
  padding: 2.5rem 1rem;
  font-weight: 300;
  font-size: 0.9rem;
}

.shop-line {
  display: flex;
  gap: 0.85rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.shop-line__thumb {
  width: 4.25rem;
  height: 5.25rem;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface2);
  position: relative;
}

.shop-line__thumb img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.shop-line__title {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-line__size {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  color: var(--muted);
}

.shop-line__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.shop-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  padding: 0.15rem 0.35rem;
}

.shop-qty button {
  border: 0;
  background: none;
  color: var(--text);
  font-size: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  cursor: pointer;
  touch-action: manipulation;
}

.shop-line__remove {
  margin-top: 0.45rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.shop-cart__ftr {
  padding: 1.1rem 1.2rem 1.35rem;
  border-top: 1px solid var(--border);
}

.shop-cart__sub {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
}

.shop-cart__hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 300;
  line-height: 1.5;
}

/* Header cart badge (uses main.css cart-btn if present) */
.cart-count:not([hidden]) {
  display: grid;
}

/* ---- Thank you (post-Stripe) ---- */
.thanks-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  padding-bottom: 2rem;
  box-sizing: border-box;
}

.thanks-page .shop-header {
  margin-bottom: 1.25rem;
}

.thanks-card {
  max-width: 26rem;
  margin: 0 auto;
  padding: 0.25rem 0 0;
  box-sizing: border-box;
}

.thanks-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.thanks-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.thanks-line__main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.thanks-line__title {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
}

.thanks-line__meta {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.4;
}

.thanks-line__price {
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.thanks-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.7rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 300;
}

.thanks-row--total {
  margin-top: 0.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}

.thanks-email {
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.55;
}

.thanks-note {
  margin: 0.75rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.6;
}

.thanks-back {
  display: inline-block;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.1rem;
}

.thanks-back:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

.thanks-error {
  max-width: 26rem;
  margin: 0 auto 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.55;
  text-align: center;
}

.thanks-empty {
  color: var(--muted);
  font-weight: 300;
  padding: 0.85rem 0;
}