/* =========================================
   Carton Market - Bootstrap 5 Theme (v2)
   =========================================
   1. Variables CSS (override Bootstrap)
   2. Typographie
   3. Boutons
   4. Cards
   5. Top bar
   6. Header
   7. Navigation & Mega-menu
   8. Breadcrumb
   9. Sidebar
   10. Avantages
   11. Footer
   12. Utilitaires & Composants partagés
   ========================================= */

/* -----------------------------------------
   1. Variables CSS
   ----------------------------------------- */
:root {
  /* Marque */
  --cm-orange: #ff7800;
  --cm-orange-hover: #e66d00;
  --cm-brown: #6d5236;
  --cm-brown-light: #8a6d4f;

  /* Texte */
  --cm-text: #2d2d2d;
  --cm-text-muted: #6c757d;
  --cm-text-light: #999;

  /* Surfaces */
  --cm-bg: #ffffff;
  --cm-bg-light: #f8f9fa;
  --cm-bg-warm: #fdf8f3;
  --cm-border: #e9ecef;

  /* Feedback */
  --cm-success: #198754;
  --cm-danger: #dc3545;

  /* Shadows (unified scale) */
  --cm-shadow-sm: 0 1px 4px rgba(109, 82, 54, 0.06);
  --cm-shadow-md: 0 4px 16px rgba(109, 82, 54, 0.1);
  --cm-shadow-lg: 0 8px 32px rgba(109, 82, 54, 0.14);

  /* Border radius (unified scale) */
  --cm-radius-sm: 0.25rem;   /* inputs, small badges */
  --cm-radius-md: 0.5rem;    /* buttons, standard cards */
  --cm-radius-lg: 0.75rem;   /* large cards, containers */

  /* Prix (shared gradient) */
  --cm-price-bg: linear-gradient(135deg, #fff5eb 0%, #fff0e0 100%);
  --cm-price-border: 1px solid rgba(255, 120, 0, 0.15);

  /* Override Bootstrap */
  --bs-primary: #ff7800;
  --bs-body-color: #2d2d2d;
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bs-border-radius: var(--cm-radius-md);
}

/* -----------------------------------------
   1b. Bootstrap Primary Button Overrides
   ----------------------------------------- */
.btn-primary {
  --bs-btn-bg: var(--cm-orange);
  --bs-btn-border-color: var(--cm-orange);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--cm-orange-hover);
  --bs-btn-hover-border-color: var(--cm-orange-hover);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--cm-orange-hover);
  --bs-btn-active-border-color: var(--cm-orange-hover);
  --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--cm-orange);
  --bs-btn-disabled-border-color: var(--cm-orange);
}

.btn-outline-primary {
  --bs-btn-color: var(--cm-orange);
  --bs-btn-border-color: var(--cm-orange);
  --bs-btn-hover-bg: var(--cm-orange);
  --bs-btn-hover-border-color: var(--cm-orange);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--cm-orange-hover);
  --bs-btn-active-border-color: var(--cm-orange-hover);
  --bs-btn-active-color: #fff;
}

/* -----------------------------------------
   2. Typographie
   ----------------------------------------- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cm-text);
  background-color: #f6f3ef;
}

/* White column effect: breadcrumb + main content */
.cm-breadcrumb-wrap {
  background: var(--cm-bg-warm);
  box-shadow: var(--cm-shadow-sm);
  padding-left: 2rem;
  padding-right: 2rem;
  border-bottom: 1px solid var(--cm-border);
}
main.container-xl {
  background: #fff;
  box-shadow: var(--cm-shadow-sm);
  padding-left: 2rem;
  padding-right: 2rem;
}

h1 { font-size: 2rem; font-weight: 700; color: var(--cm-brown); }
h2 { font-size: 1.65rem; font-weight: 600; color: var(--cm-brown); }
h3 { font-size: 1.35rem; font-weight: 600; color: var(--cm-text); }
h4 { font-size: 1.15rem; font-weight: 600; color: var(--cm-text); }
h5 { font-size: 1.05rem; font-weight: 600; }
h6 { font-size: 0.95rem; font-weight: 600; }

a { color: var(--cm-text); transition: color 0.2s ease; }
a:hover { color: var(--cm-orange); }

@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
}

/* -----------------------------------------
   3. Boutons
   ----------------------------------------- */
.btn-cm {
  background-color: var(--cm-orange);
  color: #fff;
  border: none;
  border-radius: var(--cm-radius-md);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  transition: background-color 0.2s ease;
}
.btn-cm:hover,
.btn-cm:focus {
  background-color: var(--cm-orange-hover);
  color: #fff;
}
.btn-cm:active {
  background-color: #cc6200;
  color: #fff;
}

.btn-cm-outline {
  background: transparent;
  border: 2px solid var(--cm-orange);
  color: var(--cm-orange);
  border-radius: var(--cm-radius-md);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  transition: all 0.2s ease;
}
.btn-cm-outline:hover {
  background-color: var(--cm-orange);
  color: #fff;
}

/* Primary action button - highly visible */
.btn-cm-primary {
  background: linear-gradient(135deg, var(--cm-orange) 0%, #e07000 100%);
  color: #fff;
  border: none;
  border-radius: var(--cm-radius-md);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.875rem 2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(232, 126, 4, 0.35);
  transition: all 0.25s ease;
}
.btn-cm-primary:hover,
.btn-cm-primary:focus {
  background: linear-gradient(135deg, #e07000 0%, var(--cm-orange) 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(232, 126, 4, 0.5);
  transform: translateY(-2px);
}
.btn-cm-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(232, 126, 4, 0.3);
}

/* -----------------------------------------
   4. Cards
   ----------------------------------------- */
.card-cm {
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-lg);
  box-shadow: var(--cm-shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}
.card-cm:hover {
  box-shadow: var(--cm-shadow-md);
  transform: translateY(-2px);
}

/* -----------------------------------------
   5. Top bar
   ----------------------------------------- */
.cm-topbar {
  background-color: var(--cm-bg-light);
  font-size: 0.95rem;
}
.cm-topbar a:hover {
  color: var(--cm-orange) !important;
}

/* Promo banner */
.cm-promo-banner {
  background-color: var(--cm-orange);
  color: #fff;
}
.cm-promo-banner a {
  color: #fff;
}
.cm-promo-banner a:hover {
  color: #2d2d2d;
}

/* -----------------------------------------
   6. Header
   ----------------------------------------- */
.cm-header {
  background: #fff;
}

.cm-header .form-control:focus {
  border-color: var(--cm-orange);
  box-shadow: 0 0 0 0.2rem rgba(255, 120, 0, 0.15);
}

/* -----------------------------------------
   7. Navigation & Mega-menu
   ----------------------------------------- */
.cm-navbar {
  background: var(--cm-bg-warm);
  border-color: var(--cm-brown) !important;
  border-width: 2px !important;
  --bs-navbar-padding-y: 0;
  padding: 0 !important;
}

/* Nav items — séparateurs verticaux subtils */
.cm-navbar .nav-item {
  position: relative;
}
.cm-navbar .nav-item + .nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: var(--cm-brown);
  opacity: 0.2;
}

.cm-navbar .nav-link {
  color: var(--cm-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 0.85rem;
  white-space: nowrap;
  border-radius: var(--cm-radius-sm);
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Underline animé (hover + actif) — ::before pour éviter conflit avec dropdown-toggle::after */
.cm-navbar .nav-link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--cm-orange);
  border-radius: 0;
  transition: width 0.25s ease;
  z-index: 1;
}
.cm-navbar .nav-link:hover::before,
.cm-navbar .nav-link.active::before {
  width: 70%;
}

/* Hover : texte orange + fond blanc */
.cm-navbar .nav-link:hover,
.cm-navbar .nav-item.dropdown:hover > .nav-link {
  color: var(--cm-orange);
  background-color: #fff;
}

/* Actif */
.cm-navbar .nav-link.active {
  color: var(--cm-orange);
  font-weight: 600;
}

/* Icônes Bootstrap — toujours orange */
.cm-navbar .nav-link i.bi {
  color: var(--cm-orange);
  transition: transform 0.2s ease;
}
.cm-navbar .nav-link:hover i.bi {
  transform: scale(1.15);
}

/* Category icons (images) in navbar */
.cm-nav-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-right: 0.35rem;
  vertical-align: middle;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cm-navbar .nav-link:hover .cm-nav-icon {
  opacity: 1;
  transform: scale(1.1);
}

/* Mega dropdown */
.cm-mega-dropdown {
  border: none;
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  padding: 1.5rem;
  border-top: 2px solid var(--cm-orange);
  background: #fff;
}

