/**
 * DevilleSelection v4.0 - Styles avec couleurs PrestaCrea
 * Utilise les variables CSS --deville-base-color, --deville-price-color
 */

/* Variables par défaut (écrasées par le PHP) */
:root {
  --deville-base-color: #49a2ce;
  --deville-alt-color: #333333;
  --deville-price-color: #49a2ce;
}

.deville-selection {
  margin: 25px 0;
  padding: 20px 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.deville-selection .products-section-title {
  margin-bottom: 20px;
  font-size: 1.4rem;
  text-align: center;
  color: #333;
}

/* Card produit */
.deville-product {
  padding: 8px;
}

.deville-card {
  display: block;
  position: relative;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.deville-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  transform: translateY(-3px);
  border-color: var(--deville-base-color);
  text-decoration: none;
  color: inherit;
}

/* Badge */
.deville-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  color: #fff;
  background: #dc3545;
}

/* Image */
.deville-img-wrap {
  background: #fff;
  text-align: center;
}

.deville-img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.3s ease;
}

.deville-card:hover .deville-img {
  transform: scale(1.05);
}

/* Info */
.deville-info {
  padding: 12px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
}

/* Étoiles */
.deville-stars {
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 1px;
}

.deville-star.filled {
  color: #ffc107;
}

.deville-star.empty {
  color: #ddd;
}

/* Marque */
.deville-brand {
  display: block;
  font-size: 10px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* Nom */
.deville-name {
  font-size: 12px;
  line-height: 1.3;
  margin: 0 0 8px 0;
  min-height: 32px;
  font-weight: 500;
  color: #333;
}

.deville-card:hover .deville-name {
  color: var(--deville-base-color);
}

/* Prix - Utilise la couleur PrestaCrea */
.deville-price {
  margin-bottom: 6px;
}

.deville-price-old {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
  margin-right: 6px;
}

.deville-price-current {
  font-size: 16px;
  font-weight: 700;
  color: var(--deville-price-color);
}

/* ========================================
   STOCK - CODE COULEUR
   ======================================== */

.deville-stock {
  font-size: 11px;
  font-weight: 600;
}

/* VERT - En stock */
.deville-stock-in-stock {
  color: #28a745;
}

/* ORANGE - Sur commande */
.deville-stock-on-order {
  color: #ff9800;
}

/* ROUGE - Indisponible */
.deville-stock-unavailable {
  color: #dc3545;
}

/* ========================================
   CAROUSEL
   ======================================== */

.deville-selection .owl-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.deville-selection .owl-nav button {
  pointer-events: auto;
  background: rgba(0,0,0,0.7) !important;
  border-radius: 50% !important;
  width: 36px;
  height: 36px;
  margin: 0 -18px;
}

.deville-selection .owl-nav button:hover {
  background: var(--deville-base-color) !important;
}

.deville-selection .owl-nav button span {
  color: #fff;
  font-size: 20px;
  line-height: 36px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 767px) {
  .deville-selection {
    margin: 15px 0;
    padding: 15px 8px;
  }

  .deville-img {
    height: 120px;
  }
  
  .deville-name {
    font-size: 11px;
    min-height: 28px;
  }
  
  .deville-price-current {
    font-size: 14px;
  }
}
