/* KABALL Collection pages · builds on styles.css */

.shop-wrap { width: var(--page); margin: 0 auto; padding: 90px 0 140px; }
.shop-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; flex-wrap: wrap; margin-bottom: 48px; }
.shop-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(50px, 6vw, 90px); line-height: .95; letter-spacing: -.025em; margin: 0; }
.shop-head p { max-width: 420px; margin: 0; }

.filters { display: flex; gap: 26px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.filters button {
  background: none; border: 0; padding: 0 0 14px; cursor: pointer; color: var(--black);
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; border-bottom: 1px solid transparent; margin-bottom: -1px;
}
.filters button[aria-pressed="true"] { border-bottom-color: var(--gold); }

.piece-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 22px; }
.piece-card { display: block; }
.piece-card .frame { aspect-ratio: 4 / 5; overflow: hidden; background: #ebe6de; position: relative; }
.piece-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, opacity .5s ease; }
.piece-card img + img { position: absolute; inset: 0; opacity: 0; }
.piece-card:hover img:first-child { transform: scale(1.03); }
.piece-card:hover img + img { opacity: 1; }
.piece-card .meta { padding-top: 18px; display: grid; gap: 4px; }
.piece-card .brand-line { font-size: 9px; letter-spacing: .24em; text-transform: uppercase; color: rgba(28,28,28,.7); }
.piece-card h2 { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.15; margin: 0; }
.piece-card .price { font-size: 13px; letter-spacing: .06em; }
.piece-card.is-collected .frame img { filter: grayscale(.35); opacity: .78; }

.badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--black); color: var(--ivory);
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase; padding: 7px 11px;
}
.badge.gold { background: var(--gold); color: var(--black); }

.shop-empty, .shop-status { padding: 80px 0; text-align: center; font-family: var(--serif); font-size: 28px; }
.preview-note {
  background: var(--black); color: var(--ivory); text-align: center;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; padding: 9px 16px;
}
.preview-note b { color: var(--gold); font-weight: 400; }

/* Piece page */
.crumbs { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 36px; }
.crumbs a { border-bottom: 1px solid var(--gold); }
.piece { display: grid; grid-template-columns: 1.15fr .85fr; gap: 6vw; align-items: start; }
.gallery-main { aspect-ratio: 4 / 3; background: #ebe6de; overflow: hidden; position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.thumbs button { padding: 0; border: 1px solid transparent; background: #ebe6de; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.thumbs button[aria-current="true"] { border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.piece-info { position: sticky; top: 30px; }
.piece-info .brand-line { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; margin: 0 0 14px; }
.piece-info h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 3.6vw, 54px); line-height: 1.02; letter-spacing: -.015em; margin: 0 0 20px; }
.piece-info .price { font-family: var(--serif); font-size: 30px; margin: 0 0 24px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.facts span { border: 1px solid var(--border); padding: 7px 12px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.facts span.gold { border-color: var(--gold); }
.collect-btn { width: 100%; cursor: pointer; }
.collect-btn[disabled] { opacity: .5; cursor: not-allowed; }
.collect-btn[disabled]:hover { background: var(--black); color: var(--ivory); }
.collect-note { font-size: 11px; letter-spacing: .06em; margin: 14px 0 0; min-height: 1.4em; }
.assurances { border-top: 1px solid var(--border); margin-top: 34px; padding-top: 22px; display: grid; gap: 10px; font-size: 13px; }
.assurances i { color: var(--gold); font-style: normal; margin-right: 10px; }

.piece-desc { margin-top: 34px; border-top: 1px solid var(--border); padding-top: 26px; font-size: 15px; }
.piece-desc h4 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 28px 0 8px; }
.piece-desc ul { padding-left: 18px; margin: 0; }
.piece-desc li { margin: 4px 0; }
.piece-desc em { font-family: var(--serif); font-size: 19px; }

@media (max-width: 980px) {
  .piece-grid { grid-template-columns: repeat(2, 1fr); }
  .piece { grid-template-columns: 1fr; }
  .piece-info { position: static; }
}
@media (max-width: 620px) {
  .shop-wrap { padding: 60px 0 100px; }
  .piece-grid { grid-template-columns: 1fr; gap: 40px; }
  .thumbs { grid-template-columns: repeat(5, 1fr); gap: 6px; }
}

/* Collector's Bag */
.site-nav { margin-left: auto; }
.bag-btn {
  background: none; border: 0; padding: 8px 0; margin-left: 32px; cursor: pointer; color: var(--black);
  font: inherit; font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px; order: 3;
}
.bag-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--gold); color: var(--black); font-size: 10px; letter-spacing: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.bag-count[hidden] { display: none; }