/* Desktop: hover to open dropdown with smooth transition */
@media (min-width: 992px) {
  .cm-navbar .navbar-nav {
    position: static;
  }
  .cm-navbar .nav-item.dropdown {
    position: static;
  }
  .cm-navbar .nav-item.dropdown > .cm-mega-dropdown {
    display: block !important;
    position: absolute;
    top: 100%;
    margin-top: -2px;
    left: 0;
    right: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }
  .cm-navbar .nav-item.dropdown:hover > .cm-mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 200ms;
  }
  /* Bridge to prevent gap between nav-item and dropdown */
  .cm-navbar .nav-item.dropdown > .cm-mega-dropdown::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
  }
  /* Multi-column layout for even distribution of subcategories */
  .cm-mega-dropdown .cm-mega-row {
    display: block !important;
    column-count: 4;
    column-gap: 1rem;
    transition: padding-left 0.15s ease;
  }
  .cm-mega-dropdown .cm-mega-row .col-md-3 {
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: 0.75rem;
    padding-left: 0;
    padding-right: 0;
  }
}

.cm-mega-dropdown a {
  font-size: 0.95rem;
}
.cm-mega-dropdown a:hover {
  color: var(--cm-orange);
}

/* -----------------------------------------
   8. Breadcrumb
   ----------------------------------------- */
.breadcrumb-item + .breadcrumb-item::before {
  content: ">";
}
.breadcrumb-item a {
  color: var(--cm-text-muted);
  text-decoration: none;
}
.breadcrumb-item a:hover {
  color: var(--cm-orange);
}

/* -----------------------------------------
   9. Sidebar
   ----------------------------------------- */
.cm-sidebar {
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-md);
  padding: 1rem;
  position: sticky;
  top: 1rem;
}
.cm-sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cm-brown);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--cm-orange);
}
.cm-sidebar-title a {
  color: var(--cm-brown);
  text-decoration: none;
}
.cm-sidebar-title a:hover {
  color: var(--cm-orange);
  text-decoration: none;
}
.cm-sidebar-list li a {
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-radius: var(--cm-radius-sm);
}
.cm-sidebar-list li a:hover {
  padding-left: 0.5rem;
  background: var(--cm-bg-light);
}

/* -----------------------------------------
   10. Avantages
   ----------------------------------------- */
.cm-avantages {
  background-color: var(--cm-bg-light);
  position: relative;
}
.cm-avantages::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to bottom, var(--cm-bg-light), transparent);
  pointer-events: none;
  z-index: 1;
}
.cm-avantages h2 {
  color: var(--cm-brown);
}

/* -----------------------------------------
   11. Footer
   ----------------------------------------- */
.cm-footer {
  background-color: #2d2d2d;
  color: rgba(255,255,255,0.85);
}
.cm-footer h2 {
  color: #fff;
}
.cm-footer a {
  color: rgba(255,255,255,0.85);
}
.cm-footer a:hover {
  color: #fff;
}

/* Footer first column - center logo above block */
.cm-footer > .container-xl > .row > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cm-footer > .container-xl > .row > div:first-child > img {
  background: rgba(255,255,255,0.9);
  padding: 0.75rem 1rem;
  border-radius: var(--cm-radius-md);
}
.cm-footer > .container-xl > .row > div:first-child .cm-footer-block {
  width: 100%;
}

/* Footer second column - center vertically */
.cm-footer > .container-xl > .row > .col-lg-4 {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Footer blocks */
.cm-footer-block {
  background: rgba(255,255,255,0.05);
  border-radius: var(--cm-radius-lg);
  padding: 1rem;
}
.cm-footer-block-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cm-footer-block-title i {
  color: var(--cm-orange);
}
.cm-footer-block-title a {
  color: #fff;
  text-decoration: none;
}
.cm-footer-block-title a:hover {
  color: var(--cm-orange);
}
.cm-footer-link {
  color: var(--cm-orange) !important;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  margin-top: 0.5rem;
}
.cm-footer-link:hover {
  text-decoration: underline;
}
.cm-footer-link-small {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.95rem;
}
.cm-footer-link-small:hover {
  color: #fff;
}

/* Social buttons */
.cm-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}
.cm-social-btn:hover {
  background: var(--cm-orange);
  color: #fff;
  transform: translateY(-2px);
}

/* Footer bottom */
.cm-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* -----------------------------------------
   12. Utilitaires & Composants partagés
   ----------------------------------------- */

/* Utility colors */
.cm-text-orange { color: var(--cm-orange) !important; }
.cm-text-brown { color: var(--cm-brown) !important; }
.bg-cm-orange { background-color: var(--cm-orange) !important; }

/* Back to top button */
.cm-back-to-top {
  position: fixed;
  bottom: 5rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--cm-orange);
  color: #fff;
  border-radius: 50%;
  display: none;
  cursor: pointer;
  z-index: 1050;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background-color 0.2s ease;
  font-size: 1.25rem;
  line-height: 44px;
  text-align: center;
}
.cm-back-to-top:hover {
  background: var(--cm-orange-hover);
}

/* Form focus states */
.form-control:focus,
.form-select:focus {
  border-color: var(--cm-orange);
  box-shadow: 0 0 0 0.2rem rgba(255, 120, 0, 0.15);
}

/* Badge for cart */
.badge.bg-dark {
  font-size: 0.65rem;
}

/* Offcanvas mobile menu */
.offcanvas .accordion-button:not(.collapsed) {
  background-color: var(--cm-bg-warm);
  color: var(--cm-orange);
}
.offcanvas .accordion-button:focus {
  box-shadow: none;
  border-color: var(--cm-border);
}

/* Legacy compatibility: existing page content styles */
#myContent img { max-width: 100%; height: auto; }
#myContent table { max-width: 100%; overflow-x: auto; display: block; }

/* Product price color */
.cm-price {
  color: var(--cm-orange);
  font-weight: 700;
}

/* Pagination override */
.page-link {
  color: var(--cm-text);
}
.page-link:hover {
  color: var(--cm-orange);
}
.page-item.active .page-link {
  background-color: var(--cm-orange);
  border-color: var(--cm-orange);
  color: #fff;
}

/* Stock badge */
.badge-stock-ok { background-color: var(--cm-success); }
.badge-stock-low { background-color: var(--cm-danger); }

/* Notification messages */
.message {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1070;
  text-align: center;
  padding: 0;
  font-size: 0.95rem;
}
.message p {
  margin: 0;
  padding: 0.75rem 1rem;
}
.message.success,
.message.valid {
  background-color: var(--cm-success);
  color: #fff;
}
.message.info {
  background-color: #0d6efd;
  color: #fff;
}
.message.error {
  background-color: var(--cm-danger);
  color: #fff;
}

/* Cart popup */
#cart_block {
  background: #fff;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-md);
  box-shadow: var(--cm-shadow-md);
}

/* =========================================
   13. Legacy shared elements
   ========================================= */
.separ-line {
  border-top: 1px solid var(--cm-border);
  margin: 1.5rem 0;
}
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Legacy .button class → styled as CTA */
.button,
input.button,
a.button {
  display: inline-block;
  background-color: var(--cm-orange);
  color: #fff !important;
  border: none;
  border-radius: var(--cm-radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  text-decoration: none !important;
  transition: background-color 0.2s ease;
  text-align: center;
  line-height: 1.5;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.button:hover,
input.button:hover,
a.button:hover {
  background-color: var(--cm-orange-hover);
  color: #fff !important;
}
.button-small {
  font-size: 0.95rem;
  padding: 0.4rem 1rem;
}

/* =========================================
   14. Homepage (accueil.php)
   ========================================= */
#homeTitle {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--cm-brown);
  text-align: center;
  padding: 1.5rem 1rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  color: var(--cm-brown);
}

/* Category grid - Bento tile design */
#home-items2 {
  margin: 0 auto;
  padding: 1rem 0;
}
#home-items2 ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  gap: 0.75rem;
}
/* Bento layout: hero item + secondary hero */
#home-items2 li.an-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
#home-items2 li.an-item:nth-child(6) { grid-column: span 2; }

#home-items2 li.an-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #e8e0d6;
  box-shadow: var(--cm-shadow-sm);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}
/* Frosted glass text area at bottom */
#home-items2 li.an-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgb(145, 127, 108) 0%, transparent 100%);
  z-index: 1;
  transition: height 0.35s ease;
}
#home-items2 li.an-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}
#home-items2 li.an-item:hover::before {
  height: 60%;
}
#home-items2 li.an-item a {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 1rem 1.1rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  text-decoration: none;
  text-align: left;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  line-height: 1.25;
  letter-spacing: 0.01em;
  transition: padding 0.35s ease;
}
/* Hero item: bigger text */
#home-items2 li.an-item:nth-child(1) a {
  font-size: 1.35rem;
  padding: 1.5rem;
}
/* Secondary hero */
#home-items2 li.an-item:nth-child(6) a {
  font-size: 1rem;
}
#home-items2 li.an-item:hover a {
  padding-bottom: 1.3rem;
}
#home-items2 li.an-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#home-items2 li.an-item:hover img {
  transform: scale(1.06);
}

