/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #1e3a5f;
  --accent-hover: #2a4a73;
  --success: #10b981;
  --danger: #ef4444;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
  --transition: all 0.3s ease;
  /* Couleur "vitrine" : chaude et lumineuse, choisie pour contraster avec le
     bleu marine froid de la charte et faire ressortir les photos produits
     (souvent en noir/gris/blanc neutre) sur un fond qui les met en valeur
     plutôt que de les écraser sur un aplat marine. */
  --spotlight: #f5a524;
  --spotlight-soft: rgba(245, 165, 36, 0.14);
  --spotlight-glow: rgba(245, 165, 36, 0.28);
}
body.dark-mode {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --bg: #0f172a;
  --card-bg: #1e293b;
  --border: #334155;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --spotlight: #fbbf42;
  --spotlight-soft: rgba(251, 191, 66, 0.12);
  --spotlight-glow: rgba(251, 191, 66, 0.22);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.4s, color 0.4s;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 10px; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px; font-weight: 600;
  font-size: 0.95rem; border: none; cursor: pointer;
  transition: var(--transition);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-outline {
  background: transparent; border: 2px solid var(--accent); color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ===== PROMO BANNER ===== */
.promo-banner {
  background: linear-gradient(90deg, #0f172a, #1e3a5f);
  color: #fff; overflow: hidden; height: 42px;
  display: flex; align-items: center;
}
.promo-slider {
  display: flex; gap: 60px; animation: scroll-promo 25s linear infinite;
  white-space: nowrap;
}
.promo-item { font-size: 0.9rem; font-weight: 500; }
.promo-item.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes scroll-promo {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

/* ===== HEADER ===== */
.header {
  background: var(--card-bg); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 20px;
}
.logo {
  font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 8px;
  color: var(--accent);
}
.logo i { font-size: 1.4rem; }
.nav { display: flex; gap: 28px; }
.nav-link {
  font-weight: 500; font-size: 0.95rem; position: relative;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 100%;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.lang-btn.active, .lang-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.theme-toggle, .cart-btn, .mobile-toggle {
  background: transparent; border: none; color: var(--text);
  font-size: 1.2rem; cursor: pointer; position: relative; padding: 6px;
}
.cart-count {
  position: absolute; top: -4px; right: -6px;
  background: var(--accent); color: #fff; font-size: 0.7rem;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.mobile-toggle { display: none; }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 580px; display: flex; align-items: center;
  overflow: hidden; background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0f172a 100%);
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 40%, rgba(30,58,95,0.15), transparent 50%);
}
.hero-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  position: relative; z-index: 2; padding: 60px 20px;
}
.hero-text .badge {
  display: inline-block; background: rgba(30,58,95,0.2); color: var(--accent);
  padding: 6px 14px; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 18px;
}
.hero-text h1 {
  font-size: 3rem; font-weight: 800; line-height: 1.15; margin-bottom: 18px;
}
.hero-text h1 span { color: var(--accent); }
.hero-text p { font-size: 1.1rem; opacity: 0.85; margin-bottom: 30px; max-width: 480px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; height: 400px; }
.hero-img-placeholder {
  width: 280px; height: 280px; background: rgba(255,255,255,0.08);
  border-radius: 30px; display: flex; align-items: center; justify-content: center;
  font-size: 6rem; color: var(--accent); margin: 40px auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: float 4s ease-in-out infinite;
}
.floating-card {
  position: absolute; background: rgba(255,255,255,0.14); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.22); padding: 14px 18px; border-radius: 14px;
  display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.88rem;
  animation: float 4s ease-in-out infinite;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  white-space: nowrap;
  z-index: 3;
}
.floating-card i { color: var(--accent); font-size: 1.15rem; }
/* Espacement large pour éviter l'entassement */
.card-1 { top: 8%; left: 0; animation-delay: 0s; }
.card-2 { top: 42%; right: 0; animation-delay: 0.9s; }
.card-3 { bottom: 12%; left: 12%; animation-delay: 1.7s; }
.hero-visual { min-height: 380px; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* ===== CATEGORIES ===== */
.category-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px;
}
.category-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 20px; text-align: center; cursor: pointer;
  transition: var(--transition); box-shadow: var(--shadow);
}
.category-card:hover {
  transform: translateY(-6px); border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(30,58,95,0.15);
}
.category-card i {
  font-size: 2.4rem; color: var(--accent); margin-bottom: 14px; display: block;
}
.category-card h4 { font-size: 1rem; font-weight: 600; }

