/* Product cards ("Similar products"; later category pages and the homepage) and the shared price block. */

.yms-card-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem;
  margin: 0; padding: 0; list-style: none;
}
.yms-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--yms-white); border: 1px solid #ece9e4; border-radius: 12px; overflow: hidden;
}
.yms-card__media {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1;
  background: var(--yms-surface); overflow: hidden;
}
.yms-card__media img { width: 72%; height: 72%; object-fit: contain; mix-blend-mode: multiply; transition: transform 0.25s ease; }
.yms-card:hover .yms-card__media img { transform: scale(1.03); }
.yms-card__no-image { width: 40%; aspect-ratio: 1; border-radius: 50%; background: #ebe8e2; }
.yms-card__badge {
  position: absolute; left: 1.9rem; bottom: 2.6rem;
  padding: 0.2rem 0.85rem; border-radius: 999px;
  background: var(--yms-ink); color: var(--yms-white); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em;
}
.yms-card__body { display: flex; flex-direction: column; gap: 0.9rem; flex: 1; padding: 1.25rem 2rem 1.75rem; }
.yms-card__title {
  margin: 0; font-size: 1.0625rem; font-weight: 700; line-height: 1.35; letter-spacing: 0.02em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em;
}
.yms-card__title a { color: var(--yms-grey-900); text-decoration: none; }
.yms-card__title a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.yms-card__swatches { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.yms-card__swatches li:nth-child(n+5):not(.yms-card__more) { display: none; }
.yms-card__swatches a {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 2px;
  border: 1px solid #dcd8d2; border-radius: 4px; background: var(--yms-white);
  font-size: 0.75rem; font-weight: 600; color: var(--yms-grey-800); text-decoration: none;
}
.yms-card__swatches a:hover { border-color: var(--yms-grey-900); }
.yms-card__swatches img { width: 100%; height: 100%; object-fit: contain; }
.yms-card .yms-price { margin-top: auto; }

/* Price block (cards, product page, required adaptor) */
.yms-price { display: grid; gap: 0.35rem; }
.yms-price__row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3rem 0.6rem; }
.yms-price__label { color: #807a80; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.yms-price__label small { font-size: inherit; text-transform: none; }
.yms-price__mrp { color: #8b858b; font-size: 0.8125rem; text-decoration-thickness: 1px; }
.yms-price__badge {
  display: inline-flex; align-items: center; padding: 0.15rem 0.45rem; border-radius: 4px;
  background: #ffe1b2; color: #191919; font-size: 0.75rem; font-weight: 700; line-height: 1.25; letter-spacing: 0.02em;
}
.yms-price__badge[hidden] { display: none; }
.yms-price__offer { color: #171717; font-size: 1.375rem; font-weight: 750; line-height: 1.2; letter-spacing: -0.01em; }

@media (max-width: 989px) {
  .yms-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.125rem 0.75rem; }
  .yms-card__body { padding: 1rem 1rem 1.25rem; }
  .yms-card__badge { left: 0.75rem; bottom: 0.75rem; }
  .yms-card__swatches li:nth-child(n+3):not(.yms-card__more) { display: none; }
}
@media (max-width: 749px) {
  .yms-card__title { font-size: 0.9375rem; }
  .yms-price__offer { font-size: 1.1875rem; }
}
