/* Styles pour les statuts des produits - Interface client */
.product-status {
    margin-top: 10px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.status-label {
    font-weight: bold;
    color: #495057;
    margin-right: 5px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.product-tracking {
    margin-top: 8px;
    font-size: 13px;
}

.tracking-label {
    color: #6c757d;
    font-weight: 500;
}

.tracking-number {
    font-weight: bold;
    color: #007bff;
    font-family: monospace;
}

/* Styles pour l'interface admin */
#order-product-statuses {
    margin-top: 20px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#order-product-statuses h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

#order-product-statuses .table {
    margin-bottom: 0;
}

#order-product-statuses .table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

#order-product-statuses .table td {
    vertical-align: middle;
    padding: 12px 8px;
}

.status-select {
    width: 150px;
    margin-bottom: 5px;
}

.tracking-input {
    width: 150px;
    font-size: 12px;
}

/* Couleurs spécifiques pour les statuts */
.status-pending {
    background-color: #FF8C00;
}

.status-preparing {
    background-color: #007FFF;
}

.status-ready-to-ship {
    background-color: #32CD32;
}

.status-shipped {
    background-color: #9370DB;
}

.status-delivered {
    background-color: #228B22;
}

.status-cancelled {
    background-color: #DC143C;
}

/* Animations */
.status-badge {
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    #order-product-statuses {
        padding: 10px;
    }
    
    #order-product-statuses .table {
        font-size: 12px;
    }
    
    .status-select,
    .tracking-input {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .product-status {
        margin-top: 8px;
        padding: 6px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Styles pour les messages d'alerte */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-dismissible {
    padding-right: 4rem;
}

.alert-dismissible .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.75rem 1.25rem;
    color: inherit;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

/* Styles pour le loading */
.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Amélioration des détails de commande */
.order-details-content {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.order-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.order-details-header h3 {
    margin: 0;
    color: #333;
}

.order-status {
    font-weight: bold;
    font-size: 16px;
}

.order-products-list {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.order-product {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.order-product:last-child {
    border-bottom: none;
}

.product-image {
    margin-right: 15px;
    flex-shrink: 0;
}

.product-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.product-info {
    flex: 1;
}

.product-name {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.product-reference,
.product-quantity,
.product-price {
    margin: 4px 0;
    font-size: 14px;
    color: #666;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 2px solid #007bff;
    font-size: 18px;
    font-weight: bold;
}

.total-amount {
    color: #007bff;
}

/* Corrections pour éviter le débordement dans le panier */
.order-details {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.pending-order-card .order-details {
    margin-top: 15px;
}

/* Styles pour la modale produit */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(87, 87, 86, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(87, 87, 86, 0.5);
  z-index: 10000;
}

.product-modal .modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  position: relative;
  z-index: 10001;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.product-modal .modal-header {
  background: #f8f9fa;
  color: #495057;
  padding: 15px 20px;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid #dee2e6;
}

.product-modal .modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.product-modal .modal-close {
  background: none;
  border: none;
  color: #495057;
  cursor: pointer;
  padding: 5px;
  transition: all 0.2s;
  z-index: 10002;
}

.product-modal .modal-close:hover {
  color: #007bff;
  transform: scale(1.1);
}

.product-modal .modal-body {
  display: grid;
  background-color: white;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
  overflow-y: auto;
}

.modal-product-image {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: fit-content;
}

.modal-product-image img {
  max-width: 100%;
  max-height: 300px;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
}

.modal-product-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-price {
  background: #f8f9fa;
  color: #495057;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid #dee2e6;
}

.modal-reference {
  background: white;
  padding: 10px 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #f8f9fa;
}

.modal-description {
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #f8f9fa;
}

.modal-description h3 {
  color: #495057;
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 600;
}

.modal-description p {
  color: #495057;
  line-height: 1.4;
  font-size: 0.9rem;
}

.modal-categories {
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #f8f9fa;
}

.modal-categories h3 {
  color: #495057;
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 600;
}

.modal-categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-category-tag, .category-tag {
  background: #f8f9fa;
  color: #495057;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.modal-category-tag:hover, .category-tag:hover {
  background: #007bff;
  color: white;
}

@media (max-width: 768px) {
  .product-modal .modal-body {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .product-modal .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-product-image img {
    max-height: 250px;
  }
}

/* Styles pour les boutons de détails produit */
.btn-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 2px solid #6fcff4;
    border-radius: 8px;
    color: #6fcff4;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-details:hover {
    background: #6fcff4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 207, 244, 0.3);
}

.btn-details:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(111, 207, 244, 0.2);
}

.btn-details svg {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.product-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

/* Empêcher les cartes produits normaux d'être cliquables */
.product-card.normal {
    pointer-events: none;
}

.product-card.normal .product-actions {
    pointer-events: all;
}

.product-card.normal .btn-details {
    pointer-events: all;
}

/* Empêcher les produits normaux des commandes d'être cliquables */
.order-product.normal {
    pointer-events: none;
}

.order-product.normal .product-actions-buttons {
    pointer-events: all;
}

.order-product.normal .btn-details {
    pointer-events: all;
}

/* Styles pour la modale message */
.cart-message-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-summary-modal .modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.cart-summary-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-summary-modal .modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.cart-summary-modal .close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    color: #666;
}

.cart-summary-modal .modal-body {
    padding: 20px;
}

.cart-summary-modal .alert-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.cart-summary-modal .alert-info p {
    margin: 0 0 10px;
}

.cart-summary-modal .alert-info ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.cart-summary-modal .alert-info li {
    margin: 5px 0;
    list-style-type: none;
    position: relative;
    padding-left: 5px;
}

.cart-summary-modal .cart-sections {
    margin: 20px 0;
}

.cart-summary-modal .cart-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.cart-summary-modal .cart-section h4 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.cart-summary-modal .modal-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cart-summary-modal .product-info {
    flex: 1;
}

.cart-summary-modal .product-info .quantity {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.cart-summary-modal .product-price {
    text-align: right;
}

.cart-summary-modal .product-price span {
    display: block;
    font-size: 0.9em;
}

.cart-summary-modal .cart-totals {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.cart-summary-modal .summary-line {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.cart-summary-modal .summary-line.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #eee;
    font-size: 1.2em;
}

.cart-summary-modal .modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cart-summary-modal .btn-secondary {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-summary-modal .btn-primary {
    background: var(--aromex-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-summary-modal .btn-primary:hover {
    background: var(--aromex-blue-hover);
}

/* Styles pour l'affichage des prix dans les produits du panier */
.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.product-price .currency {
    font-weight: 600;
    font-size: 1.2rem;
    color: #333;
}

.product-price .unit {
    font-size: 0.9rem;
    color: #666;
    margin-top: 2px;
} 