/* Tablet */
@media (max-width: 992px) {
  #home-items2 ul {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 140px;
  }
  #home-items2 li.an-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  #home-items2 li.an-item:nth-child(6) { grid-column: span 1; }
}
/* Small tablet */
@media (max-width: 768px) {
  #home-items2 ul {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 120px;
    gap: 0.5rem;
  }
  #home-items2 li.an-item:nth-child(1) { grid-column: span 1; grid-row: span 2; }
  #home-items2 li.an-item:nth-child(6) { grid-column: span 1; }
  #home-items2 li.an-item a {
    font-size: 0.8rem;
    padding: 0.6rem 0.7rem;
  }
  #home-items2 li.an-item:nth-child(1) a { font-size: 0.95rem; padding: 0.8rem; }
}
/* Mobile */
@media (max-width: 576px) {
  #home-items2 ul {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 110px;
    gap: 0.4rem;
  }
  #home-items2 li.an-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  #home-items2 li.an-item:nth-child(6) { grid-column: span 2; }
  #home-items2 li.an-item a {
    font-size: 0.78rem;
    padding: 0.5rem 0.6rem;
  }
  #home-items2 li.an-item:nth-child(1) a { font-size: 0.95rem; }
  #homeTitle {
    font-size: 1.2rem;
  }
}

/* SEO text sections */
#homeTxt, #homeTxt1 {
  max-width: 900px;
  margin: 1rem auto;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--cm-text);
}
#homeTxt h2, #homeTxt1 h2 {
  margin-top: 1.5rem;
}
#homeTxt p, #homeTxt1 p {
  margin-bottom: 0.75rem;
}

/* Hero CTA button */
.btn-cm-lg {
  display: inline-block;
  background-color: var(--cm-orange);
  color: #fff !important;
  border: none;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(255, 120, 0, 0.3);
}
.btn-cm-lg:hover {
  background-color: var(--cm-orange-hover);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 120, 0, 0.4);
}

/* Engagements/services */
#engageServices {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
#engageServices ul {
  flex: 1;
  min-width: 250px;
  list-style: none;
  padding: 1.25rem;
  margin: 0;
  border-radius: var(--cm-radius-lg);
  border: 1px solid var(--cm-border);
}
#engageServices ul.engage-col {
  background: linear-gradient(135deg, #fdf8f3 0%, #fff5eb 100%);
  border-color: rgba(255, 120, 0, 0.2);
}
#engageServices ul.services-col {
  background: linear-gradient(135deg, #f3f8fd 0%, #ebf2ff 100%);
  border-color: rgba(109, 82, 54, 0.15);
}
#engageServices ul li:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--cm-border);
}
#engageServices .engage-icon {
  font-size: 1.25rem;
  color: var(--cm-orange);
}
#engageServices ul li b {
  font-size: 1.1rem;
  color: var(--cm-brown);
}
#engageServices ul li.arg {
  padding: 0.5rem 0;
  padding-left: 0;
  position: relative;
  font-size: 0.95rem;
}
#engageServices ul li.arg i {
  color: var(--cm-orange);
  width: 1.25rem;
  text-align: center;
  margin-right: 0.35rem;
}

/* Reviews section */
.hreview-aggregate {
  margin: 1.5rem 0;
}
.hreview-aggregate h3 {
  color: var(--cm-brown);
}

/* =========================================
   15. Category Listing (categorie.php)
   ========================================= */

/* Subcategory tiles - Modern tile design (like homepage) */
#listCategs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
}
#listCategs .subcat-tile {
  position: relative;
  border-radius: var(--cm-radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: #e8e0d6;
  box-shadow: var(--cm-shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#listCategs .subcat-tile::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgb(145, 127, 108) 0%, transparent 100%);
  z-index: 1;
  transition: height 0.3s ease;
}
#listCategs .subcat-tile:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--cm-shadow-lg);
}
#listCategs .subcat-tile:hover::before {
  height: 60%;
}
#listCategs .subcat-tile a {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 1rem 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff !important;
  text-decoration: none;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  line-height: 1.2;
  transition: transform 0.3s ease, padding 0.3s ease;
}
#listCategs .subcat-tile:hover a {
  transform: translateY(-4px);
  padding-bottom: 1.25rem;
}
#listCategs .subcat-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
#listCategs .subcat-tile:hover img {
  transform: scale(1.08);
}

@media (max-width: 992px) {
  #listCategs { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  #listCategs { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
  #listCategs .subcat-tile a { font-size: 0.8rem; padding: 0.75rem 0.5rem; }
}
@media (max-width: 576px) {
  #listCategs { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  #listCategs .subcat-tile a { font-size: 0.75rem; padding: 0.5rem; }
}
.myButtonCat {
  display: inline-block;
  padding: 0.4rem 1rem;
  margin: 0.25rem;
  border: 1px solid var(--cm-border);
  border-radius: 2rem;
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--cm-text);
  transition: all 0.2s;
}
.myButtonCat:hover {
  background: var(--cm-orange);
  color: #fff;
  border-color: var(--cm-orange);
}

/* Product list grid */
#product_list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
#product_list > li {
  border: 1px solid transparent;
  border-radius: var(--cm-radius-lg);
  padding: 1rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(109, 82, 54, 0.1);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
  cursor: pointer;
}
#product_list > li:hover {
  box-shadow: var(--cm-shadow-lg);
  transform: translateY(-4px);
  border-color: var(--cm-orange);
}
#product_list > li:hover .imgProduct {
  transform: scale(1.04);
}
.imgProduct {
  transition: transform 0.3s ease;
}

/* Product name */
#product_list h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.3;
  min-height: 2.4em;
}
#product_list h3 a {
  color: var(--cm-text);
  text-decoration: none;
}
#product_list h3 a:hover {
  color: var(--cm-orange);
}

/* Product dimensions */
.dimensions {
  font-size: 0.95rem;
  color: var(--cm-text-muted);
  margin-bottom: 0.5rem;
}

/* Product image */
.imgProduct {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
  margin: 0.5rem auto;
  border-radius: var(--cm-radius-sm);
}

/* Product resume */
.resume {
  font-size: 0.85rem;
  color: var(--cm-text-muted);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  flex-grow: 1;
  /* Fixed height with vertical scroll */
  max-height: 4.2em; /* ~3 lines */
  overflow-y: auto;
  overflow-x: hidden;
}

/* Price display */
.price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cm-orange);
  margin-bottom: 0.5rem;
}
/* Push price to bottom in product listing cards */
#product_list > li > .price,
#product_list > li > div > .price {
  margin-top: auto;
}

/* Center price/qty/button in product listing */
#product_list > li {
  text-align: center;
}
#product_list > li .price {
  justify-content: center;
  background: var(--cm-price-bg);
  border: var(--cm-price-border);
  border-radius: var(--cm-radius-sm);
  padding: 0.3rem 0.6rem;
  display: inline-block;
}
#product_list > li .qtyBloc {
  justify-content: center;
}
#product_list > li h3 {
  text-align: center;
}
#product_list > li .dimensions {
  text-align: center;
}
/* Center qty controls when not using qtyBloc wrapper (promos.php pattern) */
#product_list > li .qtyInput {
  display: inline-block;
  vertical-align: middle;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-sm);
}
#product_list > li > .qtyButtons {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0.5rem;
}
.oldPrice {
  font-size: 0.95rem;
  color: var(--cm-text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-right: 0.5rem;
}

/* Discount badge */
/* Product image wrapper for badge overlay */
.product-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--cm-radius-md);
  margin-bottom: 0.5rem;
}
.product-image-wrap .imgProduct {
  width: 100%;
  display: block;
}

/* Product badges (promo / nouveau) */
.badge-promo {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--cm-danger);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  z-index: 2;
  line-height: 1.3;
}
.badge-new {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--cm-green);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  z-index: 2;
  line-height: 1.3;
}

/* Badges on product page image */
#image-block {
  position: relative;
}
#image-block .badge-promo,
#image-block .badge-new {
  font-size: 0.9rem;
  padding: 0.3rem 0.7rem;
}

/* Stock indicator */
.stock-low {
  font-size: 0.75rem;
  color: var(--cm-danger);
  font-weight: 600;
  margin-bottom: 0.25rem;
  animation: pulse-stock 2s ease-in-out infinite;
}
@keyframes pulse-stock {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.stock-ok {
  font-size: 0.75rem;
  color: var(--cm-success);
  margin-bottom: 0.25rem;
}

/* Product card position for badge overlay */
#product_list > li {
  position: relative;
}

