/* =========================================================
   CARTE PRODUIT V2 — COMPOSANT GLOBAL
   ========================================================= */

:root {
  --v2-line: #ebe7ee;
  --v2-purple: #7B72F2;
  --v2-purple-soft: #eeeaff;
  --v2-purple-dark: #5f54d8;
}

/* ---------- GRILLE PRODUITS ---------- */

.home-v2-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 18px;
}

/* ---------- CARTE PRODUIT ---------- */

.reko-card-v2 {
  min-width: 0;
  overflow: hidden;
  position: relative;
  background: #fff;
  border: 1px solid var(--v2-line);
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(35, 26, 37, .045);
  transition: transform .2s ease, box-shadow .2s ease;
}

.reko-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(35, 26, 37, .08);
}

.reko-card-v2__media {
  position: relative;
  aspect-ratio: 1 / .94;
  overflow: hidden;
  background: #f5f3f4;
}

.reko-card-v2__image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.reko-card-v2__media .reko-card-v2__image-link img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  transition: transform .3s ease;
}

.reko-card-v2:hover .reko-card-v2__image-link img {
  transform: scale(1.025);
}

.reko-card-v2__like-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

.reko-card-v2__like-wrap .like-form {
  position: static !important;
  width: 100%;
  height: 100%;
  margin: 0;
}

.reko-card-v2__like-wrap .like-btn {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #252225;
}

.reko-card-v2__like-wrap .reko-heart-full {
  color: var(--v2-purple);
}

.reko-card-v2__promo {
  position: absolute;
  left: 9px;
  top: 9px;
  bottom: auto;
  z-index: 4;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--v2-purple-dark);
  font-size: 10px;
  font-weight: 600;
}

.reko-card-v2__body {
  position: relative;
  padding: 28px 12px 12px;
}

.reko-card-v2__author {
  position: absolute;
  top: -10px;
  left: 10px;
  max-width: calc(100% - 20px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  color: #292529;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,.98);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.reko-card-v2__author img {
  flex: 0 0 auto;
  width: 30px !important;
  height: 30px !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  object-fit: cover;
}

.reko-card-v2__author span {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reko-card-v2__details h3 {
  margin: 4px 0 0;
  color: #1d1b1d;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.reko-card-v2__details h3 a {
  color: inherit;
  text-decoration: none;
}

.reko-card-v2__brand {
  margin: 2px 0 0;
  color: #8b878b;
  font-size: 13px;
  line-height: 1.2;
}

.reko-card-v2__footer {
  min-height: 39px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reko-card-v2__price {
  flex: 0 0 auto;
  color: #171517;
  font-size: 17px;
  line-height: 1;
}

.reko-card-v2__cta {
  min-width: 0;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  background: var(--v2-purple-soft);
  color: var(--v2-purple-dark) !important;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

.reko-card-v2__cta:hover {
  background: var(--v2-purple);
  color: #fff !important;
}

/* ---------- TABLETTE ---------- */

@media (max-width: 960px) {
  .home-v2-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- MOBILE ---------- */

@media (max-width: 720px) {
  .home-v2-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 8px;
  }

  .reko-card-v2 {
    border-radius: 12px;
  }

  .reko-card-v2__media {
    aspect-ratio: 1 / 1.03;
  }

.reko-card-v2__like-wrap {
  top: 7px;
  right: 7px;
  width: 30px;
  height: 30px;
}

.reko-card-v2__like-wrap .like-btn {
  font-size: 20px;
}

.reko-heart-empty {
  color: #2b292d;
}

.reko-heart-full {
  color: #ff4f87;
}

.reko-card-v2__promo {
  position: absolute;
  top: 10px;
  left: 10px;
  bottom: auto;
  z-index: 3;
}

  .reko-card-v2__body {
    padding: 25px 9px 9px;
  }

  .reko-card-v2__author {
    top: -8px;
    left: 7px;
    gap: 4px;
    padding: 3px 7px 3px 3px;
    font-size: 9.5px;
  }

  .reko-card-v2__author img {
    width: 28px !important;
    height: 28px !important;
  }

  .reko-card-v2__author span {
    max-width: 92px;
  }

  .reko-card-v2__details h3 {
    font-size: 13px;
    line-height: 1.2;
  }

  .reko-card-v2__brand {
    margin-top: 2px;
    font-size: 11px;
  }

  .reko-card-v2__footer {
    min-height: 34px;
    margin-top: 7px;
  }

  .reko-card-v2__price {
    font-size: 14px;
  }

  .reko-card-v2__cta {
    padding: 7px 9px;
    font-size: 10px;
  }
}

@media (max-width: 370px) {
  .reko-card-v2__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .reko-card-v2__cta {
    width: 100%;
  }
}

.reko-card-v2 {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.reko-card-v2__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.reko-card-v2__details {
  flex: 1;
}

.reko-card-v2__footer {
  margin-top: auto;
}

.home-v2-product-grid {
  align-items: stretch;
}

.home-v2-product-grid > * {
  height: 100%;
}

.home-v2 .reko-card-v2__promo {
  top: 9px;
  left: 9px;
  right: auto;
  bottom: auto;
  width: auto;
  height: auto;
}

@media (max-width: 720px) {
  .home-v2 .reko-card-v2__promo {
    top: 10px;
    left: 10px;
    right: auto;
    bottom: auto;
  }
}
