/* ==========================================================================
   PS Tab Slider — Tabbed product/offer grid with horizontal scroll
   ========================================================================== */

.ps-tabs {
  --ps-tabs-accent: #CC0000;
  --ps-tabs-bg: #fff;
  --ps-tabs-card-bg: #fff;
  --ps-tabs-card-border: rgba(0,0,0,.08);
  --ps-tabs-card-radius: 12px;
  --ps-tabs-text: #1a1a1a;
}

.ps-tabs {
  position: relative;
  width: 100%;
  background: var(--ps-tabs-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 24px 0 32px;
}
.ps-tabs, .ps-tabs * { box-sizing: border-box; }

/* ---- Tab bar ---- */
.ps-tabs__bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(0,0,0,.06);
  padding: 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ps-tabs__bar::-webkit-scrollbar { display: none; }

.ps-tabs__tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 200ms, border-color 200ms;
  margin-bottom: -2px;
}
.ps-tabs__tab:hover { color: var(--ps-tabs-text); }
.ps-tabs__tab[aria-selected="true"] {
  color: var(--ps-tabs-accent);
  border-bottom-color: var(--ps-tabs-accent);
}
.ps-tabs__tab-icon {
  width: 20px; height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* "Voir tout" link */
.ps-tabs__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.ps-tabs__see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-tabs-accent);
  text-decoration: none;
  white-space: nowrap;
}
.ps-tabs__see-all:hover { text-decoration: underline; }

/* ---- Tab panels ---- */
.ps-tabs__panel {
  display: none;
  padding: 20px 16px 0;
}
.ps-tabs__panel[aria-hidden="false"] {
  display: block;
}

/* ---- Card grid (horizontal scroll) ---- */
.ps-tabs__grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.ps-tabs__grid::-webkit-scrollbar { display: none; }

/* Product card */
.ps-tabs__card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: var(--ps-tabs-card-bg);
  border: 1px solid var(--ps-tabs-card-border);
  border-radius: var(--ps-tabs-card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
@media (min-width: 768px) { .ps-tabs__card { flex: 0 0 280px; } }
@media (min-width: 1200px) { .ps-tabs__card { flex: 0 0 300px; } }

.ps-tabs__card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

/* Badge */
.ps-tabs__card-badge {
  display: inline-block;
  background: var(--ps-tabs-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Card image */
.ps-tabs__card-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.ps-tabs__card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Card body */
.ps-tabs__card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ps-tabs__card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
  color: var(--ps-tabs-text);
}

/* Feature list */
.ps-tabs__features {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.ps-tabs__features li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  color: #555;
  padding: 3px 0;
  line-height: 1.4;
}
.ps-tabs__features li svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  fill: var(--ps-tabs-accent);
  margin-top: 1px;
}

/* Price area */
.ps-tabs__price-area {
  margin-top: auto;
  padding-top: 8px;
}
.ps-tabs__price {
  font-size: 24px;
  font-weight: 700;
  color: var(--ps-tabs-text);
  line-height: 1.1;
}
.ps-tabs__price-old {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
  margin-left: 8px;
}
.ps-tabs__price-note {
  font-size: 12px;
  color: #777;
  margin-top: 2px;
}

/* Card CTA */
.ps-tabs__card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  background: var(--ps-tabs-accent);
  color: #fff;
  transition: background 200ms;
  align-self: flex-start;
}
.ps-tabs__card-cta:hover { filter: brightness(1.1); }

/* ---- Special CTA card (last card) ---- */
.ps-tabs__card--cta {
  background: #1a1a1a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 200px;
}
.ps-tabs__card--cta .ps-tabs__card-body {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-tabs__card--cta .ps-tabs__card-title { color: #fff; }
.ps-tabs__card--cta .ps-tabs__card-cta {
  background: var(--ps-tabs-accent);
  color: #fff;
}

/* ---- Stat card ---- */
.ps-tabs__card--stat {
  background: linear-gradient(135deg, var(--ps-tabs-accent), #e67300);
  color: #fff;
  text-align: center;
  justify-content: center;
}
.ps-tabs__card--stat .ps-tabs__card-body {
  align-items: center;
  justify-content: center;
}
.ps-tabs__card--stat .ps-tabs__card-title {
  color: #fff;
  font-size: 36px;
}

@media (prefers-reduced-motion: reduce) {
  .ps-tabs__card { transition: none; }
  .ps-tabs__tab  { transition: none; }
}
