.gallery-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 12px 0 26px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--clay-dark);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-intro h1,
.shop-intro h1 {
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.gallery-stats {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
}

.gallery-stats span {
  min-width: 104px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.72);
}

.gallery-stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
}

.gallery-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: clamp(14px, 2vw, 20px);
  padding: 22px 0 10px;
}

.gallery-showcase img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.showcase-feature,
.showcase-stack {
  min-height: clamp(280px, 46vw, 520px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.showcase-feature {
  position: relative;
  margin: 0;
}

.showcase-feature figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  width: min(520px, calc(100% - 36px));
  padding: 16px 18px;
  border-radius: 8px;
  color: var(--brand-ink);
  background: rgba(75, 41, 34, 0.9);
  box-shadow: 0 14px 30px rgba(34, 32, 29, 0.2);
}

.showcase-feature figcaption span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 244, 232, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.showcase-feature figcaption strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 3vw, 2.05rem);
  line-height: 1.12;
}

.showcase-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.showcase-stack img + img {
  border-top: 1px solid var(--line);
}

.gallery-tools {
  padding: 18px 0 22px;
}

.filter-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-weight: 690;
  cursor: pointer;
}

.filter-button:hover,
.filter-button:focus-visible {
  border-color: rgba(63, 100, 114, 0.55);
  color: var(--blue);
}

.filter-button[aria-pressed="true"] {
  color: #fffaf3;
  border-color: var(--clay-dark);
  background: var(--clay-dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
}

.piece-card {
  position: relative;
  grid-column: span 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.piece-card.featured {
  grid-column: span 6;
}

.piece-button {
  display: grid;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.piece-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e2d8ca;
}

.piece-card.featured .piece-media {
  aspect-ratio: 16 / 10;
}

.piece-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.piece-card:hover img,
.piece-card:focus-within img {
  transform: scale(1.035);
}

.piece-body {
  min-height: 112px;
  padding: 13px 14px 15px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.piece-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.piece-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.24;
}

.piece-year {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.piece-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.piece-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-right: 68px;
}

.piece-category,
.piece-status {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 740;
}

.piece-category {
  color: var(--blue);
  background: rgba(63, 100, 114, 0.11);
}

.piece-status {
  color: var(--clay-dark);
  background: rgba(196, 113, 73, 0.12);
}

.piece-status.showcase {
  color: var(--muted);
  background: rgba(36, 33, 31, 0.08);
}

.piece-status.made-to-order {
  color: var(--blue);
  background: rgba(63, 100, 114, 0.11);
}

.shop-card-link {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid rgba(116, 64, 45, 0.22);
  border-radius: 999px;
  color: var(--clay-dark);
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 8px 18px rgba(49, 36, 26, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
}

.shop-card-link:hover,
.shop-card-link:focus-visible {
  color: #fffaf3;
  background: var(--clay-dark);
  text-decoration: none;
}

.lightbox {
  width: min(94vw, 1060px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #151311;
  color: #fffaf3;
  box-shadow: var(--shadow);
}

.lightbox::backdrop {
  background: rgba(16, 13, 11, 0.72);
}

.lightbox-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: 18px;
}

.lightbox figure {
  margin: 0;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.lightbox img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #0d0b0a;
}

.lightbox figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 250, 243, 0.78);
}

.lightbox figcaption strong {
  color: #fffaf3;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #fffaf3;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.nav-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
}

.previous-button {
  left: 14px;
}

.next-button {
  right: 14px;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 1rem;
  font-weight: 800;
}

.shop-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 12px 0 26px;
  border-bottom: 1px solid var(--line);
}

.shop-summary {
  min-width: 132px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.72);
  color: var(--muted);
}

.shop-summary strong {
  display: block;
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
  padding-top: 24px;
}

.shop-item {
  scroll-margin-top: 96px;
  grid-column: span 6;
  display: grid;
  grid-template-columns: minmax(190px, 0.86fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.shop-item.is-linked {
  border-color: rgba(116, 64, 45, 0.55);
  box-shadow: 0 0 0 4px rgba(173, 104, 69, 0.14);
}

.shop-media {
  aspect-ratio: 4 / 3;
  min-height: 100%;
  background: #e2d8ca;
}

.shop-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-details {
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.shop-item h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.shop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.shop-status,
.shop-price {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 780;
}

.shop-status {
  color: var(--blue);
  background: rgba(63, 100, 114, 0.11);
}

.shop-price {
  color: var(--clay-dark);
  background: rgba(173, 104, 69, 0.14);
}

.shop-note,
.shop-description {
  margin: 0;
  color: var(--muted);
}

.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.shop-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--clay-dark);
  border-radius: 8px;
  color: #fffaf3;
  background: var(--clay-dark);
  font-weight: 760;
}

.shop-action.secondary {
  color: var(--clay-dark);
  background: transparent;
}

.shop-action:hover,
.shop-action:focus-visible {
  text-decoration: none;
  border-color: var(--blue);
  background: var(--blue);
  color: #fffaf3;
}

@media (max-width: 980px) {
  .gallery-intro,
  .gallery-showcase {
    grid-template-columns: 1fr;
  }

  .showcase-feature,
  .showcase-stack {
    min-height: 0;
  }

  .showcase-feature {
    aspect-ratio: 4 / 3;
  }

  .showcase-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    aspect-ratio: 16 / 7;
  }

  .showcase-stack img + img {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .shop-intro {
    grid-template-columns: 1fr;
  }

  .gallery-stats {
    justify-content: flex-start;
  }

  .piece-card,
  .piece-card.featured {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .gallery-intro,
  .shop-intro{
    gap: 16px;
    padding-bottom: 20px;
  }

  .gallery-intro h1,
  .shop-intro h1{
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  .gallery-stats span,
  .shop-summary{
    min-width: 0;
    width: 100%;
  }

  .showcase-feature figcaption {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: calc(100% - 20px);
    padding: 12px 13px;
  }

  .piece-card,
  .piece-card.featured {
    grid-column: 1 / -1;
  }

  .piece-body{
    min-height: auto;
  }

  .shop-item {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .piece-card.featured .piece-media {
    aspect-ratio: 4 / 3;
  }

  .lightbox-shell {
    padding: 62px 12px 14px;
  }

  .previous-button {
    left: 12px;
  }

  .next-button {
    right: 12px;
  }

  .lightbox figcaption {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 480px){
  .filter-button,
  .shop-action{
    min-height: 44px;
  }

  .shop-actions,
  .coming-soon-actions{
    flex-direction: column;
  }

  .shop-action{
    width: 100%;
  }

  .lightbox{
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .lightbox img{
    max-height: 66vh;
  }
}
