/* ===============================
   VARIABLES - reuse global site theme
================================ */
:root {
  /* map to primary variables defined in style.css */
  --blue-primary: var(--blue-dark);
  --blue-dark: var(--primary-blue-dark);
  --blue-light: var(--primary-blue-light);
  --blue-50: #bee3f8; /* light version of blue
         could also be var(--primary-blue-light) if you prefer */

  --bg-main: var(--bg-main);
  --bg-white: var(--bg-white);
  --bg-gray: var(--bg-gray);

  --text-dark: var(--text-dark);
  --text-gray: var(--text-gray);
  --text-light: var(--text-light);

  --accent-green: var(--accent-green);
  --accent-orange: var(--accent-orange);

  /* keep shadows & radii local for convenience */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header et Footer sont gérés par style.css et header.php
   Les styles navbar et footer sont centralisés dans style.css
   pour assurer la cohérence sur toutes les pages */

/* ===============================
   PANIER CONTAINER
================================ */
.panier-container {
  padding: 50px 60px;
  background: linear-gradient(135deg, #0f172a 0%, #111827 40%, #1f2937 100%);
  min-height: calc(100vh - 200px);
  color: #e2e8f0;
}

.panier-header {
  text-align: center;
  margin-bottom: 40px;
}

.panier-header h1 {
  font-size: 38px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.panier-header p {
  font-size: 16px;
  color: var(--text-gray);
}

/* ===============================
   PANIER WRAPPER
================================ */
.panier-wrapper {
  display: flex;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===============================
   PANIER PRODUITS
================================ */
.panier-produits {
  flex: 1;
  background: #111827;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.produit-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font-weight: 600;
  color: #cbd5e1;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.produit-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 15px;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.produit-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.produit-img {
  width: 100px;
  height: 100px;
  background: var(--bg-gray);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.produit-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.produit-details h3 {
  font-size: 16px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 4px;
}

.produit-details p {
  font-size: 13px;
  color: #94a3b8;
}

.produit-prix .prix {
  font-size: 16px;
  font-weight: 600;
  color: #93c5fd;
}

.produit-qte {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(148, 163, 184, 0.25);
  background: #1e293b;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #cbd5e1;
  transition: var(--transition);
}

.qty-btn:hover {
  border-color: #3b82f6;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.15);
}

.produit-qte input {
  width: 50px;
  height: 32px;
  text-align: center;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  background: #1e293b;
}

.produit-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.produit-total span {
  font-size: 18px;
  font-weight: 700;
  color: #93c5fd;
}

.remove-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 18px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.remove-btn:hover {
  color: #fc8181;
  background: rgba(239, 68, 68, 0.12);
}

.produit-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
}

.continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.continue-btn:hover {
  color: #93c5fd;
}

.update-btn {
  padding: 12px 24px;
  background: #1e293b;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  color: #cbd5e1;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.update-btn:hover {
  border-color: #3b82f6;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.15);
}

.update-btn.dirty {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.30), 0 4px 16px rgba(37, 99, 235, 0.45);
  animation: pulse-btn 1.6s ease-in-out infinite;
}

.update-btn.dirty:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.40), 0 6px 20px rgba(37, 99, 235, 0.55);
}

@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.30), 0 4px 16px rgba(37, 99, 235, 0.45); }
  50%       { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.15), 0 4px 20px rgba(37, 99, 235, 0.60); }
}

/* ===============================
   PANIER SUMMARY
================================ */
.panier-summary {
  width: 380px;
  background: #111827;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  height: fit-content;
}

.panier-summary h2 {
  font-size: 20px;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(37, 99, 235, 0.3);
}

.summary-details {
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  color: #94a3b8;
  font-size: 15px;
}

.summary-row .free {
  color: var(--accent-green);
  font-weight: 600;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 2px solid rgba(37, 99, 235, 0.3);
  font-weight: 600;
  font-size: 18px;
  color: #f1f5f9;
}

.summary-total .total-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--blue-primary);
}

.code-promo {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.code-promo input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius);
  font-size: 14px;
  background: #0f172a;
  color: #f1f5f9;
}

.code-promo input:focus {
  outline: none;
  border-color: #3b82f6;
}

.code-promo button {
  padding: 12px 20px;
  background: #1e293b;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  color: #cbd5e1;
  transition: var(--transition);
}

.code-promo button:hover {
  border-color: #3b82f6;
  color: #93c5fd;
}

.checkout-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(135deg, green, rgb(64, 161, 240));
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  margin-bottom: 20px;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.secure-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--accent-green);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 25px;
}

.livraison-info {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 20px;
}

.livraison-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 12px;
}

.livraison-item i {
  color: var(--blue-primary);
  font-size: 16px;
}

/* Note: Footer styles are now handled by style.css */

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 1024px) {
  .panier-wrapper {
    flex-direction: column;
  }

  .panier-summary {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .panier-container {
    padding: 30px 20px;
  }

  .produit-header {
    display: none;
  }

  .produit-item {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .produit-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .produit-total {
    justify-content: flex-start;
    gap: 15px;
  }

  .produit-actions {
    flex-direction: column;
    gap: 15px;
  }

  .continue-btn,
  .update-btn {
    width: 100%;
    justify-content: center;
  }
}