/* Quantity controls */
.qtyBloc {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 0.5rem;
}
.qtyButtons {
  display: flex;
  align-items: center;
}
.lessButton,
.plusButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cm-border);
  background: var(--cm-bg-light);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cm-text);
  user-select: none;
  transition: background 0.15s;
}
.lessButton:hover,
.plusButton:hover {
  background: var(--cm-border);
}
.lessButton {
  border-radius: 0.25rem 0 0 0.25rem;
}
.plusButton {
  border-radius: 0 0.25rem 0.25rem 0;
}
.plusButton[disabled],
.plusButton.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--cm-bg-light);
  pointer-events: none;
}
.qtyInput,
.qtyButtons input[type="text"] {
  width: 44px;
  height: 36px;
  text-align: center;
  border: 1px solid var(--cm-border);
  border-left: none;
  border-right: none;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  font-family: 'Inter', sans-serif;
}

/* Add to cart button in listings */
#product_list .ajax_add_to_cart {
  margin-top: auto;
  width: 100%;
  display: block;
  font-size: 0.95rem;
  padding: 0.4rem 0.5rem;
}

/* Stock alert button in listings */
.fancyAlert {
  display: inline-block;
  background: var(--cm-text-muted);
  color: #fff !important;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--cm-radius-sm);
  text-decoration: none !important;
}

/* Product count */
#countProducts {
  font-size: 0.95rem;
  color: var(--cm-text-muted);
  margin-bottom: 1rem;
}

/* Pagination */
#pagination_bottom {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}
#pagination_bottom .pagination {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  padding: 0;
}
#pagination_bottom .pagination li {
  display: inline-block;
}
#pagination_bottom .pagination li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-sm);
  text-decoration: none;
  color: var(--cm-text);
  font-size: 0.95rem;
  transition: all 0.15s;
}
#pagination_bottom .pagination li a:hover {
  background: var(--cm-orange);
  color: #fff;
  border-color: var(--cm-orange);
}
#pagination_bottom .pagination li.current a {
  background: var(--cm-orange);
  color: #fff;
  border-color: var(--cm-orange);
  font-weight: 600;
}

/* Category description */
.categDescription {
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
}
.categDescription img {
  border-radius: var(--cm-radius-md);
  margin: 0 1rem 1rem 0;
  max-width: 250px;
}

@media (max-width: 576px) {
  #product_list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  #product_list > li {
    padding: 0.75rem;
  }
  #product_list h3 {
    font-size: 0.95rem;
  }
  .price {
    font-size: 1rem;
  }
  #product_list .qtyBloc {
    display: none;
  }
}

/* =========================================
   16. Product Page (produit.php)
   ========================================= */
.hproduct {
  max-width: 100% !important;
}
.hproduct > .clearfix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .hproduct > .clearfix {
    grid-template-columns: 1fr;
  }
  #right-column {
    text-align: center;
  }
  #buy_block .price {
    display: block;
    text-align: center;
  }
  #buy_block .qtyButtons {
    justify-content: center;
  }
  #buy_block .ajax_add_to_cart {
    margin-left: auto;
    margin-right: auto;
  }
  .cm-trust-badges {
    justify-content: center;
  }
}

/* Image area */
#left-column {
  float: none !important;
  width: 100% !important;
}
#image-block {
  text-align: center;
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#image-block img.photo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--cm-radius-md);
  border: 1px solid var(--cm-border);
}
#image-list {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
#image-list .an-image {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--cm-radius-sm);
  overflow: hidden;
  transition: border-color 0.15s;
}
#image-list .an-image:hover,
#image-list .an-image.live-image {
  border-color: var(--cm-orange);
}
#image-list .an-image img {
  border-radius: var(--cm-radius-sm);
}

/* Product info area */
#right-column {
  float: none !important;
  width: 100% !important;
}
#right-column h1.fn {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cm-brown);
  margin-bottom: 0.5rem;
}

/* Buy form */
#buy_block {
  margin-top: 1rem;
}
#buy_block .left,
#buy_block .right {
  float: none !important;
  width: 100% !important;
}
#buy_block .price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--cm-orange);
  margin: 0.75rem 0;
  background: var(--cm-price-bg);
  border: var(--cm-price-border);
  border-radius: var(--cm-radius-md);
  padding: 0.5rem 1rem;
  display: inline-block;
}
.price-ttc {
  font-size: 0.95rem;
  color: var(--cm-text-muted);
  margin-bottom: 0.25rem;
}
#buy_block .cartInfos {
  margin-bottom: 1rem;
}
#buy_block .cartInfos label {
  font-size: 0.95rem;
  color: var(--cm-text-muted);
  display: block;
  margin-bottom: 0.25rem;
}
#buy_block .qtyButtons {
  display: inline-flex;
  margin-bottom: 1rem;
}

/* Add to cart main button */
#buy_block .ajax_add_to_cart {
  display: block;
  width: 100%;
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  border-radius: 2rem;
  margin-top: 0.5rem;
}

/* Trust badges under add-to-cart */
.cm-trust-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid var(--cm-border);
}
.cm-trust-badges span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--cm-text-muted);
}
.cm-trust-badges i.bi {
  color: var(--cm-success);
  font-size: 0.95rem;
}

/* Attributes/options */
.attributes {
  margin-bottom: 1rem;
}
.attributes label {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.25rem;
}
.attributes select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--cm-border);
  border-radius: 0.375rem;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: var(--cm-text);
}
.attributes select:focus {
  border-color: var(--cm-orange);
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(255,120,0,0.15);
}

/* Stock status */
#availability_status {
  font-size: 0.95rem;
  margin-top: 1rem;
  padding: 0.5rem 0;
}
#available {
  color: var(--cm-success);
  font-weight: 600;
}
#unavailable {
  color: var(--cm-danger);
  font-weight: 600;
}

/* Product description card */
.cm-description-card {
  margin-top: 2rem;
  margin-bottom: 2rem;
  background: var(--cm-bg-warm);
  border: 1px solid #e8ddd3;
  border-radius: 0.5rem;
  padding: 1.5rem 2rem;
}
/* Product badges under main image */
.cm-product-badge {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--cm-bg-warm);
  border: 1px solid #e8ddd3;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--cm-brown);
}
.cm-product-badge img {
  max-height: 40px;
  vertical-align: middle;
}
.description {
  margin-top: 0;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--cm-gray-900, #333);
}
.description p {
  margin-bottom: 0.75rem;
}
.description ul,
.description ol {
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
}
.description li {
  margin-bottom: 0.35rem;
}
.description a {
  color: var(--cm-orange);
  text-decoration: underline;
}
.description a:hover {
  color: var(--cm-brown);
}
.description img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
}
.description .video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 1rem 0;
}
.description .video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0 !important;
}

/* Bulk pricing table */
#productGrocery {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
#productGrocery th {
  background: var(--cm-bg-light);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--cm-border);
}
#productGrocery td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--cm-border);
  vertical-align: middle;
}
#productGrocery .oldPriceG {
  text-decoration: line-through;
  color: var(--cm-text-muted);
}
#productGrocery .priceG {
  font-weight: 700;
  color: var(--cm-orange);
  font-size: 1.1rem;
}

/* Cross-selling section */
.crossInfos {
  margin-top: 2rem;
}
h2.crossInfos {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: var(--cm-brown);
}
.ca-container {
  margin-top: 1rem;
}
.ca-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.ca-item {
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-lg);
  padding: 1rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  background: #fff;
}
.ca-item:hover {
  box-shadow: var(--cm-shadow-md);
  transform: translateY(-2px);
}
.ca-item .ca-icon img {
  max-width: 120px;
  height: auto;
  margin-bottom: 0.5rem;
}
.ca-item h5 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ca-item h5 a {
  color: var(--cm-text);
  text-decoration: none;
}
.ca-item h5 a:hover {
  color: var(--cm-orange);
}
.ca-item .price {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  background: var(--cm-price-bg);
  border: var(--cm-price-border);
  border-radius: var(--cm-radius-sm);
  padding: 0.2rem 0.5rem;
  display: inline-block;
}
.ca-item .qtyBloc {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.ca-item .ajax_add_to_cart {
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
  margin-top: 0.5rem;
}

@media (max-width: 576px) {
  .ca-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================
   17. Override inline styles from legacy pages
   ========================================= */

/* =========================================
   18. Cart Page (panier.php)
   ========================================= */

/* Progress steps indicator */
.step {
  display: flex;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.step li {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cm-text-muted);
}
.step li::after {
  content: "→";
  margin-left: 1rem;
  color: var(--cm-border);
}
.step li:last-child::after {
  display: none;
}
.step_current {
  color: var(--cm-orange) !important;
  font-weight: 700 !important;
}
.step_done {
  color: var(--cm-success) !important;
}
.step_todo {
  color: var(--cm-text-muted);
}
@media (max-width: 576px) {
  .step {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }
  .step li::after {
    display: none;
  }
}

/* Cart table */
#cart_summary {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
#cart_summary thead th {
  background: var(--cm-bg-light);
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--cm-border);
  font-size: 0.95rem;
}
#cart_summary tbody td {
  padding: 1rem 0.5rem;
  border-bottom: 1px solid var(--cm-border);
  vertical-align: middle;
}
#cart_summary tfoot td,
#cart_summary tfoot th {
  padding: 0.5rem;
  text-align: right;
}
#cart_summary .cart_image img {
  max-width: 80px;
  border-radius: var(--cm-radius-sm);
}
#cart_summary .cart_description a {
  font-weight: 600;
  color: var(--cm-text);
  text-decoration: none;
}
#cart_summary .cart_description a:hover {
  color: var(--cm-orange);
}
.dimension-cart {
  font-size: 0.95rem;
  color: var(--cm-text-muted);
  margin-top: 0.25rem;
}
#cart_summary .cart-price {
  font-weight: 600;
  color: var(--cm-orange);
}
#cart_summary .cart_delete a {
  color: var(--cm-danger);
  font-size: 0.95rem;
  cursor: pointer;
}
.table_block {
  overflow-x: auto;
}