.bag-scrim {
  position: fixed; inset: 0; background: rgba(28,28,28,.35); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.bag-scrim.open { opacity: 1; pointer-events: auto; }
.bag-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 61;
  background: var(--ivory); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .35s ease; visibility: hidden;
}
.bag-drawer.open { transform: none; visibility: visible; }
body.bag-locked { overflow: hidden; }

.bag-head { display: flex; justify-content: space-between; align-items: center; padding: 28px 28px 20px; border-bottom: 1px solid var(--border); }
.bag-head h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0; }
.bag-close {
  background: none; border: 0; cursor: pointer; color: var(--black); padding: 6px 0;
  font: inherit; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; border-bottom: 1px solid var(--gold);
}

.bag-list { flex: 1; overflow-y: auto; padding: 8px 28px; }
.bag-empty { font-family: var(--serif); font-size: 24px; text-align: center; padding: 60px 0; line-height: 1.5; }
.bag-empty a { font-family: var(--sans); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--gold); }

.bag-item { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.bag-thumb { aspect-ratio: 4 / 5; background: #ebe6de; overflow: hidden; display: block; }
.bag-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bag-meta { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.bag-meta .brand-line { font-size: 9px; letter-spacing: .24em; text-transform: uppercase; color: rgba(28,28,28,.7); }
.bag-title { font-family: var(--serif); font-size: 20px; line-height: 1.15; }
.bag-price { font-size: 13px; letter-spacing: .06em; }
.bag-remove {
  background: none; border: 0; padding: 0; margin-top: 6px; cursor: pointer; color: var(--black);
  font: inherit; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--border);
}
.bag-item.is-gone .bag-thumb img { filter: grayscale(1); opacity: .6; }
.bag-item.is-gone .bag-price { color: #8a3b2e; }

.bag-foot { padding: 22px 28px 28px; border-top: 1px solid var(--border); }
.bag-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.bag-total span + span { font-family: var(--serif); font-size: 26px; letter-spacing: 0; text-transform: none; }
.bag-checkout { width: 100%; cursor: pointer; }
.bag-checkout[disabled] { opacity: .5; cursor: not-allowed; }
.bag-note { font-size: 11px; letter-spacing: .04em; margin: 12px 0 0; text-align: center; color: rgba(28,28,28,.75); }

.collect-btn.in-bag { background: transparent; color: var(--black); }
.collect-btn.in-bag:hover { background: var(--black); color: var(--ivory); }

@media (max-width: 980px) {
  .site-nav { margin-left: 0; }
  .bag-btn { order: 0; margin-left: auto; margin-right: 22px; }
}

/* Homepage collection cards with live photos */
.card-photos { position: absolute; inset: 0; z-index: -2; background: #2b2724; }
.card-photos img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.02); transition: opacity 1.4s ease, transform 6s ease;
}
.card-photos img.on { opacity: 1; transform: scale(1.06); }
.collection-card:not(.has-photos) .card-photos { display: none; }
.collection-card.has-photos::before { display: none; }
@media (prefers-reduced-motion: reduce) { .card-photos img { transition: none; transform: none; } }