/* ===== CARROUSEL PRODUITS PAR CATÉGORIE (page d'accueil) ===== */
.cat-row {
  margin-bottom: 56px;
}
.cat-row-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.cat-row-header h3 {
  font-size: 1.3rem; font-weight: 800; margin: 0;
}
.cat-row-header a {
  font-size: 0.85rem; font-weight: 700; color: var(--accent);
  white-space: nowrap; text-decoration: none;
}
.cat-row-header a:hover { text-decoration: underline; }
.cat-carousel {
  position: relative;
}
.cat-carousel-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 4px 12px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.cat-carousel-track::-webkit-scrollbar { display: none; }
.cat-carousel-item {
  flex: 0 0 220px;
  scroll-snap-align: start;
}
.cat-carousel-item .product-card-overlay .product-img { height: 180px; }
.cat-carousel-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(15,23,42,0.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 3;
  color: var(--accent);
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cat-carousel-arrow:hover { background: var(--spotlight-soft); transform: translateY(-50%) scale(1.08); }
.cat-carousel-arrow.cat-arrow-left { left: -18px; }
.cat-carousel-arrow.cat-arrow-right { right: -18px; }
@media (max-width: 640px) {
  .cat-carousel-arrow { width: 36px; height: 36px; font-size: 0.85rem; }
  .cat-carousel-arrow.cat-arrow-left { left: -10px; }
  .cat-carousel-arrow.cat-arrow-right { right: -10px; }
  .cat-carousel-item { flex-basis: 170px; }
  .cat-carousel-item .product-card-overlay .product-img { height: 150px; }
}

/* ===== GRANDES BANNIÈRES "PIÈCE DE VIE" ===== */
.room-banner {
  position: relative;
  margin: 56px 0;
  border-radius: 28px;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.room-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15,23,42,0.72) 0%, rgba(15,23,42,0.38) 48%, rgba(15,23,42,0.05) 75%);
  z-index: 1;
}
.room-banner-content {
  position: relative; z-index: 2;
  padding: 48px 56px;
  max-width: 480px;
  color: #fff;
}
.room-banner-content span.room-eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--spotlight);
  margin-bottom: 12px;
}
.room-banner-content h3 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.room-banner-content p {
  font-size: 1rem;
  opacity: 0.92;
  margin: 0 0 26px;
  line-height: 1.6;
}
.room-banner-content .btn {
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
@media (max-width: 768px) {
  .room-banner { min-height: 320px; border-radius: 20px; }
  .room-banner::before {
    background: linear-gradient(180deg, rgba(15,23,42,0.35) 0%, rgba(15,23,42,0.82) 75%);
  }
  .room-banner-content { padding: 32px 24px; max-width: 100%; }
}

/* ===== PRODUCTS ===== */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px;
}
.product-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.12); }
.product-img {
  height: 200px;
  background:
    radial-gradient(ellipse at 30% 25%, var(--spotlight-glow), transparent 60%),
    linear-gradient(155deg, #fff7ea 0%, #ffe8c2 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
body.dark-mode .product-img {
  background:
    radial-gradient(ellipse at 30% 25%, var(--spotlight-glow), transparent 60%),
    linear-gradient(155deg, #1e293b 0%, #12213a 100%);
}
.product-img .product-img-icon {
  width: 92px; height: 92px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  box-shadow: 0 4px 16px rgba(15,23,42,0.1);
  font-size: 2.4rem; color: var(--accent);
}
body.dark-mode .product-img .product-img-icon {
  background: rgba(15,23,42,0.4);
}
.product-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--danger); color: #fff; font-size: 0.75rem;
  padding: 4px 10px; border-radius: 6px; font-weight: 700;
}
.stock-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 0.75rem; padding: 4px 10px; border-radius: 6px; font-weight: 600;
}
.stock-badge.in-stock { background: rgba(16,185,129,0.9); color: #fff; }
.stock-badge.low-stock { background: rgba(42,74,115,0.95); color: #fff; }
.stock-badge.out-of-stock { background: rgba(239,68,68,0.9); color: #fff; }
.product-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.product-cat { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.product-title { font-size: 1.05rem; font-weight: 600; margin: 6px 0 8px; }
.product-price { font-size: 1.25rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.product-price .old { font-size: 0.9rem; color: var(--text-muted); text-decoration: line-through; margin-left: 8px; font-weight: 400; }
.product-actions { margin-top: auto; display: flex; gap: 8px; }
.product-actions .btn { flex: 1; justify-content: center; }

/* ===== MID PROMO ===== */
.mid-promo {
  background: linear-gradient(135deg, #0f172a, #1e3a5f); color: #fff; padding: 50px 0;
}
.mid-promo-content {
  display: flex; align-items: center; gap: 40px; justify-content: center; flex-wrap: wrap;
}
.promo-code-box {
  background: rgba(30,58,95,0.15); border: 2px dashed var(--accent);
  padding: 24px 36px; border-radius: 16px; text-align: center; min-width: 200px;
}
.promo-code-box.rotating { animation: rotate-box 6s ease-in-out infinite; }
@keyframes rotate-box {
  0%, 100% { transform: rotate(-2deg) scale(1); }
  50% { transform: rotate(2deg) scale(1.03); }
}
.code-label { display: block; font-size: 0.85rem; opacity: 0.8; margin-bottom: 6px; }
.code-value {
  display: block; font-size: 2rem; font-weight: 800; color: var(--accent);
  letter-spacing: 3px; margin-bottom: 4px;
}
.code-desc { font-size: 0.9rem; }
.mid-promo-text h3 { font-size: 1.6rem; margin-bottom: 8px; }
.mid-promo-text p { opacity: 0.85; max-width: 400px; }

/* ===== WHY US ===== */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px;
}
.feature-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 24px; text-align: center; transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 60px; height: 60px; background: rgba(30,58,95,0.12);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 1.5rem; color: var(--accent);
}
.feature-card h4 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== NEWSLETTER ===== */
.newsletter {
  background: var(--card-bg); border-top: 1px solid var(--border); padding: 50px 0;
}
.newsletter-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.newsletter-inner h3 { font-size: 1.4rem; margin-bottom: 4px; }
.newsletter-inner p { color: var(--text-muted); }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input {
  padding: 12px 18px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); min-width: 260px; font-size: 0.95rem;
}
.newsletter-form input:focus { outline: none; border-color: var(--accent); }

/* ===== FOOTER ===== */
.footer {
  background: #0f172a; color: #94a3b8; padding: 60px 0 30px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px;
}
.footer .logo { color: var(--accent); margin-bottom: 14px; display: inline-flex; }
.footer-col h5 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col a { display: block; margin-bottom: 10px; font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid #1e293b; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-legal-links {
  display: flex; gap: 24px; flex-wrap: wrap;
  padding-top: 20px; margin-top: 20px; border-top: 1px solid #1e293b;
  font-size: 0.85rem;
}
.footer-legal-links a { color: #94a3b8; transition: color 0.2s; }
.footer-legal-links a:hover { color: var(--accent); }
.socials { display: flex; gap: 14px; }
.socials a {
  width: 36px; height: 36px; border-radius: 50%; background: #1e293b;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.socials a:hover { background: var(--accent); color: #fff; }

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a, #1e3a5f); padding: 40px 20px;
}
.auth-card {
  background: var(--card-bg); border-radius: 16px; padding: 40px;
  width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.auth-card h2 { text-align: center; margin-bottom: 8px; font-size: 1.6rem; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input, .form-group select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text); font-size: 0.95rem;
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,58,95,0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 10px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-muted); }
.auth-switch a { color: var(--accent); font-weight: 600; }
.alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 0.9rem;
}
.alert-error { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.alert-success { background: rgba(16,185,129,0.1); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }

/* ===== DASHBOARD LAYOUT ===== */
.dashboard {
  display: flex; min-height: 100vh;
}
.sidebar {
  width: 260px; background: var(--primary); color: #fff; padding: 24px 0;
  position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 100;
  transition: transform 0.3s;
}
.sidebar .logo { padding: 0 24px 24px; border-bottom: 1px solid #1e293b; margin-bottom: 20px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 24px;
  color: #94a3b8; font-weight: 500; transition: var(--transition);
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(30,58,95,0.15); color: var(--accent);
}
.sidebar-nav a i { width: 20px; text-align: center; }
.main-content {
  flex: 1; margin-left: 260px; padding: 30px; background: var(--bg);
}
.dashboard-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 30px; flex-wrap: wrap; gap: 16px;
}
.dashboard-header h1 { font-size: 1.6rem; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.stat-card .stat-icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 12px;
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.9rem; }
.table-container {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow-x: auto; box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
td { font-size: 0.95rem; }
.badge-status {
  display: inline-block; padding: 4px 10px; border-radius: 50px; font-size: 0.8rem; font-weight: 600;
}
.badge-pending { background: rgba(30,58,95,0.15); color: #2a4a73; }
.badge-approved { background: rgba(16,185,129,0.15); color: #059669; }
.badge-shipped { background: rgba(59,130,246,0.15); color: #2563eb; }
.badge-delivered { background: rgba(16,185,129,0.2); color: #047857; }
.badge-cancelled { background: rgba(239,68,68,0.15); color: #dc2626; }

/* ===== ADMIN PRODUCTS – responsive table/cards ===== */
.product-admin-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.product-admin-table {
  width: 100%;
  min-width: 760px;
}
.product-admin-table td,
.product-admin-table th {
  vertical-align: top;
}
.product-admin-actions {
  min-width: 250px;
}
.product-admin-actions form {
  min-width: 0;
}
.product-admin-actions input[type="file"] {
  max-width: 140px;
  min-width: 0;
}

@media (max-width: 768px) {
  /* The product table becomes a stack of self-contained cards.
     This removes horizontal overflow while keeping every action available. */
  .product-admin-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .product-admin-table {
    min-width: 0 !important;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
  }
  .product-admin-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .product-admin-table tbody {
    display: block;
    width: 100%;
  }
  .product-admin-table tbody tr {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
  .product-admin-table tbody td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--border);
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  .product-admin-table tbody td:last-child {
    border-bottom: 0;
    padding-bottom: 2px !important;
  }
  .product-admin-table tbody td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .product-admin-table tbody td[data-label="Image"] {
    align-items: center;
  }
  .product-admin-table tbody td[data-label="Actions"] {
    display: block;
  }
  .product-admin-table tbody td[data-label="Actions"]::before {
    display: block;
    margin-bottom: 8px;
  }
  .product-admin-actions {
    min-width: 0 !important;
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
    align-items: stretch !important;
  }
  .product-admin-actions form,
  .product-admin-actions > .btn {
    width: 100%;
    min-width: 0;
  }
  .product-admin-actions form:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }
  .product-admin-actions form:first-child input[type="file"] {
    width: 100%;
    max-width: none;
    font-size: .75rem !important;
  }
  .product-admin-actions .btn {
    min-height: 40px;
    white-space: normal;
    justify-content: center;
  }
  .product-admin-actions > form:nth-child(2) {
    grid-column: 1;
  }
  .product-admin-actions > .btn {
    grid-column: 2;
  }
  .product-admin-actions + div {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .product-admin-actions + div form {
    width: 100%;
  }
  .product-admin-actions + div .form-row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 420px) {
  .product-admin-table tbody tr {
    padding: 10px;
    border-radius: 12px;
  }
  .product-admin-table tbody td {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
  }
  .product-admin-actions {
    grid-template-columns: 1fr !important;
  }
  .product-admin-actions form:first-child,
  .product-admin-actions > form:nth-child(2),
  .product-admin-actions > .btn {
    grid-column: 1 !important;
  }
}

/* ===== STOCK MANAGEMENT ===== */
.stock-input {
  width: 80px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--bg); color: var(--text); text-align: center;
}
.stock-low { color: var(--danger); font-weight: 700; }
.stock-ok { color: var(--success); }

/* ===== STARRY SKY (Admin Dark Mode) ===== */
.starry-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: #0a0e1a;
}
.star {
  position: absolute; background: #fff; border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}
.shooting-star {
  position: absolute; width: 80px; height: 2px;
  background: linear-gradient(90deg, #fff, transparent);
  animation: shoot 3s linear infinite; opacity: 0;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes shoot {
  0% { transform: translateX(0) translateY(0); opacity: 1; }
  100% { transform: translateX(300px) translateY(150px); opacity: 0; }
}

/* ===== CART ===== */
.cart-page { padding: 40px 0 80px; }
.cart-table { width: 100%; }
.cart-item-img {
  width: 70px; height: 70px; background: linear-gradient(135deg,#1e293b,#334155);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: var(--accent);
}
.cart-summary {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: sticky; top: 90px;
}
.cart-summary h3 { margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.summary-row.total { font-size: 1.2rem; font-weight: 700; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control button {
  width: 32px; height: 32px; border: 1px solid var(--border); background: var(--bg);
  border-radius: 6px; cursor: pointer; font-weight: 700; color: var(--text);
}



/* ===== HERO maison premium ===== */
.hero-with-home {
  position: relative;
  min-height: 620px;
}
.hero-bg-home {
  background:
    linear-gradient(135deg, rgba(15,23,42,0.82) 0%, rgba(30,58,95,0.55) 45%, rgba(15,23,42,0.75) 100%),
    url('../img/hero-home.jpg') center/cover no-repeat !important;
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, transparent 0%, rgba(15,23,42,0.35) 70%);
  z-index: 1;
  pointer-events: none;
}
.hero-with-home .hero-content { position: relative; z-index: 2; }
.hero-with-home .hero-img-placeholder {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
}

/* Photos produits */
.product-img.has-photo {
  background:
    radial-gradient(ellipse at 30% 25%, var(--spotlight-glow), transparent 60%),
    linear-gradient(155deg, #fff7ea 0%, #ffe8c2 100%);
  padding: 0;
  overflow: hidden;
}
body.dark-mode .product-img.has-photo {
  background:
    radial-gradient(ellipse at 30% 25%, var(--spotlight-glow), transparent 60%),
    linear-gradient(155deg, #1e293b 0%, #12213a 100%);
}
.product-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  display: block;
}
.product-img.has-photo .product-badge,
.product-img.has-photo .stock-badge {
  z-index: 2;
}

/* ===== DASHBOARD MOBILE ===== */
.mobile-sidebar-toggle {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px; height: 44px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }
.sidebar { z-index: 101; }

/* Liens compte dans le menu mobile : cachés sur desktop */
.nav-mobile-account { display: none; }

/* ===== RESPONSIVE – style épuré (inspiration Tesla) ===== */

/* Tablette */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
    padding: 48px 20px;
  }
  .hero-text p { margin: 0 auto 28px; max-width: 36rem; }
  .hero-btns { justify-content: center; gap: 12px; }
  .hero-visual {
    display: block !important;
    height: 280px;
    margin: 0 auto;
    max-width: 380px;
  }
  .hero-img-placeholder {
    width: 190px; height: 190px;
    font-size: 4.2rem;
    margin: 32px auto;
  }
  .floating-card { padding: 10px 14px; font-size: 0.85rem; }
  .floating-card i { font-size: 1.05rem; }
  .card-1 { top: 4%; left: 2%; }
  .card-2 { top: 38%; right: 2%; }
  .card-3 { bottom: 8%; left: 18%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 8px 0 32px rgba(0,0,0,0.3);
    width: min(300px, 86vw);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 20px 16px 40px; }
  .mobile-sidebar-toggle { display: inline-flex !important; }
}

/* Mobile / grands téléphones (iPhone Pro Max ~430px) */
@media (max-width: 768px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .header-inner { height: 64px; gap: 10px; }
  .logo { font-size: 1.25rem; }
  .logo span { letter-spacing: -0.02em; }

  /* Menu hamburger plein écran style premium */
  .nav {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--card-bg);
    flex-direction: column;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 24px 40px;
    z-index: 1000;
    overflow-y: auto;
    gap: 4px;
  }
  .nav.open { display: flex; }
  .nav .nav-link {
    font-size: 1.35rem;
    font-weight: 600;
    padding: 16px 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }
  .nav .nav-link.active { color: var(--accent); }
  .nav .nav-link.active::after { display: none; }

  /* Compte + Déconnexion toujours visibles dans le menu mobile */
  .nav-mobile-account {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .nav-mobile-account .nav-link {
    font-size: 1.1rem;
    font-weight: 500;
  }
  .nav-logout { color: var(--danger) !important; }

  .mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 10px;
    z-index: 1001;
    background: transparent;
  }
  .mobile-toggle .fa-times,
  .mobile-toggle.is-open .fa-bars { display: none; }
  .mobile-toggle.is-open .fa-times { display: inline; }

  /* Sur mobile : masquer boutons compte desktop (déjà dans le menu) */
  .btn-account-desktop,
  .btn-logout-desktop,
  .btn-login-desktop {
    display: none !important;
  }

  .header-actions { gap: 8px; }
  .lang-switcher { gap: 3px; }
  .lang-btn { padding: 6px 9px; font-size: 0.75rem; border-radius: 8px; min-height: 36px; }

  .hero {
    min-height: min(92vh, 720px);
    padding: 24px 0 48px;
  }
  .hero-text h1 {
    font-size: clamp(1.75rem, 6.5vw, 2.4rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
  }
  .hero-text .badge {
    font-size: 0.8rem;
    padding: 8px 14px;
  }
  .hero-text p {
    font-size: 1.05rem;
    line-height: 1.55;
    opacity: 0.9;
  }
  .hero-btns .btn {
    min-height: 48px;
    padding: 14px 22px;
    font-size: 1rem;
    border-radius: 980px; /* style pilule type Tesla */
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
  .hero-btns { flex-direction: column; align-items: center; width: 100%; }
  .hero-visual { height: 240px; max-width: 320px; }
  .hero-img-placeholder { width: 150px; height: 150px; font-size: 3.4rem; }

  .section { padding: 56px 0; }
  .section-header h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    letter-spacing: -0.02em;
  }
  .section-header p { font-size: 1rem; padding: 0 8px; }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .category-card { padding: 22px 14px; border-radius: 16px; }
  .category-card i { font-size: 2rem; }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .product-card { border-radius: 16px; }
  .product-img { height: 220px; }
  .product-actions .btn {
    min-height: 46px;
    border-radius: 980px;
    font-size: 0.95rem;
  }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; gap: 12px; }
  .newsletter-form input {
    min-width: 100%;
    min-height: 48px;
    border-radius: 12px;
    font-size: 1rem;
  }
  .newsletter-form .btn {
    min-height: 48px;
    border-radius: 980px;
    width: 100%;
    justify-content: center;
  }
  .mid-promo-content { flex-direction: column; text-align: center; gap: 24px; }
  .promo-code-box {
    min-width: 0;
    width: 100%;
    max-width: 280px;
    padding: 20px 24px;
    border-radius: 20px;
  }
  .code-value { font-size: 1.6rem; letter-spacing: 2px; }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }
  .dashboard-header h1 { font-size: 1.35rem; letter-spacing: -0.02em; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 18px 14px; border-radius: 16px; }
  .stat-card .stat-value { font-size: 1.45rem; }
  .table-container {
    font-size: 0.85rem;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
  }
  th, td { padding: 12px 14px; }
  .cart-layout { grid-template-columns: 1fr !important; gap: 20px !important; }
  .cart-summary {
    position: static;
    border-radius: 16px;
    padding: 20px;
  }
  .cart-summary .btn {
    min-height: 48px;
    border-radius: 980px;
    font-size: 1rem;
  }

  .auth-page { padding: 24px 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .auth-card {
    padding: 28px 20px;
    border-radius: 20px;
    max-width: 100%;
  }
  .auth-card .btn {
    min-height: 48px;
    border-radius: 980px;
    font-size: 1rem;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    min-height: 48px;
    font-size: 16px; /* évite le zoom iOS */
    border-radius: 12px;
  }

  .features-grid { gap: 14px; }
  .feature-card { padding: 24px 18px; border-radius: 16px; }
}

/* Petits téléphones */
@media (max-width: 430px) {
  .product-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-visual { height: 210px; }
  .floating-card span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .promo-banner { height: 38px; font-size: 0.8rem; }
}

/* Safe area iPhone (encoche / Dynamic Island) */
@supports (padding: max(0px)) {
  .header {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  .nav.open {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.gap-10 { gap: 10px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
/* Avis clients */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.review-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.review-stars { color: var(--accent); font-size: 1.1rem; margin-bottom: 12px; letter-spacing: 2px; }
.review-text { color: var(--text); line-height: 1.6; margin-bottom: 16px; font-size: 0.98rem; }
.review-author { color: var(--text-muted); font-size: 0.9rem; }
.badge-rejected, .badge-suspended, .badge-deleted { background: rgba(239,68,68,0.15); color: #dc2626; }

/* ===== ADMIN – tables responsive professionnelles ===== */
.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}
.admin-table-wrap table {
  min-width: 640px;
  margin: 0;
}
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Cartes stock / commandes sur mobile */
@media (max-width: 768px) {
  .main-content {
    padding: 12px 12px 48px !important;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .dashboard {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .dashboard-header {
    gap: 12px;
    margin-bottom: 20px;
  }
  .dashboard-header h1 {
    font-size: 1.15rem !important;
    line-height: 1.3;
    word-break: break-word;
    max-width: calc(100vw - 100px);
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .stat-card {
    padding: 16px 12px !important;
  }
  .stat-card .stat-value {
    font-size: 1.25rem !important;
  }
  .table-container {
    margin-left: -4px;
    margin-right: -4px;
    border-radius: 12px;
    border: 1px solid var(--border);
  }
  .table-container table {
    font-size: 0.8rem;
  }
  .table-container th,
  .table-container td {
    padding: 10px 8px !important;
    white-space: nowrap;
  }
  /* Boutons d'action : wrap confortable */
  .table-container .flex.gap-10 {
    flex-direction: column;
    align-items: stretch !important;
    gap: 6px !important;
    min-width: 120px;
  }
  .table-container .btn-sm {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    font-size: 0.8rem;
  }
  .auth-card {
    max-width: 100% !important;
    padding: 20px 16px !important;
  }
  .stock-input {
    width: 64px;
  }
  /* Mode sombre bouton plus compact */
  #themeBtn {
    font-size: 0.8rem;
    padding: 8px 12px;
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .dashboard-header h1 {
    font-size: 1.05rem !important;
  }
  .sidebar {
    width: min(288px, 88vw) !important;
  }
}

/* ===== Scroll reveal (apparition progressive) ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Filet de sécurité : un tableau de données (produits, commandes, stocks,
   panier) ne doit jamais rester invisible. Même si la classe .reveal lui
   est appliquée par erreur (ancien cache navigateur, script tiers, etc.),
   on force son affichage immédiat. */
.table-container.reveal {
  opacity: 1 !important;
  transform: none !important;
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Stocks : cartes mobile / tableau desktop */
.stock-cards { display: none; }
.stock-table-desktop { display: block; }

.stock-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.stock-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.stock-card-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}
.stock-card-row { margin-bottom: 12px; font-size: 0.95rem; }
.stock-card-form label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stock-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.stock-card-actions .stock-input {
  flex: 1;
  max-width: 120px;
  min-height: 44px;
  font-size: 1rem;
  border-radius: 10px;
}
.stock-card-actions .btn {
  min-height: 44px;
  flex: 1;
  justify-content: center;
  border-radius: 10px;
}

@media (max-width: 900px) {
  .stock-cards { display: block; }
  .stock-table-desktop { display: none !important; }
  /* Titre long stocks */
  .dashboard-header h1 {
    font-size: 1.05rem !important;
    line-height: 1.35;
  }
}

@media (min-width: 901px) {
  .stock-cards { display: none !important; }
  .stock-table-desktop { display: block !important; }
}


/* =========================================================
   KLURSTEIN – RESPONSIVE HARDENING
   UI-only overrides: no routes, DB schema or business logic changed.
   ========================================================= */
html, body { max-width: 100%; overflow-x: hidden; }
body { min-width: 320px; }
button, input, select, textarea { max-width: 100%; }
input, select, textarea { font-size: 16px; }
table { width: 100%; border-collapse: collapse; }

/* Prevent long content from creating horizontal overflow */
h1, h2, h3, h4, h5, h6, p, a, td, th, label, .btn,
.product-title, .section-header p { overflow-wrap: anywhere; }
.table-container { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-container table { min-width: 640px; }
.table-container.stock-table-desktop table { min-width: 0; }

/* Header / navigation */
.header-inner { min-width: 0; }
.header-actions { flex-shrink: 0; }
.header-actions .btn { white-space: nowrap; }
.nav-link { white-space: nowrap; }

/* Forms */
.form-row { min-width: 0; }
.form-group { min-width: 0; }
.form-group input, .form-group select, .form-group textarea,
.auth-card input, .auth-card select, .auth-card textarea { width: 100%; min-width: 0; }
.auth-card { width: 100%; }

/* Cards / grids */
.product-grid, .category-grid, .features-grid, .reviews-grid,
.stats-grid, .footer-grid { width: 100%; }
.product-card, .category-card, .feature-card, .review-card { min-width: 0; }
.product-body { min-width: 0; }
.product-actions form { min-width: 0; }
.product-actions .btn { white-space: normal; }

/* Cart / checkout */
.cart-layout, .checkout-layout { min-width: 0; }
.cart-summary { min-width: 0; }
.qty-control { flex-wrap: nowrap; }
.summary-row { gap: 12px; }
.summary-row > * { min-width: 0; }
.products-empty { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 30px 12px; }

/* Admin + customer dashboard */
.dashboard { min-width: 0; }
.main-content { min-width: 0; }
.dashboard-header { min-width: 0; }
.dashboard-header > * { min-width: 0; }
.sidebar { max-width: 100vw; }
.stat-card { min-width: 0; }
.stock-card { min-width: 0; }
.stock-card-row { min-width: 0; }
.stock-card-row > * { min-width: 0; }

/* Better keyboard/touch targets */
.lang-btn, .theme-toggle, .cart-btn, .mobile-toggle { min-height: 40px; min-width: 40px; }
button, .btn, .nav-link { -webkit-tap-highlight-color: transparent; }

/* 992px: tablets and small laptops */
@media (max-width: 992px) {
  .section { padding: 64px 0; }
  .section-header { margin-bottom: 36px; }
  .section-header h2 { font-size: clamp(1.65rem, 4vw, 2.2rem); }
  .header-actions .btn-login-desktop,
  .header-actions .btn-account-desktop,
  .header-actions .btn-logout-desktop { display: none; }
  .mobile-toggle { display: inline-flex !important; align-items: center; justify-content: center; }
  .hero { min-height: auto; }
  .hero-content { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 768px: phones / portrait tablets */
@media (max-width: 768px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .promo-slider { gap: 34px; }
  .promo-item { font-size: .78rem; }
  .header-inner { height: 64px; }
  .header-actions { gap: 5px; }
  .lang-switcher { gap: 2px; }
  .lang-btn { padding: 4px 7px; font-size: .72rem; }
  .logo { flex-shrink: 0; }
  .logo span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .hero-content { padding: 42px 16px; }
  .hero-text h1 { font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.08; }
  .hero-text p { font-size: .98rem; }
  .hero-btns { flex-wrap: wrap; }
  .hero-btns .btn { flex: 1 1 170px; justify-content: center; }
  .floating-card { max-width: 44%; }
  .section { padding: 52px 0; }

  .product-grid, .features-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews-grid { grid-template-columns: 1fr; }

  .mid-promo-content, .newsletter-inner { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .newsletter-form { width: 100%; flex-direction: column; }
  .newsletter-form input, .newsletter-form .btn { width: 100%; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

  .auth-page { padding: 24px 14px; min-height: 100svh; }
  .auth-card { padding: 24px 18px; }
  .auth-card .form-row { grid-template-columns: 1fr; }

  /* Customer dashboard */
  .dashboard { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100dvh;
    z-index: 1200;
    transform: translateX(-105%);
    transition: transform .25s ease;
    overflow-y: auto;
    width: min(300px, 88vw);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { width: 100%; padding: 16px 12px 48px !important; }
  .mobile-sidebar-toggle { display: inline-flex !important; }
  .sidebar-overlay { z-index: 1100; }

  /* Admin tables become horizontally scrollable instead of breaking the layout */
  .table-container table { min-width: 700px; }
  .stock-table-desktop table { min-width: 0; }
  .admin-form-grid, .form-row { grid-template-columns: 1fr !important; }
}

/* 480px and below */
@media (max-width: 480px) {
  .container { padding-left: 12px; padding-right: 12px; }
  .header-inner { gap: 4px; }
  .header-actions .lang-switcher { display: none; }
  .logo { font-size: 1.15rem; }
  .theme-toggle, .cart-btn, .mobile-toggle { min-width: 36px; min-height: 36px; font-size: 1rem; }
  .hero-content { padding: 34px 12px; }
  .hero-btns { width: 100%; }
  .hero-btns .btn { width: 100%; flex-basis: 100%; }
  .hero-visual { transform: scale(.92); transform-origin: center; }
  .floating-card { padding: 9px 11px; font-size: .76rem; }
  .category-grid { gap: 10px; }
  .category-card { padding: 16px 10px; }
  .section-header h2 { font-size: 1.55rem; }
  .section-header p { font-size: .92rem; }
  .product-card { border-radius: 10px; }
  .product-actions { flex-direction: column; }
  .product-actions > *, .product-actions form { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 20px 14px; }
  .dashboard-header { flex-wrap: wrap; }
  .dashboard-header h1 { max-width: 100%; font-size: 1.1rem !important; }
  .stock-card-actions { flex-wrap: wrap; }
  .stock-card-actions .btn { flex: 1 1 120px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (min-width: 769px) { .mobile-toggle { display: none !important; } }

@media (max-width: 480px) { .header-actions .lang-switcher { display: flex !important; } }

/* ===== Product detail premium ===== */
.pd-page {
  padding: 28px 0 64px;
  background: linear-gradient(180deg, transparent 0%, rgba(15,23,42,0.02) 100%);
}
.pd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.pd-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}
.pd-breadcrumb a:hover { color: var(--accent); }
.pd-breadcrumb i { font-size: 0.55rem; opacity: 0.5; }
.pd-breadcrumb span {
  color: var(--text);
  font-weight: 500;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}
@media (max-width: 960px) {
  .pd-layout { grid-template-columns: 1fr; gap: 28px; }
}

/* Gallery stage */
.pd-gallery-col { position: sticky; top: 88px; }
@media (max-width: 960px) { .pd-gallery-col { position: static; } }

.pd-stage {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, var(--spotlight-glow), transparent 55%),
    linear-gradient(155deg, #fff7ea 0%, #ffe8c2 100%);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow:
    0 4px 6px -1px rgba(0,0,0,0.05),
    0 20px 40px -12px rgba(0,0,0,0.08);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.dark-mode .pd-stage {
  background:
    radial-gradient(ellipse at 30% 20%, var(--spotlight-glow), transparent 55%),
    linear-gradient(155deg, #1e293b 0%, #12213a 100%);
}
.pd-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  cursor: zoom-in;
  transition: opacity 0.28s ease, transform 0.35s ease;
}
.pd-stage:hover .pd-hero-img { transform: scale(1.03); }
.pd-hero-fallback {
  font-size: 6rem;
  color: var(--accent);
  opacity: 0.35;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.pd-ribbon {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(239,68,68,0.35);
  letter-spacing: 0.02em;
}
.pd-ribbon-alt {
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  box-shadow: 0 8px 20px rgba(37,99,235,0.3);
}

.pd-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, transform 0.2s;
}
.pd-stage:hover .pd-arrow { opacity: 1; }
.pd-arrow:hover { background: var(--accent); color: #fff; transform: translateY(-50%) scale(1.06); }
.pd-arrow-l { left: 14px; }
.pd-arrow-r { right: 14px; }
@media (max-width: 640px) {
  .pd-arrow { opacity: 1; width: 38px; height: 38px; }
}

.pd-zoom-hint {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: rgba(15,23,42,0.65);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.2s;
}
.pd-zoom-hint:hover { background: var(--accent); }

.pd-strip {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.pd-chip {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  border-radius: 14px;
  border: 2px solid transparent;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--card-bg, #f1f5f9);
  scroll-snap-align: start;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.pd-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-chip.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  transform: translateY(-2px);
}
.pd-chip:hover { border-color: var(--accent); }

/* Buy box */
.pd-buybox {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 24px;
  padding: 32px;
  box-shadow:
    0 4px 6px -1px rgba(0,0,0,0.04),
    0 16px 32px -8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pd-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.pd-heading {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}
.pd-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #1e3a5f;
  font-size: 0.95rem;
}
.pd-stars span {
  margin-left: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.pd-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.pd-price-now {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.pd-price-was {
  font-size: 1.15rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.pd-save {
  background: #fef2f2;
  color: #dc2626;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 8px;
}

.pd-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 12px;
  width: fit-content;
}
.pd-availability.in-stock,
.pd-availability.stock-ok {
  background: #ecfdf5;
  color: #059669;
}
.pd-availability.low-stock,
.pd-availability.stock-low {
  background: #fffbeb;
  color: #2a4a73;
}
.pd-availability.out-of-stock,
.pd-availability.stock-out {
  background: #fef2f2;
  color: #dc2626;
}
.pd-low { opacity: 0.8; font-weight: 500; }

.pd-lead {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.pd-cta { margin-top: 8px; }
.pd-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.pd-qty-wrap {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  background: var(--input-bg, #fff);
}
.pd-qty-btn {
  width: 42px;
  height: 48px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
}
.pd-qty-btn:hover { background: rgba(0,0,0,0.04); }
.pd-qty-wrap input {
  width: 52px;
  height: 48px;
  border: none;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  -moz-appearance: textfield;
}
.pd-qty-wrap input::-webkit-outer-spin-button,
.pd-qty-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pd-add-btn {
  flex: 1;
  min-width: 180px;
  height: 52px;
  border-radius: 14px !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 24px -6px color-mix(in srgb, var(--accent) 45%, transparent);
}

.pd-trust {
  list-style: none;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pd-trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.pd-trust i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.pd-panel {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.pd-panel h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 700;
}
.pd-panel-body {
  line-height: 1.75;
  color: var(--text);
  font-size: 0.98rem;
}

.pd-related { margin-top: 8px; }
.product-card-link { text-decoration: none; color: inherit; display: block; }
.product-card-link:hover .product-title { color: var(--accent); }
.product-card-link-area { text-decoration: none; color: inherit; display: block; }
.product-title-link { text-decoration: none; color: inherit; }
.product-title-link:hover { color: var(--accent); }
a.product-img { text-decoration: none; color: inherit; display: flex; }

/* Lightbox premium */
.pd-lb {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: pdFadeIn 0.2s ease;
}
.pd-lb[hidden] { display: none !important; }
@keyframes pdFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.pd-lb img {
  max-width: min(94vw, 1080px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.pd-lb-x {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}
.pd-lb-x:hover { background: rgba(255,255,255,0.22); }
.pd-lb-a {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: background 0.2s;
}
.pd-lb-a:hover { background: rgba(255,255,255,0.25); }
.pd-lb-a-l { left: 18px; }
.pd-lb-a-r { right: 18px; }
.pd-lb-dot {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(0,0,0,0.45);
  padding: 8px 16px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .pd-buybox { padding: 22px 18px; border-radius: 18px; }
  .pd-price-now { font-size: 1.65rem; }
  .pd-add-btn { min-width: 100%; width: 100%; }
  .pd-form { flex-direction: column; align-items: stretch; }
  .pd-qty-wrap { justify-content: center; }
  .pd-stage { border-radius: 18px; }
  .pd-panel { padding: 20px; }
}


/* Admin gallery manager */
.admin-gallery-grid {
  display:flex; flex-wrap:wrap; gap:12px; margin:12px 0;
}
.admin-gallery-item {
  position:relative; width:100px; border:1px solid var(--border,#e2e8f0);
  border-radius:10px; overflow:hidden; background:#f8fafc;
}
.admin-gallery-item img { width:100px; height:80px; object-fit:cover; display:block; }
.admin-gallery-item .ag-actions {
  display:flex; gap:4px; padding:4px; justify-content:center; flex-wrap:wrap;
}
.admin-gallery-item .ag-primary {
  position:absolute; top:4px; left:4px; background:#22c55e; color:#fff;
  font-size:0.65rem; padding:2px 6px; border-radius:4px; font-weight:700;
}

/* 3 slots miniatures avec libellés */
.pd-thumbs-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.pd-thumb-slot {
  position: relative;
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 14px;
  background: var(--card-bg, #f8fafc);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.pd-thumb-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-thumb-slot.is-active {
  border-color: var(--spotlight);
  box-shadow: 0 0 0 3px var(--spotlight-soft);
  transform: translateY(-2px);
}
.pd-thumb-slot:not(.is-empty):hover {
  border-color: var(--spotlight);
}
.pd-thumb-slot.is-empty {
  cursor: default;
  opacity: 0.55;
  border-style: dashed;
  align-items: center;
  justify-content: center;
}
.pd-slot-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-muted);
}
.pd-slot-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(15,23,42,0.75));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 18px 6px 6px;
  text-align: center;
  line-height: 1.2;
}
.pd-thumb-slot.is-empty .pd-slot-label {
  background: transparent;
  color: var(--text-muted);
  position: static;
  padding: 4px 6px 8px;
}

.pd-no-img-hint {
  margin: 12px 16px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 220px;
}

.pd-desc-block {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-left: 4px solid var(--accent, #1e3a5f);
  border-radius: 20px;
  padding: 28px 32px;
  margin-top: 8px;
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.pd-desc-block h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent, #1e3a5f);
}
.pd-desc-text {
  line-height: 1.75;
  color: var(--text);
  font-size: 0.98rem;
}
.pd-desc-empty {
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

.pd-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: start;
  margin-bottom: 36px;
}
@media (max-width: 960px) {
  .pd-main { grid-template-columns: 1fr; gap: 24px; }
}
.pd-gallery { position: sticky; top: 88px; }
@media (max-width: 960px) { .pd-gallery { position: static; } }

.pd-info {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 24px;
  padding: 28px 30px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pd-cat {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.pd-sku {
  margin: -6px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.03em;
}
.pd-barcode {
  margin-top: 8px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-flex;
  align-self: flex-start;
}
.pd-barcode svg { display: block; }
.pd-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.pd-rating { color: #fbbf24; display: flex; align-items: center; gap: 4px; }
.pd-rating span { color: var(--text-muted); margin-left: 6px; font-size: 0.85rem; font-weight: 600; }
.pd-price-block { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pd-price { font-size: 2rem; font-weight: 800; color: var(--accent); }
.pd-old { text-decoration: line-through; color: var(--text-muted); font-size: 1.1rem; }
.pd-discount {
  background: #fef2f2; color: #dc2626; font-weight: 800;
  font-size: 0.8rem; padding: 4px 10px; border-radius: 8px;
}
.pd-stock {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.92rem;
  padding: 10px 14px; border-radius: 12px; width: fit-content;
}
.pd-stock.in-stock { background: #ecfdf5; color: #059669; }
.pd-stock.low-stock { background: #eef2f7; color: #1e3a5f; }
.pd-stock.out-of-stock { background: #fef2f2; color: #dc2626; }

.pd-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pd-qty {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 14px; overflow: hidden;
}
.pd-qty-btn {
  width: 42px; height: 48px; border: none; background: transparent;
  font-size: 1.2rem; cursor: pointer; color: var(--text);
}
.pd-qty-btn:hover { background: rgba(0,0,0,0.04); }
.pd-qty input {
  width: 52px; height: 48px; border: none; text-align: center;
  font-weight: 700; background: transparent; color: var(--text);
  -moz-appearance: textfield;
}
.pd-qty input::-webkit-outer-spin-button,
.pd-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd-cart-btn {
  flex: 1; min-width: 180px; height: 52px; border-radius: 14px !important;
  font-weight: 700 !important; font-size: 1rem !important;
  display: inline-flex !important; align-items: center; justify-content: center; gap: 10px;
}
.pd-perks {
  list-style: none; margin: 12px 0 0; padding: 16px 0 0;
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex; flex-direction: column; gap: 10px;
}
.pd-perks li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--text-muted);
}
.pd-perks i {
  width: 28px; height: 28px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem;
}

@media (max-width: 640px) {
  .pd-thumbs-row { gap: 8px; }
  .pd-slot-label { font-size: 0.6rem; }
  .pd-info { padding: 20px 16px; }
  .pd-cart-btn { min-width: 100%; width: 100%; }
  .pd-form { flex-direction: column; align-items: stretch; }
  .pd-desc-block { padding: 20px; }
}

/* ===== Product cards – overlay on image ===== */
.product-card-overlay {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  will-change: transform;
}
.product-card-overlay:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18), 0 0 0 3px var(--spotlight-soft);
}
.product-card-overlay:active {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}
.product-card-overlay .product-img {
  position: relative;
  height: 300px;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(145deg, #e8eef5 0%, #d4dde8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-overlay .product-img.has-photo {
  background:
    radial-gradient(ellipse at 30% 25%, var(--spotlight-glow), transparent 60%),
    linear-gradient(155deg, #fff7ea 0%, #ffe8c2 100%);
}
body.dark-mode .product-card-overlay .product-img.has-photo {
  background:
    radial-gradient(ellipse at 30% 25%, var(--spotlight-glow), transparent 60%),
    linear-gradient(155deg, #1e293b 0%, #12213a 100%);
}
.product-card-overlay .product-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 22px;
  transition: transform 0.5s ease;
  border-radius: 22px;
}
.product-card-overlay:hover .product-photo {
  transform: scale(1.06);
}
.product-card-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  text-decoration: none;
}
.product-card-overlay .product-img-icon {
  width: 100px; height: 100px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  box-shadow: 0 4px 16px rgba(15,23,42,0.12);
  font-size: 2.6rem;
  color: var(--accent);
  opacity: 0.85;
  z-index: 0;
  position: relative;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
body.dark-mode .product-card-overlay .product-img-icon {
  background: rgba(15,23,42,0.45);
}
.product-card-overlay:hover .product-img-icon {
  opacity: 1;
  transform: scale(1.08);
}

.product-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  gap: 8px;
  pointer-events: none;
}
.product-overlay-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.product-float-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card-overlay:hover .product-float-badge {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 16px rgba(0,0,0,0.28);
}
.product-float-discount {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
.product-float-promo {
  background: linear-gradient(135deg, var(--accent, #1e3a5f), #2a4a73);
}
.product-float-stock {
  position: static !important;
  font-size: 0.68rem !important;
  padding: 5px 9px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  max-width: 48%;
  text-align: right;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: transform 0.25s ease;
}
.product-card-overlay:hover .product-float-stock {
  transform: translateY(-2px);
}

.product-overlay-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 52px 14px 14px;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(15, 23, 42, 0.55) 55%,
    transparent 100%
  );
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  border-radius: 0 0 22px 22px;
  transition: background 0.3s ease, padding 0.3s ease;
}
.product-card-overlay:hover .product-overlay-bottom {
  padding-bottom: 16px;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.7) 58%,
    transparent 100%
  );
}
.product-overlay-info {
  text-decoration: none;
  color: inherit;
  pointer-events: auto;
  display: block;
  transition: opacity 0.2s ease;
}
.product-overlay-info:hover .product-overlay-title {
  color: #e2e8f0;
}
.product-overlay-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
  color: #fff;
  transition: color 0.2s ease;
}
.product-overlay-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.product-overlay-sku {
  display: block;
  font-size: 0.7rem;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,0.65);
  margin: -2px 0 6px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.product-overlay-now {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  transition: transform 0.25s ease;
}
.product-card-overlay:hover .product-overlay-now {
  transform: translateX(2px);
}
.product-overlay-was {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  text-decoration: line-through;
  font-weight: 500;
}

.product-overlay-cart {
  pointer-events: auto;
}
.product-overlay-btn {
  width: 100%;
  border-radius: 12px !important;
  font-weight: 700 !important;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  pointer-events: auto;
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease !important;
}
.product-card-overlay:hover .product-overlay-btn:not(:disabled):not(.product-overlay-btn-unavailable) {
  box-shadow: 0 8px 20px rgba(30, 58, 95, 0.45);
}
.product-overlay-btn:not(:disabled):not(.product-overlay-btn-unavailable):hover {
  background: var(--accent-hover, #2a4a73) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(30, 58, 95, 0.5) !important;
  filter: brightness(1.05);
}
.product-overlay-btn:not(:disabled):not(.product-overlay-btn-unavailable):active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.35) !important;
}
.product-overlay-btn:disabled {
  cursor: not-allowed;
}
.product-overlay-btn-unavailable,
.product-overlay-btn-unavailable:disabled {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
  opacity: 1 !important;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
  cursor: not-allowed;
  font-weight: 700 !important;
}
.product-overlay-btn-unavailable:hover,
.product-overlay-btn-unavailable:disabled:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #fff !important;
  transform: none;
  filter: brightness(0.95);
}

.product-card-overlay .product-body,
.product-card-overlay .product-card-footer { display: none !important; }

@media (max-width: 640px) {
  .product-card-overlay .product-img { height: 240px; border-radius: 18px; }
  .product-card-overlay { border-radius: 18px; }
  .product-overlay-title { font-size: 0.88rem; }
  .product-overlay-now { font-size: 1.05rem; }
  .product-overlay-bottom { padding: 44px 12px 12px; border-radius: 0 0 18px 18px; }
  .product-overlay-btn { border-radius: 10px !important; font-size: 0.82rem !important; }
  /* Sur mobile : pas de translate excessif */
  .product-card-overlay:hover {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card-overlay,
  .product-card-overlay .product-photo,
  .product-float-badge,
  .product-overlay-btn,
  .product-overlay-bottom {
    transition: none !important;
  }
  .product-card-overlay:hover .product-photo {
    transform: none;
  }
  .product-card-overlay:hover {
    transform: none;
  }
}

.pd-qty-hint {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 4px;
}
.pd-price-block .pd-price {
  transition: transform 0.15s ease;
}


/* ==========================================================================
   KLURSTEIN — REFONTE PAGE D'ACCUEIL / CARROUSELS + BANNIÈRES
   Cette couche est volontairement scoped sur la page d'accueil afin de ne
   pas modifier les grilles produits des autres pages.
   ========================================================================== */

#featured {
  overflow: hidden;
}

#featured > .container {
  max-width: 1320px;
}

#featured .cat-row {
  margin: 0 0 72px;
}

#featured .cat-row:last-child {
  margin-bottom: 20px;
}

#featured .cat-row-header {
  align-items: flex-end;
  margin: 0 0 20px;
  padding: 0 4px;
}

#featured .cat-row-header > div {
  min-width: 0;
}

#featured .cat-row-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: .72rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .82;
}

#featured .cat-row-header h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -.025em;
}

#featured .cat-see-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15,23,42,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

#featured .cat-see-all:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(15,23,42,.09);
  text-decoration: none;
}

#featured .cat-carousel {
  margin: 0 -2px;
  padding: 0 0 4px;
}

#featured .cat-carousel-track {
  gap: 14px;
  padding: 5px 5px 14px;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

#featured .cat-carousel-track:focus-visible {
  outline: 3px solid rgba(30,58,95,.22);
  outline-offset: 3px;
  border-radius: 18px;
}

#featured .cat-carousel-item {
  flex: 0 0 clamp(190px, 19vw, 228px);
  min-width: 0;
  scroll-snap-align: start;
}

#featured .cat-carousel-item .product-card-overlay {
  height: 100%;
  border-radius: 18px;
  box-shadow: 0 7px 24px rgba(15,23,42,.08);
}

#featured .cat-carousel-item .product-card-overlay .product-img {
  height: 190px;
}

#featured .cat-carousel-item .product-card-overlay .product-photo {
  transition: transform .35s ease;
}

#featured .cat-carousel-item .product-card-overlay:hover .product-photo {
  transform: scale(1.035);
}

#featured .cat-carousel-arrow {
  width: 46px;
  height: 46px;
  border: 0;
  background: rgba(255,255,255,.96);
  color: var(--accent);
  box-shadow: 0 10px 28px rgba(15,23,42,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode #featured .cat-carousel-arrow {
  background: rgba(15,23,42,.94);
}

#featured .cat-carousel-arrow.cat-arrow-left {
  left: -13px;
}

#featured .cat-carousel-arrow.cat-arrow-right {
  right: -13px;
}

#featured .cat-carousel-arrow:disabled {
  opacity: .38;
  cursor: default;
  pointer-events: none;
}

#featured .room-banner-category {
  margin: 26px 0 0;
  min-height: 365px;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(15,23,42,.12);
  background-color: #334155;
  background-repeat: no-repeat;
}

#featured .room-banner-category::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.10), transparent 55%);
}

#featured .room-banner-content {
  padding: 46px 54px;
  max-width: 570px;
}

#featured .room-banner-content h3 {
  max-width: 520px;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  letter-spacing: -.035em;
}

#featured .room-banner-content p {
  max-width: 500px;
}

#featured .room-banner-content .btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  #featured .cat-carousel-item {
    flex-basis: 210px;
  }
}

@media (max-width: 768px) {
  #featured .cat-row {
    margin-bottom: 56px;
  }

  #featured .cat-row-header {
    align-items: center;
    margin-bottom: 14px;
  }

  #featured .cat-row-kicker {
    font-size: .66rem;
  }

  #featured .cat-see-all {
    padding: 8px 10px;
    font-size: .75rem;
  }

  #featured .cat-carousel-item {
    flex-basis: min(205px, 62vw);
  }

  #featured .cat-carousel-item .product-card-overlay .product-img {
    height: 168px;
  }

  #featured .cat-carousel-arrow {
    width: 38px;
    height: 38px;
  }

  #featured .cat-carousel-arrow.cat-arrow-left {
    left: -7px;
  }

  #featured .cat-carousel-arrow.cat-arrow-right {
    right: -7px;
  }

  #featured .room-banner-category {
    min-height: 350px;
    margin-top: 20px;
    border-radius: 20px;
    background-position: 62% center;
  }

  #featured .room-banner-content {
    padding: 30px 24px;
    max-width: 100%;
  }

  #featured .room-banner-content h3 {
    font-size: clamp(1.55rem, 7vw, 2.1rem);
  }

  #featured .room-banner-content p {
    font-size: .92rem;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  #featured .cat-row-header {
    gap: 10px;
  }

  #featured .cat-row-header h3 {
    font-size: 1.22rem;
  }

  #featured .cat-see-all {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    padding: 5px 0;
  }

  #featured .cat-carousel-item {
    flex-basis: 74vw;
  }

  #featured .cat-carousel-item .product-card-overlay .product-img {
    height: 178px;
  }

  #featured .room-banner-category {
    min-height: 360px;
  }

  #featured .room-banner-content {
    padding: 26px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #featured .cat-carousel-track {
    scroll-behavior: auto;
  }

  #featured .cat-carousel-item .product-card-overlay,
  #featured .cat-carousel-item .product-photo,
  #featured .cat-see-all,
  #featured .cat-carousel-arrow {
    transition: none !important;
  }
}