/* Hide on mobile */
.mobile-th, .mobile-td {
  display: none;
}
@media (max-width: 768px) {
  .mobile-th, .mobile-td {
    display: table-cell;
  }
  #cart_summary thead th:nth-child(n+3),
  #cart_summary tbody td:nth-child(n+3) {
    display: none;
  }
  .mobile-th, .mobile-td {
    display: table-cell !important;
  }
}

/* Cart totals footer */
#cart_summary tfoot tr:last-child td,
#cart_summary tfoot tr:last-child th {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cm-orange);
  padding-top: 1rem;
}

/* Promo code form */
#cpForm {
  margin: 1rem 0;
}
#cpForm input[type="text"] {
  padding: 0.5rem;
  border: 1px solid var(--cm-border);
  border-radius: 0.375rem;
  font-size: 0.95rem;
  width: 200px;
  margin-left: 0.5rem;
}
.aContentBox {
  background: var(--cm-bg-light);
  padding: 1rem;
  border-radius: var(--cm-radius-md);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Cart links */
.linksCart {
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--cm-orange);
}
.linksCart:hover {
  text-decoration: underline;
}

/* Large button */
.button_large {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  border-radius: 2rem;
}
.button-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================================
   19. Checkout Steps (etape1-4.php)
   ========================================= */

/* Step 1: Login/Register */
.connect-form,
.subscribe-box {
  width: 48%;
  min-width: 300px;
}
.connect-form {
  float: left;
}
.subscribe-box {
  float: right;
  background: var(--cm-bg-light);
  padding: 1.5rem;
  border-radius: var(--cm-radius-md);
}
@media (max-width: 768px) {
  .connect-form,
  .subscribe-box {
    float: none;
    width: 100%;
    margin-bottom: 1.5rem;
  }
}
.formLine {
  margin-bottom: 1rem;
}
.formLine label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--cm-text);
}
.formLine input[type="text"],
.formLine input[type="password"],
.formLine input[type="email"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--cm-border);
  border-radius: 0.375rem;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
}
.formLine input:focus {
  border-color: var(--cm-orange);
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(255,120,0,0.15);
}
.forget-password {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}
.message-error,
#retMessage.message.message-error {
  background: var(--cm-danger);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* Step 2: Delivery */
/* Layout now uses Bootstrap grid (col-lg-4/col-lg-8) */
.address table {
  width: 100%;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.address table th {
  text-align: left;
  font-weight: 600;
  padding: 0.35rem 0.5rem 0.35rem 0;
  width: 100px;
  color: var(--cm-text-muted);
}
.address table td {
  padding: 0.35rem 0;
}
.address textarea,
#comments {
  width: 100%;
  min-height: 80px;
  padding: 0.5rem;
  border: 1px solid var(--cm-border);
  border-radius: 0.375rem;
  font-size: 0.95rem;
  resize: vertical;
  font-family: 'Inter', sans-serif;
}
.address textarea:focus,
#comments:focus {
  border-color: var(--cm-orange);
  outline: none;
}

/* Shipping methods */
.shipping h2 {
  margin-bottom: 1rem;
}
.contentColis,
.infosColis {
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.contentColis:hover,
.infosColis:hover {
  border-color: var(--cm-orange);
  box-shadow: var(--cm-shadow-sm);
}
.live-shipping,
.contentColis.live-shipping,
.infosColis.live-shipping {
  border-color: var(--cm-orange);
  background: var(--cm-bg-warm);
}

/* Shipping check icon */
.checkLivraison {
  display: none;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}
.infosColis {
  position: relative;
}
.live-shipping .checkLivraison {
  display: block;
}

/* Shipping method header - title and price on same line */
.infosColis > .clearfix {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.infosColis .imgColis {
  display: none;
}
.infosColis h5 {
  margin: 0;
  flex-grow: 1;
}
.infosColis .priceColis {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--cm-orange);
  white-space: nowrap;
  padding-right: 2rem; /* Space for check icon */
}

/* Relais check icon (DPD Pickup) */
.checkRelais {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
}
.linerelais {
  position: relative;
  padding: 0.5rem;
  cursor: pointer;
}
.linerelais:hover {
  background-color: var(--cm-bg-warm);
}

.clicDelivery {
  cursor: pointer;
}

/* Relay points list */
.linerelais {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  margin: 0.25rem 0;
  border-radius: var(--cm-radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.linerelais:hover {
  background: var(--cm-bg-light);
}
.checkRelais {
  margin-right: 0.75rem;
}

/* Shipping section mobile responsive */
.contentColis {
  overflow-x: auto;
  word-wrap: break-word;
}
#tablerelais {
  width: 100%;
}
@media (max-width: 768px) {
  .infosColis > .clearfix {
    flex-wrap: wrap;
  }
  .infosColis h5 {
    font-size: 0.95rem;
  }
  .infosColis .priceColis {
    font-size: 1rem;
    padding-right: 1.5rem;
  }
  .contentColis p,
  .contentColis {
    font-size: 0.875rem;
  }
  #tablerelais td {
    display: block;
    padding: 0.25rem 0.5rem;
  }
  #tablerelais tr {
    display: block;
    border-bottom: 1px solid var(--cm-border);
    padding: 0.5rem 0;
  }
  .address-carton-market {
    float: none !important;
    margin-bottom: 1rem;
  }
  #horaires {
    float: none !important;
    width: 100%;
  }
}

/* Bottom form buttons */
.bottom-form {
  margin-top: 1.5rem;
  text-align: right;
}

/* Step 3: Payment */
.payment {
  width: 55%;
  float: right;
}
#order-details {
  width: 40%;
  float: left;
}
@media (max-width: 768px) {
  .payment,
  #order-details {
    float: none;
    width: 100%;
    margin-bottom: 1.5rem;
  }
}
#order-details h4 {
  margin-bottom: 0.75rem;
}
#order-details table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
#order-details table th,
#order-details table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--cm-border);
}

/* Payment methods */
.infosPaiement,
.paymentChoice {
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.infosPaiement:hover,
.paymentChoice:hover {
  border-color: var(--cm-orange);
}
.live-payment,
.infosPaiement.live-payment,
.paymentChoice.live-payment {
  border-color: var(--cm-orange);
  background: var(--cm-bg-warm);
}
.paymentChoice .checkPayment {
  display: none;
}
.paymentChoice.live-payment .checkPayment {
  display: inline;
}
.imgPayment, .imgPayment2 {
  margin-bottom: 0.5rem;
}
.imgPayment img, .imgPayment2 img {
  max-height: 40px;
}

/* CGV checkbox */
#check_cgv {
  margin-right: 0.5rem;
}
.nostyle {
  width: auto;
  margin: 0;
}

/* Step 4: Confirmation/Redirect */
#Redirect {
  text-align: center;
  padding: 3rem 1rem;
}
#Redirect p {
  font-size: 1.1rem;
}

/* =========================================
   20. Customer Account Pages
   ========================================= */
.account-sidebar {
  width: 25%;
  float: left;
}
.account-content {
  width: 70%;
  float: right;
}
@media (max-width: 768px) {
  .account-sidebar,
  .account-content {
    float: none;
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* =========================================
   21. CMS Pages
   ========================================= */
.cms-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.8;
}
.cms-content h2,
.cms-content h3 {
  margin-top: 1.5rem;
}
.cms-content ul, .cms-content ol {
  margin-left: 1.5rem;
}

/* =========================================
   22. Utility Overrides
   ========================================= */

/* Image max-width for content images only (exclude header/footer/payment icons) */
img { max-width: 100%; }
#myContent img, .cm-cart-items img { height: auto; }

/* Fancybox overlay compatibility */
#fancybox-outer,
#fancybox-wrap {
  z-index: 1070;
}

