/* =============================================
   PRODUCTS
============================================= */

.products {
  padding: 72px 0;
}

.products--alt {
  background: var(--white);
}

.product-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-grid--centered {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.product-grid--centered>* {
  width: calc(25% - (22px * 3 / 4));
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(59, 7, 100, 0.14);
}

.product-media {
  position: relative;
  height: 165px;
  background-size: cover;
  background-position: center;
  background-color: var(--gray-200);
}

.product-media--dark {
  position: relative;
  background-color: rgba(220, 225, 230, 0.45);
  background-blend-mode: color;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-media--dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(215, 222, 230, 0.45);
  backdrop-filter: blur(1.5px);
  z-index: 1;
}

.out-of-stock-pill-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1e293b;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  z-index: 2;
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.01em;
}

.out-of-stock-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-eye-quickview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-eye-quickview:hover {
  color: #7c3aed;
  background: #f3e8ff;
}

.btn-demander {
  background-color: #64748b !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.2) !important;
  text-decoration: none !important;
}

.btn-demander:hover {
  background-color: #475569 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(71, 85, 105, 0.3) !important;
}

.ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: clamp(0.62rem, 0.8vw + 0.4rem, 0.7rem);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--white);
  z-index: 2;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ribbon--sale {
  background: var(--red-500);
}

.ribbon--new {
  background: var(--green-500);
}

.ribbon--outofstock {
  position: relative;
  background: rgba(26, 20, 37, 0.85);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 1;
}

.ribbon--limited {
  top: 40px;
  background: var(--amber-400);
  color: var(--ink);
}

.media-card .fav-btn,
.product-card .fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease;
  z-index: 3;
}

.media-card .fav-btn:not(.active-fav),
.product-card .fav-btn:not(.active-fav) {
  background: var(--white);
  color: var(--gray-500);
}

@media (hover: hover) {

  .media-card .fav-btn:not(.active-fav):hover,
  .product-card .fav-btn:not(.active-fav):hover {
    transform: scale(1.05);
    color: var(--red-500);
  }
}

.product-media-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.product-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  word-break: break-word;
  overflow-wrap: break-word;
}

.product-card h3 a:hover {
  color: var(--violet-700);
}

.fav-btn svg {
  fill: none;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.fav-btn:not(.active-fav) svg {
  fill: none !important;
}

@media (hover: hover) {
  .fav-btn:not(.active-fav):hover svg {
    stroke: var(--red-500);
    fill: none !important;
  }
}

.product-card .stars,
.stars,
.rating-row,
#reviews,
#tab-reviews,
.reviews_tab {
  display: none !important;
}

.product-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  width: 100%;
}

.product-meta span:first-child {
  color: var(--gray-500);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 45%;
}

.product-meta span:last-child {
  background: #f1ecf7;
  color: var(--violet-700);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 52%;
}

.product-body h3 {
  font-size: clamp(0.85rem, 1vw + 0.5rem, 0.95rem);
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: break-word;
  min-height: 2.55em;
}