/* ==========================================================================
   V9 — 3 SECTIONS HOMEPAGE / CARTES NETTES / CARROUSEL ROBUSTE
   ========================================================================== */

#featured .cat-row {
  position: relative;
  margin-bottom: 64px;
}

#featured .cat-carousel {
  position: relative;
  width: 100%;
  overflow: visible;
}

#featured .cat-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  cursor: grab;
}

#featured .cat-carousel-track::-webkit-scrollbar {
  display: none;
}

#featured .cat-carousel-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

#featured .cat-carousel-item {
  flex: 0 0 220px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  scroll-snap-align: start;
  overflow: visible;
}

#featured .cat-carousel-item .product-card-overlay {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 340px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}

#featured .cat-carousel-item .product-card-overlay .product-img {
  position: relative;
  flex: 0 0 190px;
  height: 190px;
  min-height: 190px;
  overflow: hidden;
  background: #f8fafc;
}

#featured .cat-carousel-item .product-card-overlay .product-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

#featured .cat-carousel-item .product-card-overlay .product-info,
#featured .cat-carousel-item .product-card-overlay .product-details,
#featured .cat-carousel-item .product-card-overlay .card-content {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding: 14px 15px 16px;
  background: var(--card-bg);
}

#featured .cat-carousel-item .product-card-overlay .product-title,
#featured .cat-carousel-item .product-card-overlay h3,
#featured .cat-carousel-item .product-card-overlay h4 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  margin-bottom: 7px;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: anywhere;
}