/* Bootstrap Modal fixes - prevent jumping/flickering */
.modal {
  z-index: 1055 !important;
}
.modal-backdrop {
  z-index: 1050 !important;
}
.modal-dialog {
  z-index: 1056;
}
.modal.fade .modal-dialog {
  transition: transform 0.2s ease-out;
}
.modal.show .modal-dialog {
  transform: none;
}
/* Ensure modal content is above backdrop */
.modal-content {
  position: relative;
  z-index: 1;
}

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* =========================================
   23. Minicart Dropdown (hover preview)
   ========================================= */
.cm-minicart {
  position: relative;
}
/* Override overflow:hidden from ripple effect so cart badge is visible */
#showCart {
  overflow: visible;
}
.cm-minicart-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: var(--cm-radius-lg);
  box-shadow: var(--cm-shadow-lg);
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1060;
  margin-top: 0.5rem;
}
.cm-minicart:hover .cm-minicart-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.cm-minicart-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #fff;
}
.cm-minicart-dropdown h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cm-text);
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--cm-border);
}
.cm-minicart-items {
  max-height: 250px;
  overflow-y: auto;
}
.cm-minicart-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cm-border);
}
.cm-minicart-item:last-child {
  border-bottom: none;
}
.cm-minicart-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 0.375rem;
  background: #f9f9f9;
}
.cm-minicart-item-info {
  flex: 1;
}
.cm-minicart-item-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cm-text);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}
.cm-minicart-item-qty {
  font-size: 0.85rem;
  color: var(--cm-text-muted);
}
.cm-minicart-total {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 2px solid var(--cm-border);
  font-weight: 600;
}
.cm-minicart-total span:last-child {
  color: var(--cm-orange);
  font-size: 1.1rem;
}
.cm-minicart-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.cm-minicart-actions a {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.cm-minicart-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--cm-text-muted);
}
.cm-minicart-empty i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}
.cm-minicart-more {
  font-size: 0.95rem;
  color: var(--cm-text-muted);
  text-align: center;
  padding: 0.5rem 0;
}

/* =========================================
   24. Cart Page v2 (panier.php) - AJAX
   ========================================= */

/* Checkout progress steps - enhanced visibility */
.cm-checkout-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  background: var(--cm-bg-light);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
}
.cm-checkout-steps li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cm-text-muted);
  position: relative;
}
.cm-checkout-steps li:not(:last-child)::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--cm-border);
  margin-left: 1rem;
}
.cm-checkout-steps li .step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cm-border);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.cm-checkout-steps li.active {
  color: var(--cm-orange);
}
.cm-checkout-steps li.active .step-number {
  background: var(--cm-orange);
  box-shadow: 0 4px 12px rgba(255, 120, 0, 0.3);
}
.cm-checkout-steps li.active::after {
  background: linear-gradient(to right, var(--cm-orange), var(--cm-border));
}
.cm-checkout-steps li.done {
  color: var(--cm-success);
}
.cm-checkout-steps li.done .step-number {
  background: var(--cm-success);
}
.cm-checkout-steps li.done::after {
  background: var(--cm-success);
}
.cm-checkout-steps li.done a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cm-checkout-steps li.done a:hover {
  color: var(--cm-orange);
}
@media (max-width: 768px) {
  .cm-checkout-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
  }
  .cm-checkout-steps li::after {
    display: none !important;
  }
  .cm-checkout-steps li {
    width: 100%;
    padding: 0.5rem;
  }
}

/* Cart items container */
.cm-cart-items {
  background: #fff;
  border-radius: 1rem;
  box-shadow: var(--cm-shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.cm-cart-header {
  display: grid;
  grid-template-columns: 100px 1fr 100px 140px 100px 50px;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--cm-bg-light);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--cm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
@media (max-width: 768px) {
  .cm-cart-header {
    display: none;
  }
}

/* Single cart item */
.cm-cart-item {
  display: grid;
  grid-template-columns: 100px 1fr 100px 140px 100px 50px;
  gap: 1rem;
  padding: 1.25rem;
  align-items: center;
  border-bottom: 1px solid var(--cm-border);
  transition: background-color 0.2s ease;
}
.cm-cart-item:last-child {
  border-bottom: none;
}
.cm-cart-item:hover {
  background: var(--cm-bg-warm);
}
.cm-cart-item.updating {
  opacity: 0.5;
  pointer-events: none;
}
.cm-cart-item.removing {
  animation: slideOutLeft 0.3s ease forwards;
}
@keyframes slideOutLeft {
  to {
    opacity: 0;
    transform: translateX(-30px);
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }
}
@media (max-width: 768px) {
  .cm-cart-item {
    grid-template-columns: 90px 1fr;
    gap: 0.75rem;
    position: relative;
  }
}

/* Cart item image */
.cm-cart-item-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: var(--cm-radius-md);
  background: #f9f9f9;
}

/* Hide number input spinners */
.cm-cart-qty input::-webkit-outer-spin-button,
.cm-cart-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cm-cart-qty input[type=number] {
  -moz-appearance: textfield;
}

/* Cart item info */
.cm-cart-item-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  line-height: 1.4;
}
.cm-cart-item-info h4 a {
  color: var(--cm-text);
  text-decoration: none;
}
.cm-cart-item-info h4 a:hover {
  color: var(--cm-orange);
}
.cm-cart-item-info .dimension-cart {
  font-size: 0.95rem;
  color: var(--cm-text-muted);
  margin: 0;
}
@media (max-width: 768px) {
  .cm-cart-item-info {
    grid-column: 2;
  }
}

/* Cart item price */
.cm-cart-item-price {
  font-weight: 600;
  color: var(--cm-text);
  font-size: 0.95rem;
}
@media (max-width: 768px) {
  .cm-cart-item-price {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--cm-border);
    margin-top: 0.5rem;
  }
  .cm-cart-item-price::before {
    content: "Prix unit. :";
    color: var(--cm-text-muted);
    font-weight: 400;
  }
}

/* Cart item quantity controls - AJAX */
.cm-cart-qty {
  display: flex;
  align-items: center;
  gap: 0;
}
.cm-cart-qty button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cm-border);
  background: var(--cm-bg-light);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cm-text);
  transition: all 0.15s ease;
}
.cm-cart-qty button:hover {
  background: var(--cm-orange);
  border-color: var(--cm-orange);
  color: #fff;
}
.cm-cart-qty button:first-child {
  border-radius: 0.375rem 0 0 0.375rem;
}
.cm-cart-qty button:last-child {
  border-radius: 0 0.375rem 0.375rem 0;
}
.cm-cart-qty input {
  width: 50px;
  height: 36px;
  text-align: center;
  border: 1px solid var(--cm-border);
  border-left: none;
  border-right: none;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  background: #fff;
}
.cm-cart-qty input:focus {
  outline: none;
  background: var(--cm-bg-warm);
}
@media (max-width: 768px) {
  .cm-cart-qty {
    justify-content: center;
  }
  .cm-cart-qty button {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  .cm-cart-qty input {
    width: 54px;
    height: 44px;
    font-size: 1rem;
  }
  .cm-cart-item-image {
    width: 90px;
    height: 90px;
  }
}

/* Cart item total */
.cm-cart-item-total {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--cm-orange);
}
@media (max-width: 768px) {
  .cm-cart-item-total {
    grid-column: 1 / -1;
    text-align: center;
    padding: 0.5rem;
    background: var(--cm-bg-warm);
    border-radius: var(--cm-radius-md);
    margin-top: 0.5rem;
  }
  .cm-cart-item-total::before {
    content: "Total : ";
    font-weight: 400;
    color: var(--cm-text);
  }
}

/* Cart delete button */
.cm-cart-delete {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-cart-delete button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--cm-text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}
.cm-cart-delete button:hover {
  background: var(--cm-danger);
  color: #fff;
}
@media (max-width: 768px) {
  .cm-cart-delete {
    position: absolute;
    top: 0.5rem;
    right: 0;
  }
}

/* Cart summary */
.cm-cart-summary {
  background: #fff;
  border-radius: 1rem;
  box-shadow: var(--cm-shadow-sm);
  padding: 1.5rem;
}
.cm-cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cm-border);
  font-size: 0.95rem;
}
.cm-cart-summary-row:last-of-type {
  border-bottom: none;
}
.cm-cart-summary-row.total {
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--cm-border);
  border-bottom: none;
  font-size: 1.25rem;
  font-weight: 700;
}
.cm-cart-summary-row.total span:last-child {
  color: var(--cm-orange);
  font-size: 1.5rem;
}
.cm-cart-summary-row.discount span:last-child {
  color: var(--cm-success);
}