.stars {
  color: var(--amber-400);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.stars span {
  color: var(--gray-500);
  margin-left: 4px;
  font-size: 0.8rem;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  width: 100%;
  min-width: 0;
}

.price-block {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
}

.price-block strong {
  font-size: clamp(0.9rem, 1.2vw + 0.45rem, 1.15rem);
  color: var(--violet-700);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-block.is-variable-range {
  min-width: 0;
  max-width: calc(100% - 90px);
  overflow: hidden;
}

.price-block.is-variable-range strong,
.price-block .price-range {
  font-size: clamp(0.78rem, 1.1vw + 0.35rem, 0.95rem) !important;
  color: #7c3aed !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  letter-spacing: -0.01em !important;
}

.product-grid.list-view .price-block.is-variable-range {
  max-width: 100%;
}

.product-grid.list-view .price-block.is-variable-range strong,
.product-grid.list-view .price-block .price-range {
  font-size: 1.05rem !important;
}

.price-block del {
  font-size: clamp(0.7rem, 0.8vw + 0.4rem, 0.8rem);
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: line-through;
}

.stock-warning {
  font-size: 0.76rem;
  color: var(--red-500);
  font-weight: 600;
  margin-bottom: 6px;
}

.added_to_cart,
a.added_to_cart {
  display: none !important;
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-view-btn {
  background: none;
  border: none;
  padding: 6px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease;
}

.quick-view-btn:hover {
  color: var(--violet-700);
}

.product-actions .btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.product-actions .btn:hover {
  transform: translateY(-2px);
}

.product-actions .btn:active {
  transform: translateY(0) scale(0.96);
}

.product-actions .btn-primary {
  background: var(--violet-600);
  color: var(--white);
}

.product-actions .btn-primary:hover {
  background: var(--violet-700);
}

.product-actions .btn-secondary {
  background: #6b7280;
  color: var(--white);
}

.product-actions .btn-secondary:hover {
  background: #4b5563;
}

.points {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #f7f5fc;
  color: var(--violet-700);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: clamp(0.68rem, 0.9vw + 0.4rem, 0.75rem);
  font-weight: 500;
  margin-top: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points svg {
  color: var(--violet-500);
  flex-shrink: 0;
}

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

  .product-grid--centered>* {
    width: calc(50% - 22px / 2);
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-grid--centered>* {
    width: calc(50% - 12px / 2);
  }

  .product-body {
    padding: 12px;
  }

  .product-body h3 {
    font-size: 0.9rem;
    margin: 4px 0 6px;
  }

  .price-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 8px;
  }

  .price-block strong {
    font-size: 1.05rem;
  }

  .price-block del {
    font-size: 0.75rem;
  }

  .product-actions {
    width: 100%;
  }

  .product-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .points {
    font-size: 0.7rem;
    padding: 4px 8px;
    margin-top: 8px;
  }

  .ribbon {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .fav-btn {
    width: 32px;
    height: 32px;
    top: 8px;
    right: 8px;
  }
}

/* =============================================
   CATALOG PAGE STRUCTURE & BANNER
============================================= */

.page-banner {
  background: var(--violet-700);
  padding: 50px 0;
  color: var(--white);
  text-align: left;
  position: relative;
}

.page-banner h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  margin-top: 4px;
  margin-bottom: 12px;
  line-height: 1.1;
}

.page-banner p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 0;
}

.banner-tag {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--white);
  opacity: 0.9;
  margin-top: 8px;
}

.breadcrumbs {
  font-size: 0.88rem;
  opacity: 0.75;
  margin-bottom: 12px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.breadcrumbs a {
  color: var(--white);
  transition: opacity 0.2s;
}

.breadcrumbs a:hover {
  opacity: 1;
  text-decoration: underline;
}

.breadcrumbs span {
  opacity: 0.7;
}

.catalog-section {
  padding: 56px 0;
  background: var(--white);
}

.catalog-layout {
  display: flex;
  gap: 32px;
}

/* =============================================
   SIDEBAR FILTERS
============================================= */

.catalog-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: none;
  box-shadow: 0 4px 20px rgba(59, 7, 100, 0.03);
  height: fit-content;
  position: sticky;
  top: 100px;
  z-index: 10;
}

.sidebar-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-header h3 svg {
  color: var(--violet-600);
}

.filter-group {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.filter-chevron {
  color: var(--violet-600);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.filter-group.collapsed .filter-chevron {
  transform: rotate(180deg);
}

.filter-content {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
  opacity: 1;
}

.filter-group.collapsed .filter-content {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-item:hover {
  color: var(--violet-700);
}

.filter-item input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid #E9D5FF;
  /* Purple claire border */
  background: var(--white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.filter-item input[type="checkbox"]:checked {
  background: var(--violet-700);
  border-color: var(--violet-700);
}

.filter-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-item span {
  /* Let text take content width */
}

.filter-item .count {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 500;
  color: #7E6E9A;
  background: rgba(147, 51, 234, 0.05);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: none;
  letter-spacing: normal;
}

/* Scrollable Marques List */
.filter-list--scrollable {
  max-height: 180px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Custom Scrollbar for brands list */
.filter-list--scrollable::-webkit-scrollbar {
  width: 5px;
}

.filter-list--scrollable::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 10px;
}

.filter-list--scrollable::-webkit-scrollbar-thumb {
  background: var(--gray-200);
  border-radius: 10px;
  transition: background 0.2s;
}

.filter-list--scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--violet-400);
}

/* Price Range Slider */
.price-slider-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.price-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 24px;
  background: transparent;
  outline: none;
  cursor: pointer;
}

.price-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 999px;
  border: none;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--violet-600);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  margin-top: -5px;
  /* Center thumb: (6px / 2) - (16px / 2) = -5px */
  transition: transform 0.1s;
}