#featured .cat-carousel-item .product-card-overlay .price,
#featured .cat-carousel-item .product-card-overlay .product-price {
  position: relative;
  z-index: 3;
  white-space: nowrap;
}

#featured .cat-carousel-item .product-card-overlay::before,
#featured .cat-carousel-item .product-card-overlay::after {
  pointer-events: none;
}

#featured .cat-carousel-arrow {
  z-index: 20;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(15,23,42,.08);
  background: var(--card-bg);
  box-shadow: 0 10px 26px rgba(15,23,42,.16);
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}

#featured .cat-carousel-arrow:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 14px 30px rgba(15,23,42,.2);
}

#featured .cat-carousel-arrow:disabled,
#featured .cat-carousel-arrow.is-disabled {
  opacity: .25;
  cursor: default;
}

#featured .cat-carousel-arrow.cat-arrow-left {
  left: -22px;
}

#featured .cat-carousel-arrow.cat-arrow-right {
  right: -22px;
}

#featured .room-banner-category {
  position: relative;
  isolation: isolate;
  min-height: 390px;
  margin-top: 30px;
  overflow: hidden;
  border-radius: 24px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 50px rgba(15,23,42,.14);
}

#featured .room-banner-category::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2,6,23,.58) 0%, rgba(2,6,23,.30) 43%, rgba(2,6,23,.05) 78%),
    linear-gradient(0deg, rgba(2,6,23,.18), transparent 45%);
}

