/* ==========================================================================
   Section : Notre Selection
   Titre + onglets de filtre, grille de produits avec cards minimalistes.
   La card produit (.tme-prod-card) est reutilisee dans Section Produits
   et Section Vous pourriez aimer — donc tous ses styles ici sont partages.
   ========================================================================== */

.tme-selection{
  background: var(--surface);
  padding: var(--sp-16) 0;
}

/* ── Header de section ───────────────────────────────────── */
.tme-selection__head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--sp-1);
}

.tme-selection__title{
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: var(--fw-bold);
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.tme-selection__tabs{
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
  margin-bottom: -1px;
}

.tme-selection__tab{
  background: none;
  border: none;
  padding: 10px 0;
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.tme-selection__tab:hover{ color: var(--text-body); }
.tme-selection__tab.is-active{
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ── Grille produits ─────────────────────────────────────── */
.tme-selection__grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-4);
  transition: opacity .2s ease;
}
.tme-selection__grid.is-loading{ opacity: .35; }

@media (max-width: 1280px){
  .tme-selection__grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px){
  .tme-selection__grid{ grid-template-columns: repeat(2, 1fr); }
}

.tme-selection__empty{
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--sp-12) 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* ==========================================================================
   Card produit reutilisable (.tme-prod-card)
   ========================================================================== */
.tme-prod-card{
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.tme-prod-card__img{
  aspect-ratio: 1;
  background: var(--bg);
  border-radius: var(--rd-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  transition: transform .25s ease;
}
.tme-prod-card:hover .tme-prod-card__img{
  transform: translateY(-4px);
}
.tme-prod-card__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tme-prod-card__icon{
  width: 48%;
  height: 48%;
  color: #9CA3AF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tme-prod-card__icon svg{ width: 100%; height: 100%; }

.tme-prod-card__promo{
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--sale);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: var(--fw-semi);
  letter-spacing: .04em;
  padding: 4px 9px;
  border-radius: 4px;
}

.tme-prod-card__name{
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--text);
  line-height: 1.3;
  margin: 0;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s ease;
}
.tme-prod-card__name:hover{ color: var(--primary); }

.tme-prod-card__prices{
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.tme-prod-card__price-old{
  font-size: var(--fs-xs);
  color: var(--muted);
  text-decoration: line-through;
}

.tme-prod-card__price{
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  color: var(--sale);
}

.tme-prod-card__ttc{
  font-size: 9px;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* WooCommerce wraps prices in <span class="woocommerce-Price-amount"> — on neutralise. */
.tme-prod-card__prices .woocommerce-Price-amount{ display: inline; color: inherit; }
.tme-prod-card__prices .woocommerce-Price-currencySymbol{ margin-left: 2px; }
