/*-----------------------------------*\
  #PRODUCT GRID — Corporate Trust
  Flat design · ombres discrètes · variables héritées par .product-grid
\*-----------------------------------*/

.product-main {
  /* Design tokens (cartes catalogue) */
  --cc-surface: #ffffff;
  --cc-bg-image: #f1f5f9;
  --cc-border: #e2e8f0;
  --cc-border-hover: #cbd5e1;
  --cc-ink: #0f172a;
  --cc-ink-secondary: #334155;
  --cc-ink-muted: #64748b;
  --cc-accent: #be123c;
  --cc-accent-hover: #9f1239;
  --cc-badge-default: #0f172a;
  --cc-badge-alt: #b91c1c;
  --cc-price-old: #94a3b8;
  --cc-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --cc-shadow-hover: 0 10px 28px rgba(15, 23, 42, 0.09);
  --cc-radius: 12px;
  --cc-radius-sm: 8px;
  --cc-ease: cubic-bezier(0.4, 0, 0.2, 1);

  margin-bottom: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  padding: 0 0.625rem;
}

.product-grid .showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  overflow: hidden;
  transition:
    border-color 0.2s var(--cc-ease),
    box-shadow 0.2s var(--cc-ease),
    transform 0.2s var(--cc-ease);
  box-shadow: var(--cc-shadow);
}

.product-grid .showcase:hover {
  border-color: var(--cc-border-hover);
  box-shadow: var(--cc-shadow-hover);
  transform: translateY(-2px);
}

.product-grid .showcase-banner {
  position: relative;
  overflow: hidden;
  background: var(--cc-bg-image);
}

.product-grid .product-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.35s var(--cc-ease), opacity 0.25s ease;
  display: block;
}

.product-grid .product-img.default {
  position: relative;
  z-index: 1;
}

.product-grid .product-img.hover {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  opacity: 0;
}

.product-grid .showcase:hover .product-img.hover {
  opacity: 1;
}

.product-grid .showcase:hover .product-img.default {
  opacity: 0;
}

.product-grid .showcase:hover .product-img {
  transform: scale(1.04);
}

/* Badge — couleurs pleines, sans dégradé */
.product-grid .showcase-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--cc-badge-default);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--cc-surface);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  z-index: 3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.product-grid .showcase-badge.angle {
  top: 0.625rem;
  left: -1.75rem;
  transform: rotate(-45deg);
  padding: 0.35rem 2.25rem;
  font-size: 0.625rem;
}

.product-grid .showcase-badge.black {
  background: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.product-grid .showcase-badge.pink {
  background: var(--cc-badge-alt);
  box-shadow: 0 1px 2px rgba(185, 28, 28, 0.2);
}

.product-grid .showcase-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 4;
}

/*
 * Boutons d’action : fond transparent, pictos blancs + contour sombre (lisible sur photos).
 * card-outline réaffiché (masqué globalement par base.css FIX 3 hors .action-btn).
 */
.product-grid .btn-action {
  background: transparent;
  color: #ffffff;
  border: none;
  padding: 0;
  border-radius: var(--cc-radius-sm);
  transition: transform 0.2s var(--cc-ease), filter 0.2s var(--cc-ease);
  cursor: pointer;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
}

.product-grid .btn-action ion-icon {
  color: #ffffff;
  font-size: 1.3rem;
  width: 1.3rem;
  height: 1.3rem;
  --ionicon-stroke-width: 34px;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.55)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.product-grid .btn-action ion-icon[name="card-outline"] {
  display: block !important;
  width: 1.3rem !important;
  height: 1.3rem !important;
  font-size: 1.3rem !important;
  overflow: visible !important;
}

.product-grid .btn-action:hover,
.product-grid .btn-action:focus-visible {
  background: transparent;
  color: #ffffff;
  border: none;
  box-shadow: none;
  transform: scale(1.1);
}

.product-grid .btn-action:hover ion-icon,
.product-grid .btn-action:focus-visible ion-icon {
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.65)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.product-grid .btn-action:active {
  transform: scale(0.94);
  color: #ffffff;
}

.product-grid .showcase-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0;
}

.product-grid .showcase-category {
  color: var(--cc-ink-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.375rem;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.product-grid .showcase-title {
  color: var(--cc-ink);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.75rem;
  transition: color 0.2s var(--cc-ease);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.35rem;
  letter-spacing: -0.01em;
}

.product-grid .showcase-title:hover {
  color: var(--cc-accent);
}

/*
 * Masquage des étoiles sur les cartes produit (structure HTML inchangée).
 * Règle dédiée : .product-grid .showcase-rating { display: none !important; }
 */
.product-grid .showcase-rating {
  display: none !important;
}

/* Prix actuel + barré : toujours une seule ligne (tailles seulement ajustées par breakpoint) */
.product-grid .price-box {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.25rem;
  min-width: 0;
}

.product-grid .price {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 700;
  color: var(--cc-ink);
  font-size: 0.8125rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.product-grid del {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--cc-price-old);
  font-size: 0.6875rem;
  font-weight: 500;
  text-decoration: line-through;
  white-space: nowrap;
}

/* Bouton grille (si présent dans certains gabarits) — plat, couleur marque */
.product-grid .add-to-cart-btn {
  width: 100%;
  background: var(--cc-accent);
  color: var(--cc-surface);
  border: none;
  padding: 0.75rem;
  border-radius: var(--cc-radius-sm);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s var(--cc-ease), box-shadow 0.2s var(--cc-ease);
  box-shadow: 0 1px 2px rgba(190, 18, 60, 0.15);
}

.product-grid .add-to-cart-btn:hover {
  background: var(--cc-accent-hover);
  box-shadow: 0 2px 8px rgba(190, 18, 60, 0.2);
}

.product-grid .add-to-cart-btn:active {
  transform: translateY(1px);
}

/*-----------------------------------*\
  #PRODUCT FEATURED - AMÉLIORÉ
\*-----------------------------------*/

.product-featured {
  margin-bottom: 40px;
  padding: 0 10px;
}

.product-featured .showcase-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: thin;
  scrollbar-color: #667eea #f0f0f0;
}

.product-featured .showcase-wrapper::-webkit-scrollbar {
  height: 8px;
}

.product-featured .showcase-wrapper::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

.product-featured .showcase-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
}

