/* Full-image cards with crisp type, solid actions and a quiet hover lift. */
body[data-site-theme] .marketplace-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 410px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d5ccbb;
  border-radius: 16px;
  background: #211f1b;
  color: #fff;
  box-shadow: 0 6px 18px #2b241512;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
body[data-site-theme] .marketplace-card.clickable-card,
body[data-site-theme] a.marketplace-card { cursor: pointer; }
body[data-site-theme] .marketplace-card > .card-media,
body[data-site-theme] .marketplace-card > img,
body[data-site-theme] .marketplace-card > a:has(> img) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  margin: 0;
  z-index: 0;
}
body[data-site-theme] .marketplace-card .card-media img,
body[data-site-theme] .marketplace-card > img,
body[data-site-theme] .marketplace-card > a > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: transform .45s ease;
}
body[data-site-theme] .marketplace-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, #17161200 12%, #17161235 36%, #171612e8 65%, #171612 100%);
}
body[data-site-theme] .marketplace-card > :is(.card-body, .pad, .journal-card-body, .account-saved-body) {
  position: relative;
  z-index: 2;
  margin: 130px 0 0;
  padding: 22px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #fff;
}
body[data-site-theme] .marketplace-card :is(h2, h3, b, strong, .price) {
  color: #fff;
  text-shadow: none;
}
body[data-site-theme] .marketplace-card h3 { margin: 0 0 8px; line-height: 1.3; }
body[data-site-theme] .marketplace-card :is(.sub, .rating, .bulk, .research-note, .pad small, .journal-card-body p, .journal-card-meta, .journal-category, .account-form-help, .banner p) { color: #e3dfd7; }
body[data-site-theme] .marketplace-card .account-saved-body a { color: #fff; }
body[data-site-theme] .marketplace-card > .card-body p { color: #e3dfd7; }
body[data-site-theme] .marketplace-card .old { color: #c4beb1; }
body[data-site-theme] .marketplace-card .avail { color: #d2d8be; }
body[data-site-theme] .marketplace-card .research-note {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 10px 0 16px;
  line-height: 1.6;
}
body[data-site-theme] .marketplace-card .card-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body[data-site-theme] .marketplace-card :is(a.btn, a.btn-primary, button.btn, button.btn-primary) {
  position: relative;
  z-index: 2;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border: 1px solid #666157;
  border-radius: 9px;
  background: #2a2823;
  color: #fff;
  text-shadow: none;
  box-shadow: none;
  white-space: normal;
  line-height: 1.35;
  transition: background .18s ease, border-color .18s ease;
}
body[data-site-theme] .marketplace-card :is(a.btn-primary, button.btn-primary) {
  border-color: #f4e5c2;
  background: #f4e5c2;
  color: #302715;
}
body[data-site-theme] .marketplace-card .card-actions > a { flex: 1 1 100%; }
body[data-site-theme] .marketplace-card :is(a.btn, button.btn):hover { background: #3b3830; border-color: #b6a885; }
body[data-site-theme] .marketplace-card :is(a.btn-primary, button.btn-primary):hover { background: #e7cd91; border-color: #e7cd91; }
body[data-site-theme] .marketplace-card > .basket-add { position: relative; z-index: 2; margin: 0 22px 22px; }
body[data-site-theme] .marketplace-card .research-image-label {
  top: 14px;
  bottom: auto;
  left: 14px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 5px;
  background: #24221d;
  color: #f5f0e6;
}
body[data-site-theme] .marketplace-card .heart { z-index: 2; }
body[data-site-theme] .marketplace-card .badge { z-index: 2; }
body[data-site-theme] :is(.service-tile, .gift-card).marketplace-card { min-height: 280px; height: 100%; }
body[data-site-theme] :is(.service-tile, .gift-card).marketplace-card > .pad { margin-top: 135px; padding: 18px; min-height: 0; }
body[data-site-theme] .marketplace-card:focus-visible,
body[data-site-theme] .marketplace-card:focus-within { outline: 3px solid #b88d34; outline-offset: 4px; }
body[data-site-theme] .marketplace-card[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  body[data-site-theme] .marketplace-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px #2b241525; border-color: #b99a5c; }
  body[data-site-theme] .marketplace-card:hover .card-media img,
  body[data-site-theme] .marketplace-card:hover > img,
  body[data-site-theme] .marketplace-card:hover > a > img { transform: scale(1.025); }
}
@media (max-width: 720px) {
  body[data-site-theme] .marketplace-card { min-height: 390px; }
  body[data-site-theme] .marketplace-card > :is(.card-body, .pad, .journal-card-body, .account-saved-body) { padding: 20px; }
  body[data-site-theme] :is(.service-tile, .gift-card).marketplace-card { min-height: 255px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-site-theme] .marketplace-card,
  body[data-site-theme] .marketplace-card:hover,
  body[data-site-theme] .marketplace-card img,
  body[data-site-theme] .marketplace-card:hover img { transform: none; transition: none; }
}

/* Keep the card surface brief; full details remain in pages and dialogs. */
body[data-site-theme] .compact-card:not([data-card-expanded]) :is(.rating, .old, .offer, .avail, .tags, .badge, .research-note, .bulk) { display: none; }
body[data-site-theme] .compact-card:not([data-card-expanded]).service-tile .pad small,
body[data-site-theme] .compact-card:not([data-card-expanded]).journal-card p,
body[data-site-theme] .compact-card:not([data-card-expanded]).journal-card .journal-card-meta,
body[data-site-theme] .compact-card:not([data-card-expanded]).banner p,
body[data-site-theme] .compact-card:not([data-card-expanded]).package :is(p, ul),
body[data-site-theme] .compact-card:not([data-card-expanded]).product-card .pad > p:not(.sub) { display: none; }
body[data-site-theme] .compact-card:not([data-card-expanded]) :is(h2, h3) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
body[data-site-theme] .compact-card:not([data-card-expanded]) :is(.sub, .account-form-help) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body[data-site-theme] .marketplace-card.compact-card:not([data-card-expanded]) { min-height: 340px; }
body[data-site-theme] .marketplace-card.compact-card:not([data-card-expanded]) .card-actions { margin-top: 16px; }
body[data-site-theme] :is(.service-tile, .gift-card).marketplace-card.compact-card:not([data-card-expanded]) { min-height: 250px; }
@media (max-width: 720px) {
  body[data-site-theme] .marketplace-card.compact-card:not([data-card-expanded]) { min-height: 320px; }
  body[data-site-theme] :is(.service-tile, .gift-card).marketplace-card.compact-card:not([data-card-expanded]) { min-height: 235px; }
}
