/* Artwork page (/art/?p=<piece-id>) — from design/Artwork-Example.dc.html */

/* ---------- Product ---------- */
.art-product { padding: clamp(28px, 3vw, 44px) var(--gutter) clamp(72px, 8vw, 120px); }
.art-product__inner { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }

.art-crumbs { font-size: 13px; letter-spacing: 0.08em; color: var(--blue-muted); overflow-wrap: anywhere; }
.art-crumbs a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--blue-muted); transition: color .25s ease-out;
}
.art-crumbs a:hover { color: var(--gold); }

.art-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: clamp(36px, 4.4vw, 72px); }

/* Images */
.art-media { flex: 1.45 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
/* The stage takes the piece's own shape (--ar is set from the image), so the
   artwork is never cropped here; tall pieces are capped at ~80% of the screen height. */
.art-stage {
  --ar: 3 / 2;
  position: relative; aspect-ratio: var(--ar); width: 100%;
  max-width: calc(80vh * (var(--ar))); margin: 0 auto;
  overflow: hidden; border-radius: 14px;
  background: #0A1A40; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
}
.art-stage__img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  transition: transform .8s var(--ease), opacity .4s ease-out;
}
.art-stage.is-contain .art-stage__img { object-fit: contain; }
.art-stage.is-loading .art-stage__img { opacity: 0; }
.art-stage.is-loading::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0) 70%);
  background-size: 200% 100%; animation: artShimmer 1.4s ease-in-out infinite;
}
@keyframes artShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.art-views { display: flex; gap: 12px; flex-wrap: wrap; }
.art-view {
  width: 104px; aspect-ratio: 3 / 2; padding: 0; overflow: hidden; border-radius: 8px;
  border: 2px solid rgba(191, 230, 238, 0.25); background: #0A1A40; cursor: pointer;
  transition: border-color .25s ease-out;
}
.art-view:hover { border-color: rgba(227, 192, 137, 0.6); }
.art-view[aria-pressed="true"] { border-color: var(--gold); }
.art-view img { display: block; width: 100%; height: 100%; object-fit: cover; }
.art-view.is-contain img { object-fit: contain; }

/* Purchase panel */
.art-panel { flex: 1 1 380px; min-width: min(340px, 100%); display: flex; flex-direction: column; gap: 22px; }
.art-head { display: flex; flex-direction: column; gap: 6px; }
.art-head__collection {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--gold);
  text-decoration: none; transition: color .25s ease-out;
}
.art-head__collection:hover { color: #F6E2B8; }
.art-head__title { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 3.8vw, 58px); line-height: 1.02; overflow-wrap: anywhere; }
.art-head__meta { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--blue-muted); }
.art-desc { margin: 0; color: var(--blue-soft); }

.art-skel { display: inline-block; border-radius: 8px; background: rgba(255, 255, 255, 0.08); }
.art-skel--title { width: 70%; height: 0.9em; }

/* Tabs */
.art-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; border-radius: 28px;
  border: 1px solid var(--gold-line-strong); background: rgba(6, 20, 58, 0.5);
}
.art-tabs__tab {
  min-height: 48px; padding: 4px 10px; border-radius: 24px; border: 0; background: transparent; color: var(--cream);
  font-size: 14px; letter-spacing: 0.04em; line-height: 1.25; cursor: pointer;
  transition: background-color .25s ease-out, color .25s ease-out;
}
.art-tabs__tab:hover { background: rgba(245, 241, 232, 0.1); }
.art-tabs__tab[aria-selected="true"] { background: var(--cream); color: var(--navy); }
.art-tabpanel { display: flex; flex-direction: column; gap: 20px; }
.art-tabpanel[hidden] { display: none; }
.art-small { margin: 0; font-size: 15px; color: var(--blue-soft); }

.art-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.art-fieldset legend {
  margin-bottom: 10px; padding: 0; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
}
.art-opts { display: flex; flex-direction: column; gap: 10px; }
.art-opts--2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt { position: relative; display: block; cursor: pointer; }
.opt__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt__body {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 8px 18px;
  border-radius: 12px; border: 1px solid rgba(191, 230, 238, 0.25); background: rgba(255, 255, 255, 0.03);
  color: var(--cream); font-size: 15px; line-height: 1.3;
  transition: border-color .25s ease-out, background-color .25s ease-out;
}
.art-opts--2 .opt__body { justify-content: center; text-align: center; padding: 8px 14px; }
.opt:hover .opt__body { border-color: rgba(227, 192, 137, 0.6); }
.opt__input:checked + .opt__body { border-color: var(--gold); background: rgba(227, 192, 137, 0.12); }
.opt__input:focus-visible + .opt__body { outline: 2px solid var(--gold); outline-offset: 3px; }
.opt__price { font-family: var(--serif); font-size: 21px; }