.price-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.price-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 999px;
  border: none;
}

.price-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--violet-600);
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}

.price-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.price-range-inputs {
  display: flex;
  gap: 12px;
}

.price-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-input-wrapper span {
  font-size: 0.72rem;
  color: var(--gray-500);
  text-transform: uppercase;
}

.price-input-wrapper input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.price-input-wrapper input:focus {
  border-color: var(--violet-600);
}

/* =============================================
   CATALOG MAIN CONTENT & TOOLBAR
============================================= */

.catalog-main {
  flex-grow: 1;
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: transparent;
  padding: 12px 0;
  border: none;
  margin-bottom: 24px;
}

.results-count {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.view-toggle {
  display: flex;
  background: var(--gray-100);
  padding: 4px;
  border-radius: 8px;
  gap: 2px;
}

.view-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--gray-500);
  transition: all 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
}

.view-btn:hover {
  color: var(--violet-700);
  background: rgba(255, 255, 255, 0.4);
}

.view-btn.active {
  background: var(--white);
  color: var(--violet-700);
  box-shadow: 0 2px 6px rgba(59, 7, 100, 0.08);
}

.custom-sort-dropdown {
  position: relative;
  width: 250px;
  z-index: 20;
}

.sort-dropdown-trigger {
  width: 100%;
  background: var(--white);
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  text-align: left;
}

.current-sort-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 8px;
}

.sort-dropdown-trigger:hover {
  border-color: var(--violet-600);
}

.sort-dropdown-trigger svg {
  color: var(--gray-500);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.custom-sort-dropdown.open .sort-dropdown-trigger {
  border-color: rgba(124, 58, 237, 0.9);
  box-shadow: none;
  background: #fff;
}

.custom-sort-dropdown.open .sort-dropdown-trigger svg {
  transform: rotate(180deg);
  color: var(--violet-600);
}

.sort-dropdown-options {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 100%;
  min-width: 250px;
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  padding-top: 8px;
  padding-bottom: 8px;
  z-index: 30;
}

.custom-sort-dropdown.open .sort-dropdown-options {
  display: block;
  animation: sortDropdownFade 0.2s ease;
}

@keyframes sortDropdownFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sort-dropdown-header {
  display: none;
}

.sort-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-option:hover {
  background: var(--gray-100);
  color: var(--ink);
}

.sort-option.active {
  color: var(--violet-700);
  font-weight: 600;
}

/* =============================================
   WOOCOMMERCE STANDARD ORDERING FALLBACK
============================================= */
.woocommerce-ordering {
  margin-bottom: 24px;
}

.woocommerce-ordering select.orderby {
  background: var(--white);
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.woocommerce-ordering select.orderby:focus,
.woocommerce-ordering select.orderby:hover,
.woocommerce-ordering select.orderby:active {
  border-color: rgba(124, 58, 237, 0.9);
  box-shadow: none;
}

/* Radio dot style matching design */
.radio-dot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sort-option:hover .radio-dot {
  border-color: var(--violet-600);
}

.sort-option.active .radio-dot {
  border-color: var(--violet-700);
}

.sort-option.active .radio-dot::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: var(--violet-700);
  border-radius: 50%;
}


.catalog-main .product-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 0;
}

/* Product detail badges: make weight badge responsive and consistent */
.product-weight-badge {
  display: flex !important;
  width: 100% !important;
  box-sizing: border-box !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  margin: 0 0 8px 0 !important;
}

@media (min-width: 960px) {
  .product-weight-badge {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
  }
}

