/* SavorIP artwork detail UX R3.1
   Isolated compatibility layer. Existing desktop/mobile theme files stay untouched. */
.quick-passport-actions [hidden] { display: none !important; }

.product-art-choice {
  border: 1px solid #ded3bd !important;
  border-radius: 14px !important;
  color: #123c31 !important;
}
.product-art-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
  padding: 0 8px 8px;
}
.product-art-actions button {
  min-height: 36px;
  padding: 7px;
  border: 1px solid #0b3c30;
  border-radius: 9px;
  background: #0b3c30;
  color: #f5d67c;
  font-size: 9.5px;
  font-weight: 900;
  cursor: pointer;
}
.product-art-actions .product-art-detail {
  display: block;
  margin: 0;
  padding: 7px;
  color: #0b3c30;
  background: #fffaf0;
}
.product-art-actions button:focus-visible {
  outline: 3px solid #edc86d;
  outline-offset: 2px;
}

.art-card-actions { grid-template-columns: 1fr; }
html.art-detail-open,
body.art-detail-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}
body.art-detail-open {
  position: fixed !important;
  left: 0;
  right: 0;
  width: 100%;
}
.art-detail-dialog {
  max-height: calc(100dvh - 32px);
  overscroll-behavior: contain;
}
.art-detail-dialog[open] {
  overflow: hidden;
}
.art-detail-copy {
  align-self: stretch;
  min-height: 0;
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.art-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 14px;
}
.art-detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e9dfcb;
  color: #805b16;
  font-size: 10px;
  font-weight: 900;
}
.art-detail-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin: 0 0 14px;
}
.art-detail-facts > div {
  display: grid;
  grid-template-columns: minmax(76px,.72fr) minmax(0,1.28fr);
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid #d8cebc;
}
.art-detail-facts dt,
.art-detail-facts dd {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}
.art-detail-facts dt {
  color: #946713;
  font-weight: 900;
}
.art-detail-facts dd {
  color: #435a52;
  font-weight: 700;
}
.art-detail-section {
  padding: 13px 0;
  border-top: 1px solid #d8cebc;
}
.art-detail-section small {
  display: block;
  margin-bottom: 7px;
  color: #946713;
  font-size: 10px;
  font-weight: 900;
}
.art-detail-section p {
  margin: 0;
  color: #435a52;
  font-size: 12px;
  line-height: 1.72;
  white-space: pre-line;
}
.art-detail-section .art-detail-story {
  max-height: none;
  overflow: visible;
}
.art-detail-guide {
  display: block;
  margin-top: 15px;
  padding: 12px;
  border-radius: 10px;
  background: #ebe3d5;
  color: #53665e;
  font-size: 10px;
  line-height: 1.55;
}
.art-detail-visual {
  position: relative;
  cursor: zoom-in;
  overflow: auto;
}
.art-detail-visual > span {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(3,43,34,.86);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.art-detail-visual.is-zoomed {
  cursor: zoom-out;
  place-items: start center;
}
.art-detail-visual.is-zoomed img {
  width: auto;
  max-width: none;
  max-height: none;
  min-width: 150%;
}
.art-detail-actions {
  grid-template-columns: 1fr 1fr;
}
.art-detail-actions button,
.art-detail-actions a {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid #b89755;
  border-radius: 12px;
  color: #0a342a;
  background: #fffdf8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.art-detail-actions .art-detail-primary {
  background: #edc86d;
  color: #082a21;
}
.art-detail-actions .art-detail-secondary {
  background: #063126;
  color: #fff;
  border-color: #063126;
}
.art-detail-actions .art-detail-full {
  grid-column: 1 / -1;
  background: #fffdf8;
  color: #0a342a;
  border-color: #c7b898;
}
.art-detail-actions button:focus-visible,
.art-detail-actions a:focus-visible {
  outline: 3px solid #edc86d;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .product-art-actions {
    gap: 5px;
    margin-top: 6px;
    padding: 0 6px 6px;
  }
  .product-art-actions button {
    min-height: 34px;
    padding: 5px 3px;
    font-size: 8.5px;
  }
}

@media (max-width: 760px) {
  .art-detail-dialog[open] {
    max-height: 100dvh !important;
    overflow: hidden !important;
  }
  .art-detail-visual {
    flex: 0 0 min(48dvh, 430px) !important;
  }
  .art-detail-copy {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding-bottom: max(28px, env(safe-area-inset-bottom)) !important;
  }
  .art-detail-facts {
    grid-template-columns: 1fr;
    margin-bottom: 8px;
  }
  .art-detail-facts > div {
    padding: 7px 0;
  }
  .art-detail-section {
    padding: 10px 0;
  }
  .art-detail-section p {
    font-size: 11px;
    line-height: 1.6;
  }
  #artGrid .art-card-actions {
    grid-template-columns: 1fr !important;
  }
  .art-detail-actions {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .art-detail-actions button,
  .art-detail-actions a {
    min-height: 43px;
    padding: 7px 5px;
    font-size: 10px;
  }
  .art-detail-visual.is-zoomed img {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 170% !important;
  }
  .art-detail-visual.is-zoomed > span {
    position: sticky;
    left: 12px;
    bottom: 12px;
    transform: none;
  }
}