.product-featured .showcase-container {
  min-width: 100%;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  scroll-snap-align: start;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.product-featured .showcase-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.product-featured .showcase-content {
  margin-top: 24px;
}

/* Étoiles masquées sur la carte « offre du jour » (même logique que la grille) */
.product-featured .showcase-rating {
  display: none !important;
}

.product-featured .showcase-title {
  font-size: 20px;
  font-weight: 700;
  color: #2d3436;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.product-featured .showcase-desc {
  color: #636e72;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 16px;
}

.product-featured .price-box {
  font-size: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.product-featured .price {
  color: #667eea;
  font-weight: 700;
}

.product-featured del {
  color: #b2bec3;
  font-weight: 400;
  font-size: 20px;
}

.product-featured .add-cart-btn {
  background: #be123c;
  padding: 14px 24px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 8px;
  margin-bottom: 20px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 2px rgba(190, 18, 60, 0.15);
  letter-spacing: 0.06em;
}

.product-featured .add-cart-btn:hover {
  background: #9f1239;
  box-shadow: 0 2px 8px rgba(190, 18, 60, 0.2);
}

.product-featured .showcase-status {
  margin-bottom: 20px;
}

.product-featured .showcase-status .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #2d3436;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.product-featured .showcase-status-bar {
  background: #e0e0e0;
  position: relative;
  height: 12px;
  border-radius: 10px;
  overflow: hidden;
}

.product-featured .showcase-status-bar::before {
  position: absolute;
  content: '';
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  animation: progressBar 2s ease-in-out;
}

@keyframes progressBar {
  from { width: 0; }
  to { width: 40%; }
}

.product-featured .countdown-desc {
  color: #2d3436;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.product-featured .countdown {
  display: flex;
  gap: 8px;
}

.product-featured .countdown-content {
  flex: 1;
  padding: 12px 8px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  text-align: center;
  border: 2px solid #e0e0e0;
}

.product-featured .display-number {
  color: #667eea;
  font-size: 24px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.product-featured .display-text {
  color: #636e72;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/*-----------------------------------*\
  #PAGINATION - AMÉLIORÉE
\*-----------------------------------*/

.pagination-loader {
  text-align: center;
  padding: 40px 0;
}

.loading-spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 5px solid #f0f0f0;
  border-top: 5px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.load-more-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 20px auto;
  display: block;
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.load-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.load-more-btn:active {
  transform: translateY(0);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.end-message {
  text-align: center;
  padding: 40px 20px;
  color: #636e72;
}

.end-message p {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
}

/*-----------------------------------*\
  #SIGNAL STYLES - AMÉLIORÉ
\*-----------------------------------*/

.signal {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
  border: 2px dashed #ff6b6b;
  border-radius: 16px;
  margin: 20px 0;
  transition: all 0.3s ease;
}

.signal:hover {
  background: linear-gradient(135deg, #ffe5e5 0%, #ffd5d5 100%);
  border-color: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.2);
}

.signal p {
  font-size: 16px;
  font-weight: 600;
  color: #d63031;
  margin: 0;
  line-height: 1.6;
}

.signal p::before {
  content: "⚠️";
  display: inline-block;
  margin-right: 12px;
  font-size: 24px;
  vertical-align: middle;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/*-----------------------------------*\
  #RESPONSIVE - AMÉLIORÉ
\*-----------------------------------*/

@media (min-width: 480px) {
  .product-grid {
    gap: 20px;
    padding: 0 15px;
  }

  .product-grid .showcase-content {
    padding: 20px;
  }

  .product-grid .price {
    font-size: 0.9375rem;
  }

  .product-grid del {
    font-size: 0.75rem;
  }
}

@media (min-width: 570px){
  .product-featured .showcase-img {
    max-width: 450px;
    margin: auto;
  }

  .product-featured .countdown {
    gap: 12px;
  }

  .product-featured .countdown-content {
    padding: 16px 12px;
  }
}

@media (min-width: 768px){
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 20px;
  }

  .product-grid .price {
    font-size: 1rem;
  }

  .product-grid del {
    font-size: 0.8125rem;
  }

  .product-grid .price-box {
    gap: 0.5rem;
  }

  .product-featured .showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
  }

  .product-featured .showcase-img {
    max-width: fit-content;
  }

  .product-featured .showcase-content {
    margin-top: 0;
    min-width: calc(100% - 345px);
  }

  .product-featured .showcase-container {
    padding: 32px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
  }

  .product-featured .countdown-content {
    padding: 16px 14px;
  }
}

@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding: 0 40px;
  }

  .product-featured .showcase > div {
    min-width: calc(50% - 15px);
  }

  .product-featured .display-number {
    font-size: 28px;
  }
}

/* Amélioration des transitions */
* {
  -webkit-tap-highlight-color: transparent;
}

.product-grid .showcase,
.product-featured .showcase-container {
  will-change: transform;
}