/* Expiration date badge: consistent look and responsive behavior */
.expiration-date-badge {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.expiration-date-badge strong {
  color: #6b0fbf;
  font-weight: 700;
}

@media (min-width: 960px) {
  .expiration-date-badge {
    display: inline-flex;
    width: auto;
    margin: 0;
  }
}

/* Unify font-size across product detail badges */
.product-weight-badge,
.expiration-date-badge,
.product-points-badge {
  font-size: 0.95rem !important;
}

/* =============================================
   LIST VIEW LAYOUT (HORIZONTAL)
============================================= */

.product-grid.list-view .product-meta {
  justify-content: flex-start;
  gap: 8px;
}

/* Fallback spacing for list view inner columns on mobile */
.product-grid.list-view .product-info-col,
.product-grid.list-view .product-actions-col {
  display: flex;
  flex-direction: column;
}

.product-grid.list-view .product-info-col {
  gap: 6px;
}

.product-grid.list-view .product-actions-col {
  gap: 8px;
}

@media (min-width: 769px) {
  .product-grid.list-view {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-grid.list-view .product-card {
    flex-direction: row;
    align-items: stretch;
    height: auto;
    box-shadow: 0 4px 16px rgba(59, 7, 100, 0.04);
    border: 1px solid var(--gray-100);
  }

  .product-grid.list-view .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 7, 100, 0.08);
  }

  .product-grid.list-view .product-media {
    width: 220px;
    height: auto;
    flex-shrink: 0;
  }

  .product-grid.list-view .product-body {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr minmax(210px, auto);
    padding: 24px;
    align-items: center;
    gap: 24px;
  }

  .product-grid.list-view .product-info-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }

  .product-grid.list-view .product-info-col h3 {
    font-size: 1.15rem;
    margin: 2px 0 6px 0;
  }

  .product-grid.list-view .product-actions-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    border-left: 1px solid var(--gray-100);
    padding-left: 24px;
    min-width: 200px;
  }

  .product-grid.list-view .price-block {
    align-items: flex-start;
    max-width: 100%;
    width: 100%;
    overflow: visible;
  }

  .product-grid.list-view .price-block strong {
    font-size: 1.35rem;
    color: #7c3aed;
    font-weight: 800;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    display: block;
    text-align: left;
  }

  .product-grid.list-view .price-block del {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: visible;
  }

  .product-grid.list-view .product-actions {
    width: 100%;
  }

  .product-grid.list-view .product-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .product-grid.list-view .points {
    display: none;
  }
}

/* Stock Progress Bar (Image 2 style) */
.stock-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.stock-bar-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--amber-400);
  white-space: nowrap;
}

.stock-bar-text--out {
  color: var(--red-500);
}

.stock-bar-track {
  width: 120px;
  height: 6px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}

.stock-bar-fill {
  height: 100%;
  background: var(--amber-400);
  border-radius: 999px;
}

/* =============================================
   PAGINATION CONTROL
============================================= */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--violet-600);
  color: var(--violet-600);
  background: var(--violet-100);
}

.pagination button.active {
  background: var(--violet-600);
  border-color: var(--violet-600);
  color: var(--white);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =============================================
   RESPONSIVENESS
============================================= */

@media (max-width: 1024px) {
  .catalog-layout {
    flex-direction: column;
    gap: 24px;
  }

  .catalog-sidebar {
    width: 100%;
    position: static;
  }

  .catalog-main .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .catalog-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .custom-sort-dropdown {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .view-toggle {
    flex-shrink: 0;
  }
}



@media (max-width: 480px) {

  .product-grid,
  .catalog-main .product-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .product-grid--centered>* {
    width: 100%;
  }
}

/* =============================================
   OFFER CARD REFINEMENTS — "Offres & Promotions" page
   Card structure stays identical to the produits.html
   cards (meta pill, stars, stock bar, points). Only the
   ribbon shape, discount display, and Ajouter button are
   restyled. Everything below is additive — nothing here
   overrides the base .ribbon / .btn-primary rules used by
   produits.js, so the produits page cards are untouched.
============================================= */

/* Badge row wrapper: lets the flag ribbon and the
   limited-stock pill sit side by side at the top of the photo */
.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 54px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}

.card-badges .ribbon {
  position: static;
  pointer-events: auto;
}

/* Diagonal-cut discount flag (two-line: % + "Réduction") */
.ribbon--flag {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.05;
  background: linear-gradient(135deg, #f43f5e, #dc2626);
  padding: 6px 16px 8px 10px;
  border-radius: 6px 2px 2px 6px;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 84% 100%, 0 100%);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25);
}