#featured .room-banner-content {
  position: relative;
  z-index: 2;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 46px 54px;
  color: #fff;
}

#featured .room-banner-content h3 {
  max-width: 560px;
  margin: 7px 0 10px;
  color: #fff;
  font-size: clamp(1.8rem, 3.3vw, 3rem);
  line-height: 1.08;
  text-shadow: 0 2px 16px rgba(0,0,0,.2);
}

#featured .room-banner-content p {
  max-width: 500px;
  margin: 0 0 20px;
  color: rgba(255,255,255,.94);
  line-height: 1.55;
}

#featured .room-banner-content .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  padding: 12px 19px;
  font-weight: 800;
}

@media (max-width: 900px) {
  #featured .cat-carousel-item {
    flex-basis: 210px;
    width: 210px;
    min-width: 210px;
    max-width: 210px;
  }

  #featured .cat-carousel-arrow.cat-arrow-left { left: -8px; }
  #featured .cat-carousel-arrow.cat-arrow-right { right: -8px; }
}

@media (max-width: 600px) {
  #featured .cat-carousel-track {
    gap: 14px;
    padding-inline: 2px;
  }

  #featured .cat-carousel-item {
    flex-basis: min(76vw, 245px);
    width: min(76vw, 245px);
    min-width: min(76vw, 245px);
    max-width: min(76vw, 245px);
  }

  #featured .cat-carousel-item .product-card-overlay .product-img {
    flex-basis: 185px;
    height: 185px;
    min-height: 185px;
  }

  #featured .cat-carousel-arrow {
    width: 40px;
    height: 40px;
  }

  #featured .room-banner-category,
  #featured .room-banner-content {
    min-height: 360px;
  }

  #featured .room-banner-content {
    padding: 28px 22px;
  }
}