/* Cart promo code */
.cm-cart-promo {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cm-border);
}
.cm-cart-promo-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--cm-text);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font-weight: 500;
}
.cm-cart-promo-toggle:hover {
  color: var(--cm-orange);
}
.cm-cart-promo-form {
  display: none;
  margin-top: 1rem;
}
.cm-cart-promo-form.show {
  display: flex;
  gap: 0.5rem;
}
.cm-cart-promo-form input {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-md);
  font-size: 0.95rem;
}
.cm-cart-promo-form button {
  padding: 0.5rem 1rem;
  background: var(--cm-orange);
  color: #fff;
  border: none;
  border-radius: var(--cm-radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.cm-cart-promo-form button:hover {
  background: var(--cm-orange-hover);
}

/* Cart actions */
.cm-cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
/* Empty cart button - subtle but readable */
.btn-empty,
.cm-cart-actions .btn-empty {
  background: transparent;
  border: none;
  color: #666;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: color 0.2s;
  text-decoration: none;
}
.btn-empty:hover,
.cm-cart-actions .btn-empty:hover {
  color: var(--cm-danger);
  text-decoration: underline;
}
.cm-cart-actions .btn-checkout {
  background: var(--cm-orange);
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.cm-cart-actions .btn-checkout:hover {
  background: var(--cm-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 120, 0, 0.3);
}
.cm-cart-actions .btn-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
@media (max-width: 576px) {
  .cm-cart-actions {
    flex-direction: column;
  }
  .cm-cart-actions .btn-checkout {
    width: 100%;
    justify-content: center;
    order: -1;
  }
}

/* Empty cart state */
.cm-cart-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: var(--cm-shadow-sm);
}
.cm-cart-empty > i {
  font-size: 4rem;
  color: var(--cm-text-muted);
  opacity: 0.3;
  margin-bottom: 1rem;
}
.cm-cart-empty h2 {
  font-size: 1.5rem;
  color: var(--cm-text);
  margin-bottom: 0.5rem;
}
.cm-cart-empty p {
  color: var(--cm-text-muted);
  margin-bottom: 1.5rem;
}
.cm-cart-empty a {
  font-weight: 600;
}

/* Minimum order progress bar */
.cm-cart-minimum {
  background: var(--cm-bg-warm);
  border: 1px solid var(--cm-orange);
  border-radius: var(--cm-radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.cm-cart-minimum.reached {
  background: #e8f5e9;
  border-color: #4caf50;
}
.cm-cart-minimum-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.cm-cart-minimum-text i {
  color: var(--cm-orange);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cm-cart-minimum.reached .cm-cart-minimum-text i {
  color: #4caf50;
}
.cm-cart-minimum-bar {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}
.cm-cart-minimum-fill {
  height: 100%;
  background: var(--cm-orange);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.cm-cart-minimum.reached .cm-cart-minimum-fill {
  background: #4caf50;
}

/* Legacy warning (keep for JS fallback) */
.cm-cart-warning {
  background: var(--cm-bg-warm);
  border: 1px solid var(--cm-orange);
  border-radius: var(--cm-radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}
.cm-cart-warning i {
  color: var(--cm-orange);
  font-size: 1.25rem;
}

/* Reassurance section in cart */
.cm-cart-reassurance {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.cm-cart-reassurance-item {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--cm-bg-light);
  border-radius: var(--cm-radius-lg);
  font-size: 0.95rem;
}
.cm-cart-reassurance-item i {
  font-size: 1.5rem;
  color: var(--cm-orange);
}

/* Quantity feedback animation */
.cm-cart-item.qty-updated {
  animation: qtyFlash 0.6s ease;
}
@keyframes qtyFlash {
  0% { background-color: transparent; }
  30% { background-color: rgba(76, 175, 80, 0.15); }
  100% { background-color: transparent; }
}
.cm-cart-item.qty-updated .cm-cart-qty input {
  animation: inputPulse 0.4s ease;
}
@keyframes inputPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); background-color: #d4edda; }
  100% { transform: scale(1); background-color: #fff; }
}

/* Qty wrapper (qty buttons + stock warning stacked) */
.cm-cart-qty-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Stock max warning */
.cm-cart-stock-warning {
  font-size: 0.8rem;
  color: #856404;
  background: #fff3cd;
  padding: 0.25rem 0.5rem;
  border-radius: var(--cm-radius-sm);
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.cm-cart-stock-warning i {
  font-size: 0.85rem;
}
@media (max-width: 768px) {
  .cm-cart-qty-wrap {
    grid-column: 1 / -1;
    align-items: center;
  }
}

/* Disabled qty button */
.cm-cart-qty button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--cm-bg-light);
  color: var(--cm-text-muted);
}
.cm-cart-qty button:disabled:hover {
  background: var(--cm-bg-light);
  border-color: var(--cm-border);
  color: var(--cm-text-muted);
}

/* =========================================
   25. Checkout Steps V2 (etape2.php structure)
   ========================================= */

/* Step item */
.cm-checkout-steps .cm-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--cm-text-muted);
  text-decoration: none;
}
.cm-checkout-steps .cm-step a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}
.cm-checkout-steps .cm-step a:hover {
  color: var(--cm-orange);
}

/* Step number circle */
.cm-checkout-steps .cm-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cm-border);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* Step label */
.cm-checkout-steps .cm-step-label {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Divider between steps */
.cm-checkout-steps .cm-step-divider {
  width: 40px;
  height: 2px;
  background: var(--cm-border);
  margin: 0 0.5rem;
}

/* Completed step */
.cm-checkout-steps .cm-step.completed {
  color: var(--cm-success);
}
.cm-checkout-steps .cm-step.completed .cm-step-number {
  background: var(--cm-success);
}
.cm-checkout-steps .cm-step.completed + .cm-step-divider {
  background: var(--cm-success);
}

/* Active step */
.cm-checkout-steps .cm-step.active {
  color: var(--cm-orange);
}
.cm-checkout-steps .cm-step.active .cm-step-number {
  background: var(--cm-orange);
  box-shadow: 0 4px 12px rgba(255, 120, 0, 0.3);
}

/* Mobile responsive */
@media (max-width: 576px) {
  .cm-checkout-steps .cm-step-label {
    display: none;
  }
  .cm-checkout-steps .cm-step-divider {
    width: 20px;
  }
}

/* =========================================
   26. Scroll Animations
   ========================================= */

/* Base state - hidden before animation */
.cm-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Animated state - visible */
.cm-animate.cm-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay for grid items */
.cm-animate-stagger:nth-child(1) { transition-delay: 0s; }
.cm-animate-stagger:nth-child(2) { transition-delay: 0.1s; }
.cm-animate-stagger:nth-child(3) { transition-delay: 0.2s; }
.cm-animate-stagger:nth-child(4) { transition-delay: 0.3s; }
.cm-animate-stagger:nth-child(5) { transition-delay: 0.4s; }
.cm-animate-stagger:nth-child(6) { transition-delay: 0.5s; }
.cm-animate-stagger:nth-child(7) { transition-delay: 0.6s; }
.cm-animate-stagger:nth-child(8) { transition-delay: 0.7s; }
.cm-animate-stagger:nth-child(9) { transition-delay: 0.8s; }
.cm-animate-stagger:nth-child(10) { transition-delay: 0.9s; }
.cm-animate-stagger:nth-child(11) { transition-delay: 1s; }
.cm-animate-stagger:nth-child(12) { transition-delay: 1.1s; }

/* Fade in from left */
.cm-animate-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.cm-animate-left.cm-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
.cm-animate-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.cm-animate-right.cm-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up animation */
.cm-animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.cm-animate-scale.cm-visible {
  opacity: 1;
  transform: scale(1);
}

/* Homepage tiles - enhanced hover with animation ready (progressive enhancement) */
#home-items2 .an-item.cm-scroll-ready {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow 0.3s ease;
}
#home-items2 .an-item.cm-scroll-ready.cm-visible {
  opacity: 1;
  transform: translateY(0);
}
#home-items2 .an-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(232, 180, 120, 0.35);
}

/* Homepage sections */
#homeTitle {
  opacity: 0;
  transform: translateY(-20px);
  animation: cm-fadeInDown 0.8s ease-out forwards;
}
#homeTxt1, #homeTxt {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
#homeTxt1.cm-visible, #homeTxt.cm-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Engagements/Services list items */
#engageServices ul li.arg {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
#engageServices.cm-visible ul li.arg {
  opacity: 1;
  transform: translateX(0);
}
#engageServices.cm-visible ul.engage-col li.arg:nth-child(2) { transition-delay: 0.1s; }
#engageServices.cm-visible ul.engage-col li.arg:nth-child(3) { transition-delay: 0.2s; }
#engageServices.cm-visible ul.engage-col li.arg:nth-child(4) { transition-delay: 0.3s; }
#engageServices.cm-visible ul.services-col li.arg:nth-child(2) { transition-delay: 0.4s; }
#engageServices.cm-visible ul.services-col li.arg:nth-child(3) { transition-delay: 0.5s; }
#engageServices.cm-visible ul.services-col li.arg:nth-child(4) { transition-delay: 0.6s; }