.ribbon--flag strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.ribbon--flag small {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.95;
}

/* Refined limited-stock pill with warning icon */
.card-badges .ribbon--limited {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--amber-400);
  color: #7c2d12;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(251, 191, 36, 0.35);
}

.card-badges .ribbon--limited svg {
  flex-shrink: 0;
}

/* Purple bundle promo banner between the photo and the card body */
.bundle-banner {
  display: none !important;
}

.bundle-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bundle-item svg {
  flex-shrink: 0;
  opacity: 0.95;
}

.bundle-text {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.bundle-qty {
  font-size: 2.2rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.bundle-label {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  opacity: 0.95;
  white-space: normal;
  max-width: 110px;
  text-align: left;
}

.bundle-plus {
  font-size: 2rem !important;
  font-weight: 900 !important;
  opacity: 0.95;
  flex-shrink: 0;
  line-height: 1;
  margin: 0 4px;
}

@media (max-width: 560px) {
  .bundle-banner {
    gap: 10px;
    padding: 10px 8px;
  }

  .bundle-qty {
    font-size: 1.7rem !important;
  }

  .bundle-label {
    font-size: 0.78rem !important;
    max-width: 90px;
  }

  .bundle-plus {
    font-size: 1.5rem !important;
    margin: 0 2px;
  }
}

/* Row that holds the struck-through old price + savings pill together */
.price-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

/* Green savings pill next to the struck-through old price */
.save-pill {
  background: #dcfce7;
  color: #16a34a;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Red "Ajouter" button used on the offers grid — additive
   modifier on top of .btn-primary, doesn't touch the
   default purple button used elsewhere */
.product-actions .btn-primary.btn-offer-red {
  background: #ef4444;
}

.product-actions .btn-primary.btn-offer-red:hover {
  background: #dc2626;
}

/* =============================================
   DEMANDE DE PRODUIT MODAL
============================================= */

.demande-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 25, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.demande-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.demande-modal {
  background: var(--white);
  border-radius: 16px;
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 520px;
  position: relative;
  box-shadow: 0 24px 60px rgba(59, 7, 100, 0.18);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.demande-overlay.open .demande-modal {
  transform: translateY(0) scale(1);
}

.demande-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--gray-400);
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 8px;
  border-radius: 6px;
}

.demande-close:hover {
  color: var(--ink);
  background: var(--gray-100);
}

.demande-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

.demande-product-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--violet-700);
  margin: 0 0 24px;
}

.demande-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.demande-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.demande-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demande-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.demande-field .required {
  color: #ef4444;
  margin-left: 2px;
}

.demande-field input,
.demande-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--ink);
  font-family: inherit;
  background: #faf9fc;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.demande-field input:focus,
.demande-field textarea:focus {
  border-color: var(--violet-500);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.demande-field textarea {
  resize: vertical;
  min-height: 90px;
}

/* Quantity stepper */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
  background: #faf9fc;
}

.qty-btn {
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--violet-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  font-weight: 700;
}

.qty-btn:hover {
  background: var(--gray-100);
}

.qty-value {
  width: 44px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  border-left: 1.5px solid var(--gray-200);
  border-right: 1.5px solid var(--gray-200);
  line-height: 38px;
  user-select: none;
}

.demande-submit {
  width: 100%;
  padding: 13px;
  background: var(--violet-700);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
  margin-top: 4px;
}

.demande-submit:hover {
  background: var(--violet-800, #5b21b6);
  transform: translateY(-1px);
}

.demande-submit:active {
  transform: translateY(0);
}

/* Success state */
.demande-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 10px 10px;
  text-align: center;
  animation: fadeInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.demande-success-icon {
  width: 72px;
  height: 72px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.1);
}

.demande-success-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.demande-success p {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--gray-500);
  line-height: 1.6;
  margin: 0 0 16px;
}

.btn-success-close {
  padding: 12px 32px;
  background: var(--gray-100);
  color: var(--ink);
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-success-close:hover {
  background: var(--gray-200);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .demande-modal {
    padding: 28px 20px 24px;
  }

  .demande-row {
    grid-template-columns: 1fr;
  }
}