/* ============================================================
   HERO style Klarstein.fr – disposition exacte
   Grande image gauche + 2 bannières empilées à droite
   ============================================================ */
.ks-hero {
  width: 100%;
  background: #f8f8f8;
  padding: 0;
  margin: 0;
}
.ks-hero-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px 8px;
}
.ks-hero-main {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  min-height: 420px;
  text-decoration: none;
  color: #fff;
}
.ks-hero-main-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}
.ks-hero-main:hover .ks-hero-main-bg {
  transform: scale(1.03);
}
.ks-hero-main-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(15,23,42,0.72) 0%, rgba(15,23,42,0.25) 55%, transparent 100%);
  z-index: 1;
}
.ks-hero-main-content {
  position: relative;
  z-index: 2;
  padding: 48px 40px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 420px;
}
.ks-hero-main-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 12px;
  color: #fff;
}
.ks-hero-main-content h1 span {
  color: #fbbf24;
}
.ks-hero-main-content p {
  font-size: 1.05rem;
  opacity: 0.92;
  margin: 0 0 24px;
  line-height: 1.5;
  max-width: 420px;
}
.ks-hero-btn {
  display: inline-block;
  background: #0f172a;
  color: #fff;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  width: fit-content;
  transition: background 0.2s;
}
.ks-hero-main:hover .ks-hero-btn {
  background: #1e293b;
}