/* Keyframe animations */
@keyframes cm-fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cm-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .cm-animate,
  .cm-animate-left,
  .cm-animate-right,
  .cm-animate-scale,
  #home-items2 .an-item.cm-scroll-ready,
  #homeTitle,
  #homeTxt1,
  #homeTxt,
  #engageServices ul li.arg {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}

/* =========================================
   27. Homepage Payment Tile
   ========================================= */
.cm-payment-tile {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  cursor: default !important;
}
.cm-payment-tile:hover {
  transform: none !important;
}
.cm-payment-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.5rem 1rem;
  color: #fff;
  text-align: center;
}
.cm-payment-content > .bi-shield-lock-fill {
  font-size: 2.5rem;
  color: #27ae60;
  margin-bottom: 0.5rem;
}
.cm-payment-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}
.cm-payment-icons {
  display: flex;
  gap: 1rem;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: rgba(255,255,255,0.8);
}
.cm-payment-text {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

/* =========================================
   28. Mobile & Responsive Optimizations
   ========================================= */

/* --- 4.1 Smart sticky header on mobile --- */
@media (max-width: 991.98px) {
  .cm-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .cm-header--scrolled {
    box-shadow: var(--cm-shadow-md);
  }
  .cm-header--hidden {
    transform: translateY(-100%);
  }
  /* Hide topbar when header is sticky to save space */
  .cm-topbar {
    font-size: 0.85rem;
  }
  /* iOS momentum scrolling for offcanvas menu */
  .offcanvas-body {
    -webkit-overflow-scrolling: touch;
  }
}

/* --- 4.2 Touch targets: nav icons 32px, topbar gap, minicart overflow --- */
@media (max-width: 991.98px) {
  /* Bigger nav icons for touch */
  .cm-nav-icon {
    width: 32px;
    height: 32px;
  }
  /* Bigger topbar link gap */
  .cm-topbar nav {
    gap: 1rem !important;
  }
  /* Bigger touch target for mobile menu button */
  .cm-header .btn-outline-secondary {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* Cart button touch target */
  .cm-minicart .btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Minicart dropdown: prevent overflow on small screens */
@media (max-width: 480px) {
  .cm-minicart-dropdown {
    width: 90vw !important;
    max-width: 280px;
    right: -0.5rem;
  }
}

/* --- 4.3 Breakpoints: 480px small phones + tablet 600-767px --- */

/* Extra small phones (≤480px) */
@media (max-width: 480px) {
  /* Tighter container padding */
  .container-xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  /* Reduce header padding */
  .cm-header {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  /* Smaller logo on very small screens */
  .cm-header img[alt*="Carton Market"] {
    height: 38px;
  }
  /* Tighter promo banner */
  .cm-promo-banner {
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem !important;
  }
  /* Breadcrumb smaller */
  .breadcrumb {
    font-size: 0.75rem;
  }
  /* Footer tighter */
  .cm-footer {
    padding-top: 2rem !important;
  }
  .cm-footer-block {
    padding: 0.75rem 1rem;
  }
  .cm-footer-bottom {
    font-size: 0.7rem;
  }
  /* Avantages compact */
  .cm-avantages h2 {
    font-size: 1.1rem;
  }
  /* Offcanvas accordion text */
  .accordion-button {
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
  }
  /* Engagements/Services stack */
  #engageServices {
    flex-direction: column !important;
  }
  #engageServices ul {
    min-width: auto !important;
  }
}

/* Tablet (600px - 767px) */
@media (min-width: 600px) and (max-width: 767.98px) {
  /* 3 column product grid for tablets */
  #product_list {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  /* Avantages: 2 columns */
  .cm-avantages .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* --- 4.4 Font size reductions at 576px --- */
@media (max-width: 576px) {
  h3 { font-size: 1.15rem; }
  h4 { font-size: 1rem; }
  h5 { font-size: 0.95rem; }
  h6 { font-size: 0.88rem; }
  /* Labels and small text */
  label, .form-label {
    font-size: 0.9rem;
  }
  /* Product price smaller */
  .price {
    font-size: 0.95rem;
  }
  /* Footer block titles */
  .cm-footer-block-title {
    font-size: 0.88rem;
  }
  /* Sidebar list text (when visible on mobile) */
  .cm-sidebar-list li a {
    font-size: 0.88rem;
  }
}

/* --- 4.6 Mobile forms: focus outline, autocorrect, spinners --- */

/* Visible focus outline on all form inputs (mobile-friendly) */
.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus {
  border-color: var(--cm-orange) !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 120, 0, 0.25) !important;
  outline: none;
}

/* Hide number input spinners (qty fields) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Quantity input improvements */
.qtyInput {
  -webkit-appearance: none;
  -moz-appearance: textfield;
  text-align: center;
}

/* Ensure minimum 16px font on mobile inputs to prevent iOS zoom */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  select,
  textarea,
  .form-control,
  .form-select {
    font-size: 16px !important;
    min-height: 48px;
  }
  .btn {
    min-height: 44px;
  }
}

/* =========================================
   29. Add-to-Cart Feedback
   ========================================= */

/* Button loading state */
.ajax_add_to_cart.cm-adding,
.button.cm-adding {
  opacity: 0.8;
  pointer-events: none;
}

/* Cart badge bounce animation */
.cm-badge-bounce {
  animation: cm-bounce 0.4s ease;
}
@keyframes cm-bounce {
  0%   { transform: translate(-50%, -50%) scale(1); }
  50%  { transform: translate(-50%, -50%) scale(1.4); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Toast message icon alignment */
.message p i {
  vertical-align: -0.1em;
}
/* =========================================
   30. Product Page: Delivery Estimate & Trust Badges
   ========================================= */

/* Estimated delivery date */
.cm-delivery-estimate {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--cm-brown-light);
}
.cm-delivery-estimate i {
  color: var(--cm-orange);
  margin-right: 4px;
}

/* Trust badges row */
.cm-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}
.cm-trust-badges span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--cm-brown-light);
  white-space: nowrap;
}
.cm-trust-badges i {
  font-size: 14px;
  color: var(--cm-green);
}
.cm-trust-badges .bi-shield-lock-fill {
  color: var(--cm-green);
}
.cm-trust-badges .bi-truck {
  color: var(--cm-orange);
}
.cm-trust-badges .bi-arrow-return-left {
  color: var(--cm-brown);
}

@media (max-width: 575.98px) {
  .cm-trust-badges {
    gap: 10px;
  }
  .cm-trust-badges span {
    font-size: 11px;
  }
}

/* Section 31 removed: Product List Scroll-Reveal caused visibility issues on some categories */

/* =========================================
   32. Button Ripple Effect
   ========================================= */

.button.ajax_add_to_cart,
.btn-cm,
.btn-cm-primary {
  position: relative;
  overflow: hidden;
}
.button.ajax_add_to_cart::after,
.btn-cm::after,
.btn-cm-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: translate(-50%, -50%);
  opacity: 0;
}
.button.ajax_add_to_cart.cm-ripple::after,
.btn-cm.cm-ripple::after,
.btn-cm-primary.cm-ripple::after {
  animation: cm-ripple 0.5s ease-out forwards;
}
@keyframes cm-ripple {
  0% { width: 0; height: 0; opacity: 0.5; }
  100% { width: 300px; height: 300px; opacity: 0; }
}

/* =========================================
   33. Qty Button Feedback
   ========================================= */

.lessButton,
.plusButton,
.qty-btn-listing {
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.lessButton:active,
.plusButton:active,
.qty-btn-listing:active {
  transform: scale(0.9);
  background-color: var(--cm-orange) !important;
  color: #fff !important;
}
/* Value flash when qty changes */
.qtyInput.cm-qty-flash,
.qtty.cm-qty-flash,
input[name^="qty"].cm-qty-flash {
  animation: cm-qtyBump 0.25s ease;
}
@keyframes cm-qtyBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); color: var(--cm-orange); }
  100% { transform: scale(1); }
}

/* =========================================
   34. Listing Toolbar (sort + count)
   ========================================= */

.cm-listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--cm-border);
}
.cm-listing-count {
  font-size: 0.85rem;
  color: var(--cm-brown-light);
  font-weight: 500;
}
.cm-listing-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cm-listing-sort label {
  font-size: 0.8rem;
  color: var(--cm-text-muted);
  white-space: nowrap;
  margin: 0;
}
.cm-listing-sort .form-select {
  width: auto;
  min-width: 160px;
  font-size: 0.8rem;
  padding: 0.3rem 2rem 0.3rem 0.6rem;
  border-color: var(--cm-border);
  border-radius: var(--cm-radius-sm);
}
.cm-listing-sort .form-select:focus {
  border-color: var(--cm-orange);
  box-shadow: 0 0 0 0.15rem rgba(255, 120, 0, 0.15);
}

@media (max-width: 575.98px) {
  .cm-listing-toolbar {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .cm-listing-sort .form-select {
    min-width: 140px;
  }
}
