/* Regalos Ary - Archive Shop Clean Layer
   Capa limpia y scoped para /tienda/ y product_cat.
   No toca single product ni otros loops.
*/

body.post-type-archive-product ul.products.rg-grid,
body.tax-product_cat ul.products.rg-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.post-type-archive-product ul.products.rg-grid li.rg-card,
body.tax-product_cat ul.products.rg-grid li.rg-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #FFF8FB;
  border: 1px solid rgba(0, 0, 0, .06);
  transition: transform .15s ease, box-shadow .15s ease;
}

@media (hover:hover) {
  body.post-type-archive-product ul.products.rg-grid li.rg-card:hover,
  body.tax-product_cat ul.products.rg-grid li.rg-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
  }
}

body.post-type-archive-product .rg-card__media,
body.tax-product_cat .rg-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f8fafc;
}

body.post-type-archive-product .rg-card__media .ct-media-container,
body.tax-product_cat .rg-card__media .ct-media-container {
  display: block;
  width: 100%;
  height: 100%;
}

body.post-type-archive-product .rg-card__media img,
body.tax-product_cat .rg-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

body.post-type-archive-product .rg-badge--sale,
body.tax-product_cat .rg-badge--sale {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

body.post-type-archive-product .rg-card__title,
body.tax-product_cat .rg-card__title {
  margin: 12px 12px 6px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.5em;
}

body.post-type-archive-product .rg-card__title a,
body.tax-product_cat .rg-card__title a {
  color: inherit;
  text-decoration: none;
}

body.post-type-archive-product .rg-card__price,
body.tax-product_cat .rg-card__price {
  margin: 0 12px 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

body.post-type-archive-product .rg-card__price del,
body.tax-product_cat .rg-card__price del {
  opacity: .65;
}

body.post-type-archive-product .rg-card__price ins,
body.tax-product_cat .rg-card__price ins {
  text-decoration: none;
  font-weight: 900;
}

body.post-type-archive-product .rg-card__actions,
body.tax-product_cat .rg-card__actions {
  margin-top: auto;
  padding: 0 12px 12px;
}

body.post-type-archive-product .rg-card__actions a.rg-btn,
body.tax-product_cat .rg-card__actions a.rg-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  text-align: center;
  font-weight: 800;
  border-radius: 14px;
}

@media (prefers-color-scheme: dark) {
  body.post-type-archive-product ul.products.rg-grid li.rg-card,
  body.tax-product_cat ul.products.rg-grid li.rg-card {
    background: #FFF8FB !important;
    border-color: rgba(0, 0, 0, .06) !important;
    color: var(--color-texto, #333333) !important;
  }

  body.post-type-archive-product .rg-card__media,
  body.tax-product_cat .rg-card__media {
    background: #f8fafc !important;
  }

  body.post-type-archive-product .rg-card__title,
  body.post-type-archive-product .rg-card__price,
  body.tax-product_cat .rg-card__title,
  body.tax-product_cat .rg-card__price {
    color: var(--color-texto, #333333) !important;
  }
}