/* Deux bannières latérales empilées */
.ks-hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ks-side-card {
  position: relative;
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  min-height: 200px;
  text-decoration: none;
  color: #fff;
  display: block;
}
.ks-side-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}
.ks-side-card:hover .ks-side-bg {
  transform: scale(1.04);
}
.ks-side-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.75) 0%, rgba(15,23,42,0.2) 60%, transparent 100%);
  z-index: 1;
}
.ks-side-content {
  position: relative;
  z-index: 2;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 200px;
}
.ks-side-content h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: #fff;
}
.ks-side-btn {
  display: inline-block;
  background: #0f172a;
  color: #fff;
  padding: 9px 16px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.85rem;
  width: fit-content;
  transition: background 0.2s;
}
.ks-side-card:hover .ks-side-btn {
  background: #1e293b;
}

/* Newsletter strip juste sous le hero (style Klarstein) */
.ks-newsletter-strip {
  background: #f1f5f9;
  border-bottom: 1px solid var(--border, #e2e8f0);
  padding: 28px 0;
}
.ks-newsletter-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.ks-newsletter-discount {
  font-size: 2.6rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  white-space: nowrap;
}
.ks-newsletter-text {
  flex: 1;
  min-width: 220px;
}
.ks-newsletter-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text, #0f172a);
}
.ks-newsletter-text p {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.95rem;
}
.ks-newsletter-form {
  display: flex;
  gap: 0;
  min-width: 280px;
}
.ks-newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text, #0f172a);
}
.ks-newsletter-form input:focus {
  outline: none;
  border-color: var(--accent, #1e3a5f);
}
.ks-newsletter-form button {
  border-radius: 0 6px 6px 0;
  padding: 12px 18px;
}

/* Kicker au-dessus du titre de catégorie */
.cat-row-kicker {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent, #1e3a5f);
  margin-bottom: 4px;
}

/* Responsive Klarstein hero */
@media (max-width: 960px) {
  .ks-hero-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px 6px;
  }
  .ks-hero-main {
    min-height: 340px;
  }
  .ks-hero-main-content {
    min-height: 340px;
    padding: 32px 24px;
  }
  .ks-hero-main-content h1 {
    font-size: 1.85rem;
  }
  .ks-hero-side {
    flex-direction: row;
  }
  .ks-side-card {
    min-height: 180px;
  }
  .ks-side-content {
    min-height: 180px;
    padding: 18px 16px;
  }
  .ks-side-content h3 {
    font-size: 1.1rem;
  }
}
@media (max-width: 600px) {
  .ks-hero-side {
    flex-direction: column;
  }
  .ks-newsletter-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .ks-newsletter-discount {
    font-size: 2.1rem;
  }
  .ks-newsletter-form {
    width: 100%;
  }
}