.art-total {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px;
  padding-top: 16px; border-top: 1px solid rgba(212, 178, 106, 0.25);
}
.art-total__label { font-size: 15px; color: var(--blue-soft); }
.art-total__price { font-family: var(--serif); font-size: 44px; line-height: 1; }

.art-buy { min-height: 56px; border-radius: 28px; font-size: 16px; letter-spacing: 0.06em; }
.art-status { margin: -8px 0 0; font-size: 14px; color: var(--aqua); }
.art-status:empty { display: none; }
.art-status a { color: var(--cream); transition: color .25s ease-out; }
.art-status a:hover { color: var(--gold); }
.art-note { margin: 0; font-size: 14px; color: var(--blue-muted); }

.link-soft { color: var(--blue-soft); transition: color .25s ease-out; }
.link-soft:hover { color: var(--gold); }

/* License stepper */
.art-here {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px;
  border-radius: 12px; border: 1px solid rgba(191, 230, 238, 0.3);
}
.art-here__text { display: flex; flex-direction: column; font-size: 15px; }
.art-here__sub { font-size: 13px; color: var(--blue-muted); }
.stepper {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; min-height: 48px;
  border-radius: 24px; background: var(--cream); color: var(--navy); flex: none;
}
.stepper__btn {
  width: 44px; height: 44px; border-radius: 22px; border: 0; background: transparent; color: var(--navy);
  font-size: 22px; line-height: 1; cursor: pointer; transition: background-color .25s ease-out;
}
.stepper__btn:hover { background: rgba(6, 20, 58, 0.1); }
.stepper__btn:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.stepper__btn[disabled], .stepper__btn[aria-disabled="true"] { opacity: .35; cursor: not-allowed; background: transparent; }
.stepper__val { min-width: 26px; text-align: center; font-size: 17px; font-weight: 500; }

.art-calc { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.art-calc__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 15px; }
.art-calc__k { color: var(--blue-soft); }
.art-calc__rate { color: var(--gold); }
.art-calc__row--sum { align-items: baseline; padding-top: 10px; border-top: 1px solid rgba(212, 178, 106, 0.25); }
.art-calc__sum { font-family: var(--serif); font-size: 34px; line-height: 1; }

.art-keep {
  align-self: center; display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; color: var(--cream); transition: color .25s ease-out;
}
.art-keep:hover { color: var(--gold); }

/* ---------- Details band ---------- */
.art-details { background: var(--navy-deep); padding: clamp(64px, 7vw, 100px) var(--gutter); }
.art-details__grid {
  max-width: 1320px; margin: 0 auto; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 32px;
}
.art-detail { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(212, 178, 106, 0.4); }
.art-detail__k { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.art-detail__v { color: var(--blue-soft); }

/* ---------- More from the collection ---------- */
.art-more { padding: clamp(72px, 8vw, 120px) var(--gutter); }
.art-more[hidden] { display: none; }
.art-more__inner { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.art-more__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.art-more__head .link-soft { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--cream); }
.art-more__head .link-soft:hover { color: var(--gold); }
.art-more__title { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.1; }
.art-more__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 22px; }
.art-card { display: flex; flex-direction: column; gap: 10px; color: var(--cream); text-decoration: none; transition: color .25s ease-out; }
.art-card:hover { color: var(--gold); }
.art-card__img { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 12px; background: #0A1A40; }
.art-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 2s var(--ease); }
.art-card:hover .art-card__img img, .art-card:focus-visible .art-card__img img { transform: scale(1.04); }
.art-card__title { font-family: var(--serif); font-size: 22px; line-height: 1.25; }

/* ---------- Sticky tray ---------- */
.art-tray {
  position: sticky; bottom: 0; z-index: 30; padding: 14px clamp(16px, 4vw, 56px);
  background: var(--navy-glass); border-top: 1px solid rgba(212, 178, 106, 0.5);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.35); animation: trayIn .25s ease-out;
}
.art-tray[hidden] { display: none; }
@keyframes trayIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.art-tray__inner { max-width: 1320px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.art-tray__text { font-size: 15px; color: var(--blue-soft); }

@media (max-width: 420px) {
  .art-tabs__tab { font-size: 13px; letter-spacing: 0.02em; }
  .art-opts--2 { grid-template-columns: 1fr; }
  .art-here { flex-wrap: wrap; }
  .art-view { width: calc((100% - 24px) / 3); }
}

@media (prefers-reduced-motion: reduce) {
  .art-stage__img, .art-card__img img { transition: none; }
  .art-card:hover .art-card__img img { transform: none; }
  .art-stage.is-loading::before { animation: none; }
  .art-tray { animation: none; }
}
