/* Marketplace product media
   Image-first cards: full photograph visible (no crop), studio negative space,
   compact type. Loaded after page extra_styles so these rules win. */

:root {
  --mp-studio: #f3f6f4;
  --mp-studio-edge: rgba(21, 126, 61, 0.06);
}

/* ---- Listing / related cards ---- */
.product-card {
  display: flex;
  flex-direction: column;
}

.product-card .product-media,
.product-card > a > .relative,
.product-card > .relative {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto !important;
  background: var(--mp-studio);
  border-bottom: 1px solid var(--mp-studio-edge);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  overflow: hidden;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .product-card .product-media,
  .product-card > a > .relative,
  .product-card > .relative {
    padding: 1.05rem;
  }
}

.product-card .product-image,
.product-card img.product-image,
.product-card > a > img.product-image {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  transition: none;
  background: transparent;
  display: block;
}

.product-card:hover .product-image {
  transform: none !important;
}

/* Placeholder well when there is no photo */
.product-card .product-image.bg-green-50\/50,
.product-card div.product-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--mp-studio) !important;
}

/* Compact copy so the photo owns the card */
.product-card > a > .p-4,
.product-card > a > .p-5,
.product-card .p-4,
.product-card .p-5 {
  padding: 0.55rem 0.7rem 0.2rem !important;
}

.product-card h3 {
  font-size: 0.78rem !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  margin-bottom: 0.3rem !important;
  color: #0f172a;
}

.product-card .text-2xl,
.product-card .text-xl,
.product-card .text-lg {
  font-size: 0.88rem !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
}

.product-card .text-sm.line-through {
  font-size: 0.68rem !important;
}

.product-card .px-4.pb-4,
.product-card .px-5.pb-5 {
  padding: 0.35rem 0.7rem 0.7rem !important;
}

.product-card button,
.product-card a.rounded-full {
  font-size: 0.68rem !important;
  padding-top: 0.42rem !important;
  padding-bottom: 0.42rem !important;
}

/* ---- Product detail gallery ---- */
.carousel-container {
  background: var(--mp-studio) !important;
}

.carousel-slide {
  background: var(--mp-studio);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 1.25rem 1.4rem;
  box-sizing: border-box;
}

.carousel-slide img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 0 !important;
}

@media (min-width: 1024px) {
  .carousel-slide {
    aspect-ratio: 4 / 5;
    min-height: 420px;
    max-height: 560px;
    padding: 1.75rem 2rem;
  }
}

/* ---- Hero featured thumbs (landing) ---- */
.hero-product-media {
  background: var(--mp-studio) !important;
  padding: 0.45rem;
  box-sizing: border-box;
}

.hero-product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
}