/* ============================================================
   Catégories préférées – carousel Klarstein (image + nom seul)
   ============================================================ */
.ks-pref-cats { padding-top: 40px; padding-bottom: 20px; }
.ks-pref-carousel {
  position: relative;
  margin-top: 12px;
}
.ks-pref-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 4px 16px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ks-pref-track::-webkit-scrollbar { display: none; }
.ks-pref-item {
  flex: 0 0 calc(25% - 15px);
  min-width: 180px;
  max-width: 260px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.25s ease;
}
.ks-pref-item:hover { transform: translateY(-4px); }
.ks-pref-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.06);
}
.ks-pref-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.ks-pref-item:hover .ks-pref-img img { transform: scale(1.05); }
.ks-pref-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e2e8f0, #f8fafc);
  color: var(--accent, #1e3a5f);
  font-size: 2.8rem;
}
.ks-pref-name {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text, #0f172a);
  line-height: 1.3;
  padding: 0 4px;
}
/* Flèches partagées avec les carrousels existants */
.ks-pref-carousel .cat-carousel-arrow,
.ks-inspo-carousel .cat-carousel-arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  transition: background 0.2s, box-shadow 0.2s;
}
.ks-pref-carousel .cat-carousel-arrow:hover,
.ks-inspo-carousel .cat-carousel-arrow:hover {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.ks-pref-carousel .cat-arrow-left,
.ks-inspo-carousel .cat-arrow-left { left: -8px; }
.ks-pref-carousel .cat-arrow-right,
.ks-inspo-carousel .cat-arrow-right { right: -8px; }

/* ============================================================
   Série design – 4 cartes (Victoria, Velaire, Verosteel, Smart)
   ============================================================ */
.ks-design-series { padding-top: 28px; padding-bottom: 36px; }
.ks-design-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 8px;
}
.ks-design-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(15,23,42,0.05);
}
.ks-design-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(15,23,42,0.12);
}
.ks-design-img {
  width: 100%;
  aspect-ratio: 16 / 11;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}
.ks-design-card:hover .ks-design-img { transform: scale(1.04); }
.ks-design-body {
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.ks-design-body h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: var(--text, #0f172a);
}
.ks-design-body p {
  font-size: 0.88rem;
  color: var(--text-muted, #64748b);
  margin: 0 0 10px;
  line-height: 1.4;
  flex: 1;
}
.ks-design-btn {
  display: inline-block;
  background: #0f172a;
  color: #fff;
  padding: 9px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  width: fit-content;
  transition: background 0.2s;
}
.ks-design-card:hover .ks-design-btn { background: #1e293b; }

/* ============================================================
   Inspiration – carousel guides lifestyle
   ============================================================ */
.ks-inspiration { padding-top: 20px; padding-bottom: 40px; }
.ks-inspo-carousel { position: relative; margin-top: 8px; }
.ks-inspo-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 4px 16px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ks-inspo-track::-webkit-scrollbar { display: none; }
.ks-inspo-card {
  flex: 0 0 calc(25% - 14px);
  min-width: 200px;
  max-width: 280px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease;
}
.ks-inspo-card:hover { transform: translateY(-4px); }
.ks-inspo-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.07);
  transition: transform 0.4s ease;
}
.ks-inspo-card:hover .ks-inspo-img { transform: scale(1.03); }
.ks-inspo-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #0f172a);
  line-height: 1.35;
  padding: 0 2px;
}

/* Responsive */
@media (max-width: 1100px) {
  .ks-design-grid { grid-template-columns: repeat(2, 1fr); }
  .ks-pref-item { flex: 0 0 calc(33.333% - 14px); }
  .ks-inspo-card { flex: 0 0 calc(33.333% - 12px); }
}
@media (max-width: 700px) {
  .ks-design-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ks-pref-item { flex: 0 0 calc(50% - 10px); min-width: 140px; }
  .ks-inspo-card { flex: 0 0 calc(50% - 10px); min-width: 160px; }
  .ks-pref-carousel .cat-carousel-arrow,
  .ks-inspo-carousel .cat-carousel-arrow {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 480px) {
  .ks-design-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Homepage – lisibilité, coordination, flèches carrousels
   ============================================================ */
.section {
  padding-top: 48px;
  padding-bottom: 48px;
}
.ks-pref-cats,
.ks-design-series,
.ks-inspiration,
#featured {
  padding-top: 40px;
  padding-bottom: 36px;
}
.section-header {
  margin-bottom: 28px;
}
.section-header h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-header p {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.98rem;
}

/* Flèches universelles – toujours cliquables et visibles */
.ks-pref-carousel,
.ks-inspo-carousel,
.cat-carousel {
  position: relative;
  padding: 0 8px;
}
.ks-pref-carousel .cat-carousel-arrow,
.ks-inspo-carousel .cat-carousel-arrow,
.cat-carousel .cat-carousel-arrow,
[data-carousel] .cat-carousel-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.2s;
  pointer-events: auto;
}
.ks-pref-carousel .cat-carousel-arrow:hover:not(:disabled),
.ks-inspo-carousel .cat-carousel-arrow:hover:not(:disabled),
.cat-carousel .cat-carousel-arrow:hover:not(:disabled),
[data-carousel] .cat-carousel-arrow:hover:not(:disabled) {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
}
.ks-pref-carousel .cat-carousel-arrow:disabled,
.ks-inspo-carousel .cat-carousel-arrow:disabled,
.cat-carousel .cat-carousel-arrow:disabled,
[data-carousel] .cat-carousel-arrow:disabled,
.ks-pref-carousel .cat-carousel-arrow.is-disabled,
.ks-inspo-carousel .cat-carousel-arrow.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.ks-pref-carousel .cat-arrow-left,
.ks-inspo-carousel .cat-arrow-left,
.cat-carousel .cat-arrow-left,
[data-carousel] .cat-arrow-left { left: 0; }
.ks-pref-carousel .cat-arrow-right,
.ks-inspo-carousel .cat-arrow-right,
.cat-carousel .cat-arrow-right,
[data-carousel] .cat-arrow-right { right: 0; }

/* Tracks – padding pour ne pas masquer les flèches */
.ks-pref-track,
.ks-inspo-track {
  padding-left: 36px;
  padding-right: 36px;
}

/* Vignettes produits (même style populaire) – zone cliquable claire */
.ks-pref-item {
  cursor: pointer;
}
.ks-pref-item .ks-pref-img {
  border: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.ks-pref-item:hover .ks-pref-img {
  border-color: rgba(30, 58, 95, 0.2);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}
.ks-pref-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

/* Espacement entre blocs produit home */
.ks-pref-products {
  margin-bottom: 40px;
}
.ks-pref-products:last-child {
  margin-bottom: 8px;
}
.cat-row-header {
  margin-bottom: 16px;
}
.cat-row-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

/* Hero un peu plus aéré */
.ks-hero {
  margin-bottom: 0;
}
.ks-newsletter-strip {
  margin-bottom: 8px;
}

/* Design series – hauteur homogène */
.ks-design-card {
  height: 100%;
}
.ks-design-body {
  min-height: 140px;
}

/* Drag feedback */
.cat-carousel-track.is-dragging,
.ks-pref-track.is-dragging,
.ks-inspo-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

@media (max-width: 700px) {
  .ks-pref-carousel .cat-carousel-arrow,
  .ks-inspo-carousel .cat-carousel-arrow,
  [data-carousel] .cat-carousel-arrow {
    width: 38px;
    height: 38px;
  }
  .ks-pref-track,
  .ks-inspo-track {
    padding-left: 28px;
    padding-right: 28px;
  }
  .section {
    padding-top: 32px;
    padding-bottom: 32px;
  }
}
