/* Styles pour les tableaux et cartes de prix MAX */

/* ========================================
   TABLEAUX DE PRIX
   ======================================== */

.max-metal-prices-table,
.max-gold-carat-prices-table,
.max-products-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--max-space-5) 0;
  background: var(--max-bg-card);
  border-radius: var(--max-border-radius-md);
  overflow: hidden;
  box-shadow: var(--max-shadow-md);
  color: #ffffff;
}

.max-metal-prices-table th,
.max-gold-carat-prices-table th,
.max-products-table th {
  background: linear-gradient(135deg, var(--max-gold-medium) 0%, var(--max-gold-dark) 100%);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: var(--max-text-xs);
  letter-spacing: 1px;
}

.max-metal-prices-table td,
.max-gold-carat-prices-table td,
.max-products-table td {
  padding: var(--max-space-3) 15px;
  border-bottom: 1px solid var(--max-border-subtle);
  transition: background-color var(--max-transition-normal);
}

.max-metal-prices-table tr:hover td,
.max-gold-carat-prices-table tr:hover td,
.max-products-table tr:hover td {
  background-color: var(--max-bg-glass);
}

.max-price {
  font-weight: bold;
  color: var(--max-gold-light);
  font-size: var(--max-text-base);
}

/* ========================================
   CARTES DE PRIX — COURS DES MÉTAUX
   ======================================== */

.max-metal-prices-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.max-metal-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(191, 149, 63, 0.15);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.max-metal-card::before {
  display: none;
}

.max-metal-card:hover {
  border-color: rgba(191, 149, 63, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.max-card-symbol {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #BF953F;
  margin-bottom: 6px;
}

.max-metal-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 12px 0;
}

.max-metal-card .max-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #d4af37;
}

/* ========================================
   CARTES DE PRIX — COURS PAR CARAT
   ======================================== */

.max-gold-carat-prices-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 32px 0;
}

.max-gold-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(191, 149, 63, 0.12);
  border-radius: 10px;
  padding: 20px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.max-gold-card::before {
  display: none;
}

.max-gold-card:hover {
  border-color: rgba(191, 149, 63, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.max-gold-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 4px 0;
}

.max-purity {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 10px 0;
}

.max-gold-card .max-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #d4af37;
}

/* 18K — highlighted as the most common carat in France */
.max-gold-18k {
  border-color: rgba(191, 149, 63, 0.35);
  background: rgba(191, 149, 63, 0.06);
}

.max-gold-18k h3 {
  color: #d4af37;
}

/* ========================================
   COULEURS UNIFORMES (gold pour tout)
   ======================================== */

.max-metal-gold .max-price,
.max-metal-silver .max-price,
.max-metal-platinum .max-price,
.max-gold-24k .max-price,
.max-gold-22k .max-price,
.max-gold-18k .max-price,
.max-gold-14k .max-price,
.max-gold-9k .max-price {
  color: #d4af37;
}

/* ========================================
   CARTES PRODUITS
   ======================================== */

.max-products-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--max-space-5);
  margin: var(--max-space-5) 0;
}

.max-product-card {
  background: var(--max-bg-card);
  border-radius: var(--max-border-radius-lg);
  padding: var(--max-space-5);
  box-shadow: var(--max-shadow-lg);
  transition: transform var(--max-transition-normal), box-shadow var(--max-transition-normal);
  position: relative;
  overflow: hidden;
}

.max-product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--max-gold-gradient);
}

.max-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.max-product-card h3 {
  margin: 0 0 10px 0;
  color: #ffffff;
  font-size: var(--max-text-lg);
  font-weight: 600;
}

.max-product-card .max-price {
  font-size: var(--max-text-2xl);
  font-weight: bold;
  color: var(--max-gold-light);
}

/* ========================================
   LISTES DE PRIX
   ======================================== */

.max-metal-prices-list,
.max-gold-carat-prices-list,
.max-products-list {
  list-style: none;
  padding: 0;
  margin: var(--max-space-5) 0;
}

.max-metal-item,
.max-gold-item,
.max-product-item {
  background: var(--max-bg-card);
  border-radius: var(--max-border-radius-md);
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: var(--max-shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--max-transition-normal);
}

.max-metal-item:hover,
.max-gold-item:hover,
.max-product-item:hover {
  transform: translateX(5px);
  box-shadow: var(--max-shadow-md);
}

.max-metal-name,
.max-gold-carat,
.max-product-name {
  font-weight: 600;
  color: #ffffff;
}

.max-product-details {
  color: rgba(255,255,255,0.6);
  font-size: var(--max-text-sm);
}

/* ========================================
   INFORMATIONS PRODUIT
   ======================================== */

.max-product-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.max-category,
.max-material,
.max-weight {
  background: var(--max-bg-glass);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: var(--max-text-xs);
  color: #ffffff;
}

.max-product-prices {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.max-buy-price,
.max-sell-price {
  padding: var(--max-space-2) var(--max-space-3);
  border-radius: var(--max-border-radius-sm);
  font-size: var(--max-text-sm);
  font-weight: 600;
}

.max-buy-price {
  background: rgba(34, 197, 94, 0.1);
  color: var(--max-price-positive);
}

.max-sell-price {
  background: rgba(249, 115, 22, 0.1);
  color: var(--max-price-negative);
}

/* ========================================
   TIMESTAMP
   ======================================== */

.max-timestamp {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-style: normal;
  margin-top: 12px;
  padding: 0;
  background: none;
  border-radius: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.max-metal-prices-cards,
.max-gold-carat-prices-cards {
  animation: fadeInUp 0.5s ease-out;
}

/* Loading state */
.max-loading {
  position: relative;
  opacity: 0.6;
}

.max-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--max-primary-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 899px) {
  .max-gold-carat-prices-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 599px) {
  .max-metal-prices-cards {
    grid-template-columns: 1fr 1fr;
  }
  .max-gold-carat-prices-cards {
    grid-template-columns: 1fr 1fr;
  }
  .max-metal-card {
    padding: 20px 12px;
  }
  .max-metal-card .max-price {
    font-size: 20px;
  }
  .max-gold-card .max-price {
    font-size: 18px;
  }
}
