/* ═══════════════════════════════════════════════
   DiagnosKit — Panier & Catalogue
   ═══════════════════════════════════════════════ */

/* ── Cart Panel ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 35, 50, 0.55);
  backdrop-filter: blur(4px);
  z-index: 800;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 100vw;
  background: #fff;
  z-index: 801;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(26, 35, 50, 0.14);
}
.cart-panel.open { transform: translateX(0); }

.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cart-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
}
.cart-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.15s;
  background: none;
  border: none;
}
.cart-close:hover { background: var(--gray-100); color: var(--gray-900); }

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  gap: 16px;
  color: var(--gray-500);
  font-size: 14px;
  text-align: center;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-md);
  transition: border-color 0.15s;
}
.cart-item:hover { border-color: var(--blue-mid); }
.cart-item-icon {
  width: 44px;
  height: 44px;
  background: var(--blue-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item-icon img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.cart-item-total { font-size: 13px; font-weight: 700; color: var(--green); }
.cart-remove-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--gray-400);
  cursor: pointer;
  transition: all 0.15s;
  background: none;
  border: none;
}
.cart-remove-btn:hover { background: #fef2f2; color: #dc2626; }

.cart-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cart-total-label { font-size: 14px; color: var(--gray-500); font-weight: 500; }
.cart-total-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
}
.cart-min-note {
  font-size: 12px;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ── Catalogue ── */
.catalogue-section { padding: var(--space-16, 64px) 0; }
.catalogue-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: var(--space-6, 24px);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--blue); color: var(--blue); }
.filter-chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-full);
  background: #fff;
  flex: 1;
  max-width: 300px;
  transition: border-color 0.15s;
}
.search-box:focus-within { border-color: var(--blue); }
.search-box input {
  border: none;
  outline: none;
  font-size: 13px;
  font-family: var(--font-body);
  width: 100%;
  color: var(--gray-900);
  background: transparent;
}
.search-box input::placeholder { color: var(--gray-300); }
.search-box svg { flex-shrink: 0; color: var(--gray-400); }

.product-skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, #e8eef3 50%, var(--gray-100) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-lg);
  height: 340px;
}
.empty-state {
  text-align: center;
  padding: 64px 0;
  color: var(--gray-500);
  grid-column: 1 / -1;
}
.empty-state p { font-size: 15px; margin-top: 12px; }

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.stock-ok { background: var(--green-light, #edf7e3); color: var(--green-dark, #5a9430); }
.stock-low { background: #fef3c7; color: #92400e; }
.stock-out { background: #fef2f2; color: #dc2626; }

.footer-link-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: rgba(255, 255, 255, 0.65);
  padding: 0;
  text-align: left;
  transition: color var(--duration-fast);
}
.footer-link-btn:hover { color: #fff; }
