@import "global.css";
/* --- Vyra Global Text Selection (#ffbe8e) --- */
::selection {
  background-color: #ffbe8e !important;
  color: #0d0d14 !important;
}
::-moz-selection {
  background-color: #ffbe8e !important;
  color: #0d0d14 !important;
}

/* =========================================================================
   VYRA — GESTIONNAIRE DE PRODUITS & COMMANDES MARCHAND (CSS)
   Design System parfaitement harmonisé avec la DA du Dashboard Vyra
   (Fonds clairs, cartes blanches douces, bordures subtiles, typographie Sora/Inter)
   ========================================================================= */

.prod-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}

.prod-page-head h1 {
  font-family: var(--font-heading, 'Sora', sans-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.prod-page-head p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.prod-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Selector de Boutique */
.prod-store-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 3px rgba(20, 20, 26, 0.04);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.prod-store-select-wrap:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px var(--accent-tint);
}

.prod-store-select-wrap label {
  font-weight: 600;
  color: var(--text-muted);
}

.prod-store-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  outline: none;
}

.prod-store-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Boutons d'action */
.prod-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(20, 20, 26, 0.04);
  text-decoration: none;
}

.prod-btn:hover {
  background: var(--bg-glass-1);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.prod-btn-primary {
  background: var(--ink);
  color: #FFFFFF;
  border: 1px solid var(--ink);
  box-shadow: 0 2px 8px rgba(20, 20, 26, 0.12);
}

.prod-btn-primary:hover {
  background: #000000;
  border-color: #000000;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(20, 20, 26, 0.2);
}

.prod-btn-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.prod-btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.prod-btn-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* Statistiques rapides (façon Stat Cards du Dashboard) */
.prod-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.prod-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 1.2rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.prod-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.prod-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prod-stat-icon svg {
  width: 20px;
  height: 20px;
}

.prod-stat-val {
  font-family: var(--font-heading, 'Sora', sans-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.prod-stat-label {
  font-size: 0.79rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Barre de filtres et recherche */
.prod-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
}

.prod-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass-1);
  border: 1px solid var(--border-soft);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  min-width: 260px;
  flex: 1;
  max-width: 400px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.prod-search-box:focus-within {
  border-color: var(--border-strong);
  background: var(--bg-surface);
  box-shadow: 0 0 0 2px var(--accent-tint);
}

.prod-search-box svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.prod-search-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 100%;
  outline: none;
  font-family: var(--font-body);
}

.prod-filters-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prod-filter-select {
  background: var(--bg-glass-1);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: border-color 0.2s;
}

.prod-filter-select:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px var(--accent-tint);
}

.prod-filter-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Tableau / Liste des Produits */
.prod-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.prod-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.prod-table th {
  padding: 0.9rem 1.2rem;
  background: var(--bg-glass-1);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-soft);
}

.prod-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  color: var(--text-primary);
}

.prod-table tr:last-child td {
  border-bottom: none;
}

.prod-table tr:hover td {
  background: var(--bg-glass-1);
}

/* Cellule Produit */
.prod-item-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prod-thumb {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass-1);
  border: 1px solid var(--border-soft);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  overflow: hidden;
  flex-shrink: 0;
}

.prod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prod-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prod-item-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.prod-item-sku {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* Badges de Statut & Stock */
.prod-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 600;
}

.prod-badge-active {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.prod-badge-draft {
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.prod-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}

.prod-stock-in { color: #10B981; }
.prod-stock-low { color: #F59E0B; }
.prod-stock-out { color: #EF4444; }

.prod-stock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.prod-price-box {
  display: flex;
  flex-direction: column;
}

.prod-price-main {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.prod-price-strike {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.prod-variants-tag {
  display: inline-block;
  font-size: 0.74rem;
  background: var(--accent-tint);
  color: var(--accent-strong);
  padding: 2px 7px;
  border-radius: 100px;
  font-weight: 600;
  border: 1px solid rgba(255, 190, 142, 0.3);
}

/* Actions */
.prod-actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.prod-action-btn {
  background: var(--bg-glass-1);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prod-action-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
  box-shadow: 0 2px 6px rgba(20, 20, 26, 0.08);
}

.prod-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}

.prod-action-btn svg {
  width: 15px;
  height: 15px;
}

/* Empty state */
.prod-empty-state {
  padding: 4rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
}

.prod-empty-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prod-empty-icon svg {
  width: 30px;
  height: 30px;
}

.prod-empty-state h3 {
  font-family: var(--font-heading, 'Sora', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.prod-empty-state p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  max-width: 400px;
  line-height: 1.5;
}

/* ============================= MODAL PRODUIT ============================= */
.prod-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 26, 0.45);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.prod-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.prod-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-ambient);
  display: flex;
  flex-direction: column;
}

.prod-modal-head {
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prod-modal-head h2 {
  font-family: var(--font-heading, 'Sora', sans-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.prod-modal-close {
  background: var(--bg-glass-1);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.prod-modal-close:hover {
  background: var(--ink);
  color: #fff;
}

.prod-modal-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.prod-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.prod-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prod-form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.prod-form-group label span.req {
  color: #FF6B4A;
}

.prod-input, .prod-textarea, .prod-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.prod-input:focus, .prod-textarea:focus, .prod-select:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.prod-textarea {
  min-height: 80px;
  resize: vertical;
}

/* Image preview box */
.prod-img-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.prod-preview-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass-1);
  border: 1px dashed var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
  flex-shrink: 0;
}

.prod-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Variantes UI */
.prod-variants-box {
  background: var(--bg-glass-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.prod-variant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.prod-modal-footer {
  padding: 1.1rem 1.6rem;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-glass-1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
