/* ============================================
   Anchors — Product image styles
   Admin thumbnail, catalog card image, detail hero,
   admin upload widget + preview.
   ============================================ */

/* ===== Admin: thumbnail in products table ===== */
.admin-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: block;
}
.admin-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ===== Admin: image upload field with current preview ===== */
.image-field-current {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 10px;
}
.image-field-current img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: block;
  flex-shrink: 0;
}
.image-field-current-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.image-field-current-meta .label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== Catalog: image area in shop card ===== */
.shop-card {
  display: flex;
  flex-direction: column;
}
.shop-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line);
}
.shop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.shop-card:hover .shop-card-img img {
  transform: scale(1.04);
}
.shop-card-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.shop-card-img.placeholder .cat-sketch,
.product-image-hero.placeholder .cat-sketch {
  width: 100%;
  height: 100%;
  display: block;
}

.product-image-hero.placeholder {
  padding: 22px;
}
/* legacy .ph-mark / .ph-grid removed — placeholder uses category_sketch.html SVG */

/* ===== Product detail: hero image ===== */
.product-image-hero {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--paper-warm);
  margin-bottom: 28px;
  position: relative;
}
.product-image-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-image-hero.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Gated price — guest / pending-approval doctor ===== */
.price-locked {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-transform: none;
  white-space: nowrap;
}
a.price-locked-link {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
a.price-locked-link:hover { opacity: 0.72; }

/* ===== Pending-approval banner (logged-in, not yet approved) ===== */
.approval-banner {
  background: var(--blue-soft, #E1ECF7);
  border-bottom: 1px solid var(--line, #D5DFE8);
  color: var(--ink, #13202C);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  padding: 10px 20px;
}

/* ===== Toast notification (slide-in, auto-dismiss) ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 24px);
  z-index: 9999;
  max-width: min(92vw, 440px);
  padding: 13px 20px;
  border-radius: 10px;
  background: var(--ink, #13202C);
  color: var(--paper, #FFFFFF);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity .28s ease, transform .32s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}
.toast-show { opacity: 1; transform: translate(-50%, 0); }
.toast-warn { background: var(--terra, #B8472D); color: #fff; }

/* Flag the upload zone when a required file is missing */
.file-drop.needs-file {
  border-color: var(--terra, #B8472D) !important;
  background: rgba(184, 71, 45, 0.06);
  animation: needsFileShake .4s ease;
}
@keyframes needsFileShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  60% { transform: translateX(5px); }
}
