/* assets/css/frontend.css */
.mdpe-badge--sale{ --mdpe-badge-bg: rgba(210, 54, 54, .92); }
.mdpe-badge--new{ --mdpe-badge-bg: rgba(34, 113, 177, .92); }
.mdpe-badge--hot{ --mdpe-badge-bg: rgba(245, 158, 11, .92); }
.mdpe-badge--bestseller{ --mdpe-badge-bg: rgba(16, 185, 129, .92); }
.mdpe-badge--custom{ --mdpe-badge-bg: rgba(18, 27, 34, .86); }

/* ---------- Overlay mounting ---------- */
/* Make sure the gallery can host absolute children */
.woocommerce-product-gallery.mdpe-has-overlay,
.product-gallery.mdpe-has-overlay,
.images.mdpe-has-overlay {
  position: relative;
}

/* Overlay layer */
.mdpe-overlay{
  position: absolute;
  z-index: 9;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none; /* overlay doesn't block gallery interactions */
}

/* On smaller screens, tighten spacing */
@media (max-width: 768px){
  .mdpe-overlay{ top: 10px; left: 10px; right: 10px; gap: 8px; }
}

/* ---------- Badges ---------- */
.mdpe-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.mdpe-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .2px;
  background: var(--mdpe-badge-bg, rgba(18, 27, 34, .86));
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
  text-transform: uppercase;
}

/* Optional icon inside badge if you add it later */
.mdpe-badge__icon{
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mdpe-badge__icon svg{ width: 14px; height: 14px; display:block; }

/* Badge variants by type (match your own keys) */
.mdpe-badge--sale{
  background: rgba(210, 54, 54, .92);
  border-color: rgba(255,255,255,.14);
}
.mdpe-badge--new{
  background: rgba(34, 113, 177, .92);
  border-color: rgba(255,255,255,.14);
}
.mdpe-badge--hot{
  background: rgba(245, 158, 11, .92);
  border-color: rgba(255,255,255,.14);
}
.mdpe-badge--bestseller{
  background: rgba(16, 185, 129, .92);
  border-color: rgba(255,255,255,.14);
}

/* ---------- Awards (chips row) ---------- */
.mdpe-awards{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}

/* Premium chip */
.mdpe-award{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.90);
  color: #121b22;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Icon bubble */
.mdpe-award__icon{
  width: 28px;
  height: 28px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 27, 34, .06);
  border: 1px solid rgba(18,27,34,.10);
  flex: 0 0 auto;
}
.mdpe-award__icon svg{
  width: 16px;
  height: 16px;
  display: block;
}

/* Text */
.mdpe-award__text{
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .1px;
}
/* assets/css/frontend.css (append below your existing CSS) */

/* ---------- Features (3-up / responsive) ---------- */
.mdpe-features{
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px){
  .mdpe-features{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px){
  .mdpe-features{ grid-template-columns: 1fr; }
}

.mdpe-feature{
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 14px 14px;
  border-radius: 18px;

  background: rgba(255,255,255,.85);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 26px rgba(0,0,0,.10);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.mdpe-feature:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
  border-color: rgba(34,113,177,.22);
}

.mdpe-feature__icon{
  width: 38px;
  height: 38px;
  border-radius: 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(18, 27, 34, .06);
  border: 1px solid rgba(18,27,34,.10);
  flex: 0 0 auto;
}

.mdpe-feature__icon svg{
  width: 18px;
  height: 18px;
  display: block;
}

.mdpe-feature__text{
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .1px;
  color: #121b22;
}

.mdpe-feature__sub{
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(18,27,34,.70);
  margin-top: 2px;
}

/* Optional: if you output only one text string, you can ignore __sub. */


/* ---------- Advantages (premium list card) ---------- */
.mdpe-advantages{
  margin: 18px 0 0;

  background: rgba(255,255,255,.86);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 22px;

  padding: 16px 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.10);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mdpe-advantages__title{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 4px 2px 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  margin-bottom: 12px;
}

.mdpe-advantages__title strong{
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .18px;
  text-transform: uppercase;
  color: #121b22;
}

.mdpe-advantages__title span{
  font-size: 12.5px;
  color: rgba(18,27,34,.65);
}

.mdpe-advantages__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.mdpe-advantage{
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 10px 10px;
  border-radius: 16px;

  background: rgba(18, 27, 34, .03);
  border: 1px solid rgba(18,27,34,.06);

  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.mdpe-advantage:hover{
  transform: translateY(-1px);
  background: rgba(18, 27, 34, .045);
  border-color: rgba(34,113,177,.18);
}

.mdpe-advantage__icon{
  width: 26px;
  height: 26px;
  border-radius: 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(16,185,129,.10);
  border: 1px solid rgba(16,185,129,.18);

  flex: 0 0 auto;
  margin-top: 1px;
}

.mdpe-advantage__icon svg{
  width: 14px;
  height: 14px;
  display: block;
}

/* If you want to use a checkmark without SVG, you can output a <span>✓</span> and style it */
.mdpe-advantage__icon span{
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
  color: rgba(16,185,129,.95);
}

.mdpe-advantage__text{
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  color: #121b22;
}

.mdpe-advantage__muted{
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(18,27,34,.70);
  margin-top: 2px;
}

@media (max-width: 540px){
  .mdpe-feature__text{ font-size: 13.5px; }
  .mdpe-advantages{ padding: 14px 14px; border-radius: 18px; }
}
/* Tighten chips on mobile */
@media (max-width: 768px){
  .mdpe-award{ padding: 9px 10px; border-radius: 12px; }
  .mdpe-award__text{ font-size: 12.5px; }
}

/* ---------- Defensive: when themes already have a sale badge ---------- */
/* If you want your badges to sit under the native WC sale badge, lower z-index */
.woocommerce-product-gallery .onsale{ z-index: 10; }
.mdpe-overlay{ z-index: 9; }
