/* ====================================================
   Featured Products Carousel  –  v1.1
   ==================================================== */

/* Wrapper principal */
.fp-wrap {
  position: relative;
  width: 100%;
  padding: 0 46px;
  box-sizing: border-box;
  font-family: inherit;
  /* Custom properties – override dans votre thème si besoin */
  --fp-accent: #425647;
  --fp-accent-h: #425647a1;
  --fp-ok: #425647;
  --fp-sale: #425647;
  --fp-radius: 14px;
  --fp-gap: 10px;
  --fp-card-bg: #ffffff;
  --fp-border: #e5e7eb;
  --fp-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
  --fp-shadow-h: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.fp-slide::marker {
  display: none !important;
  opacity: 0 !important;
}

/* Viewport (masque le débordement) */
.fp-viewport {
  overflow: hidden;
}

/* Track – ligne de slides */
.fp-track {
  display: flex;
  list-style: none !important;
  margin: 0;
  padding: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Slides – largeur réactive */
.fp-slide {
  flex: 0 0 25%;
  padding: var(--fp-gap);
  box-sizing: border-box;
  list-style: none !important;
}
@media (max-width: 1099px) {
  .fp-slide {
    flex-basis: 33.333%;
  }
}
@media (max-width: 767px) {
  .fp-slide {
    flex-basis: 50%;
  }
}
@media (max-width: 479px) {
  .fp-slide {
    flex-basis: 100%;
  }
}

/* ---- Carte produit ---- */
.fp-card {
  background: var(--fp-card-bg);
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--fp-shadow);
  transition:
    box-shadow 0.28s ease,
    transform 0.28s ease;
}
.fp-card:hover {
  box-shadow: var(--fp-shadow-h);
  /* transform: translateY(-5px); */
}

/* Vignette */
.fp-thumb {
  display: block;
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}
.fp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s ease;
}
.fp-thumb:hover .fp-img {
  transform: scale(1.07);
}

.fp-badge-sale {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--fp-sale);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 99px;
  /* box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35); */
}

/* Corps de la carte */
.fp-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fp-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fp-name a {
  color: #111827;
  text-decoration: none;
  transition: color 0.15s;
}
.fp-name a:hover {
  color: var(--fp-accent-h);
}

.fp-price {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}
.fp-price del {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 400;
  margin-right: 4px;
}
.fp-price ins {
  text-decoration: none;
  color: var(--fp-sale);
}

/* Bloc ATC */
.fp-atc-wrap {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Sélecteur de quantité */
.fp-qty {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  height: 36px;
  background: #fff;
}
.fp-q-btn {
  background: #f9fafb;
  border: none;
  width: 34px;
  height: 100%;
  font-size: 17px;
  font-weight: 300;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  transition: background 0.15s;
  flex-shrink: 0;
}
.fp-q-btn:hover {
  background: #f3f4f6;
}
.fp-q-inp {
  border: none;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  width: 42px;
  height: 100%;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  background: #fff;
  -moz-appearance: textfield;
}
.fp-q-inp::-webkit-inner-spin-button,
.fp-q-inp::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.fp-q-inp:focus {
  outline: none;
  background: #f8faff;
}

/* Bouton Ajouter au panier */
.fp-cart-btn {
  width: 100%;
  padding: 10px 14px;
  background: var(--fp-accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.fp-cart-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.fp-cart-btn:hover:not(:disabled) {
  background: var(--fp-accent-h);
  /* transform: translateY(-1px); */
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.25);
}
.fp-cart-btn:active:not(:disabled) {
  transform: translateY(0);
}
.fp-cart-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}
.fp-cart-btn.fp-ok {
  background: var(--fp-ok);
}

.fp-opt-btn {
  background: #6b7280;
}
.fp-opt-btn:hover {
  background: #4b5563;
}

/* SVG icône panier */
.fp-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

/* Spinner */
.fp-spin {
  display: none;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: fp-spin 0.65s linear infinite;
}
@keyframes fp-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Rupture / message vide */
.fp-oos {
  font-size: 12px;
  color: #9ca3af;
  margin: auto 0 0;
  font-style: italic;
}
.fp-empty {
  text-align: center;
  color: #9ca3af;
  padding: 32px 0;
  font-size: 14px;
}

/* ---- Boutons navigation ---- */
.fp-nav {
  position: absolute;
  top: calc(50% - 28px); /* aligne sur la vignette */
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.06);
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
.fp-nav:hover:not(:disabled) {
  background: var(--fp-accent);
  color: #fff;
  border-color: var(--fp-accent);
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.22);
  transform: translateY(-50%) scale(1.08);
}
.fp-nav:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.fp-prev {
  left: 0;
}
.fp-next {
  right: 0;
}

/* ---- Indicateurs (dots) ---- */
.fp-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding-top: 20px;
}
.fp-dot {
  height: 7px;
  width: 7px;
  background: #d1d5db;
  border: none;
  border-radius: 99px;
  padding: 0;
  cursor: pointer;
  transition:
    background 0.22s ease,
    width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.fp-dot-on {
  background: var(--fp-accent);
  width: 24px;
}

/* ---- Mobile : masque les flèches, swipe suffit ---- */
@media (hover: none) and (pointer: coarse) {
  .fp-nav {
    display: none;
  }
  .fp-wrap {
    padding: 0 var(--fp-gap);
  }
}
