/* gallery layout on top of AA chrome */
html,
body {
  min-height: 100%;
}

.aa-app.gallery {
  max-width: 1200px;
  gap: 28px;
}

.brand {
  font-family: var(--aa-serif);
  font-size: clamp(42px, 8vw, 72px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 0.95;
}

.lede {
  margin: 0;
  max-width: 36ch;
  color: var(--aa-muted);
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.hero {
  display: grid;
  gap: 14px;
  padding: 28px 0 8px;
  border-bottom: 0.5px solid var(--aa-border);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.piece {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
}

.piece a {
  color: inherit;
  text-decoration: none;
}

.piece-frame {
  position: relative;
  overflow: hidden;
  background: var(--aa-bg-2);
  border: 0.5px solid var(--aa-border);
  aspect-ratio: 3 / 4;
  display: block;
}

.piece-media {
  display: block;
  width: 100%;
  height: 100%;
}

.piece-frame img,
.piece-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
  filter: saturate(0.92) contrast(1.02);
}

.piece:hover .piece-frame img,
.piece:focus-within .piece-frame img {
  transform: scale(1.03);
  filter: saturate(1) contrast(1.04);
}

.piece-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.piece-title {
  margin: 0;
  font-family: var(--aa-serif);
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
}

.piece-tag {
  margin: 0;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.footer-note {
  margin: 8px 0 24px;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.footer-note a {
  color: var(--aa-accent);
  text-decoration: none;
  border-bottom: 0.5px solid var(--aa-border-2);
}

/* product page */
.aa-app.product {
  max-width: 1100px;
  gap: 20px;
}

.product-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: start;
  padding-top: 12px;
}

@media (max-width: 860px) {
  .product-stage {
    grid-template-columns: 1fr;
  }
}

.product-media {
  position: relative;
  background: var(--aa-bg-2);
  border: 0.5px solid var(--aa-border);
  overflow: hidden;
  min-height: 62vh;
}

.product-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 62vh;
  object-fit: cover;
}

.product-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}

.product-copy h1 {
  margin: 0;
  font-family: var(--aa-serif);
  font-size: clamp(32px, 5vw, 48px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.05;
}

.product-copy p {
  margin: 0;
  color: var(--aa-muted);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  max-width: 38ch;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.back-link {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aa-muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--aa-text);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.grid .piece,
.product-stage {
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.grid .piece:nth-child(2) {
  animation-delay: 0.08s;
}

/* try-on overlay (replaces Anywear iframe widget) */
.tryon-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.piece-frame .tryon-wrap,
.product-media .tryon-wrap {
  min-height: inherit;
}

.tryon-btn {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--aa-ui);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0b0b0d;
  background: rgba(221, 216, 204, 0.92);
  border: 0;
  border-radius: var(--aa-radius-btn);
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tryon-btn:hover,
.tryon-btn:focus-visible {
  background: #fff;
  transform: translateX(-50%) translateY(-1px);
}
