/* SAMA HERO + PRODUCT IMAGE POLISH — preview-only, non-destructive. */
/* Customer catalog images fill their frames. Product source images and order artwork are untouched. */
#shop #products .sama-card-image,
body.s4-active #shop #products > .sama-product-card .sama-card-image {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: #f3f6f9;
  border-radius: 12px;
}
#shop #products .sama-card-image > img,
body.s4-active #shop #products > .sama-product-card .sama-card-image > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 0 !important;
}
/* Older fallback catalog card appearance. Do not affect detailed product previews. */
#shop #products .visual:has(img) { padding: 0 !important; min-height: 0; aspect-ratio: 1 / 1; overflow: hidden; }
#shop #products .visual > img { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center !important; border-radius: 0 !important; }

/* Compact main hero: existing text, buttons and decorative photos retained. */
body.s4-active #shop .sama-hero.s4-hero {
  min-height: var(--sama-hero-display-height, 345px) !important;
  height: auto !important;
  padding: clamp(18px, 2.3vw, 32px) !important;
  column-gap: clamp(14px,2vw,30px);
}
body.s4-active #shop .s4-hero h2 {
  font-size: clamp(25px, 2.65vw, 40px);
  line-height: 1.39;
  margin: 8px 0 12px;
}
body.s4-active #shop .s4-hero p { line-height: 1.7; margin-bottom: 17px; }
body.s4-active #shop .sama-hero-art { min-height: 265px; max-height: 280px; }
body.s4-active #shop .s4-photo-grid { overflow: visible; }
body.s4-active #shop .s4-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
body.s4-active #shop .s4-photo[hidden] { display:none!important; }
@media (max-width:700px) {
  body.s4-active #shop .sama-hero.s4-hero { min-height: 0 !important; padding: 21px 17px!important; row-gap: 4px; }
  body.s4-active #shop .s4-hero h2 { font-size: clamp(22px,5.8vw,30px); margin: 8px 0; }
  body.s4-active #shop .s4-hero p { margin-bottom: 13px; }
  body.s4-active #shop .sama-hero-art { min-height: 185px!important; max-height: 200px!important; }
}

/* Admin-only form, inserted only after verified admin login. */
#samaHeroPhotosEditor { border:1px solid #d4dfe8; background: #fff; padding: 15px; border-radius: 14px; margin: 16px 0; }
#samaHeroPhotosEditor[hidden] { display:none!important; }
#samaHeroPhotosEditor h3 { margin: 0 0 8px; }
#samaHeroPhotosEditor .shp-intro { font-size: 13px; color:#526677; line-height:1.9; }
#samaHeroPhotosEditor .shp-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:13px 0; }
#samaHeroPhotosEditor .shp-item { border:1px solid #dae3ec; padding:11px; border-radius:12px; min-width:0; }
#samaHeroPhotosEditor .shp-item img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:10px; background:#eef2f6; }
#samaHeroPhotosEditor .shp-item img[hidden] { display:none; }
#samaHeroPhotosEditor label { display:block; font-size:13px; margin:9px 0; }
#samaHeroPhotosEditor input[type=file] { max-width:100%; font-size:12px; padding:7px; }
#samaHeroPhotosEditor .shp-actions { display:flex; flex-wrap:wrap; gap:6px; }
#samaHeroPhotosEditor .shp-actions button { font-size:12px; min-height:32px; padding:6px 9px; }
#samaHeroPhotosEditor .shp-toolbar { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
#samaHeroPhotosEditor .shp-toolbar button { min-height:38px; }
#samaHeroPhotosEditor .shp-height-value { font-weight:bold; min-width:64px; }
#samaHeroPhotosEditor .shp-status { color:#165e5d; min-height:24px; font-weight:bold; font-size:13px; }
@media (max-width:750px) { #samaHeroPhotosEditor .shp-grid { grid-template-columns:1fr; } }

/* Hero editor repair: visible at TOP, readonly until admin claim is verified. */
#samaHomeEditor #samaHeroPhotosEditor { margin:16px 0 20px; border:2px solid #c6d7e4; background:#fbfdff; }
#samaHomeEditor #samaHeroPhotosEditor.shp-locked .shp-grid,
#samaHomeEditor #samaHeroPhotosEditor.shp-locked .shp-toolbar {opacity:.53;pointer-events:none;}
#samaHomeEditor #samaHeroPhotosEditor.shp-locked .shp-status {color:#a96b00!important;}
