/* Product galleries retain their row. Model-card badge layout follows the card orientation. */
.ysp-new-badge{background:#000;color:#fff;font:600 14px/1.5 Montserrat,sans-serif;border-radius:3px;padding:4px 8px;pointer-events:none}
.ysp-photo-badges{display:flex;flex-wrap:wrap;align-items:center;gap:6px;grid-column:1/-1;flex-shrink:0;padding:12px 12px 0}
.ysp-photo-badges:not(:has(> :not([hidden]))){display:none}
.ysp-photo-badges>.ysp-new-badge,.ysp-photo-badges>.ysp-sale-badge{position:static;flex:none;max-width:100%;font:600 14px/1.5 Montserrat,sans-serif;white-space:normal}
.ysp-native-gallery>.ysp-photo-badges{padding:0 0 12px}
.prod-thumb>.ysp-photo-badges{padding:0 0 10px}
.ysp-new-badge[hidden]{display:none}
@media(max-width:767px){.ysp-photo-badges>.ysp-new-badge,.ysp-photo-badges>.ysp-sale-badge{font-size:14px}}

/* One badge group: photo overlay on vertical cards, right column on horizontal cards.
   Hidden groups collapse; wrapping is intrinsic and never covers product text. */
.ysp-model-card>.ysp-photo-badges{position:absolute;inset:12px 12px auto;z-index:2;padding:0;pointer-events:none}
.ysp-model-card>.ysp-photo-badges>span{min-width:0;overflow-wrap:anywhere}
@media(max-width:767px){
 .ysp-model-card>.ysp-photo-badges{position:static;grid-column:2;grid-row:1;align-self:start;justify-content:flex-start;padding:12px 14px 0 6px;z-index:auto}
 .ysp-model-card>.ysp-card-image{grid-column:1;grid-row:1 / span 2}
 .ysp-model-card>.ysp-card-body{grid-column:2;grid-row:2}
 .ysp-model-card:has(>.ysp-photo-badges>:not([hidden]))>.ysp-card-body{padding-top:12px}
}
