* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #8a2be2, #6a0dad);
  color: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.2);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

h1 i {
  margin-right: 15px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.cart-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 30px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  background-color: #8a2be2;
  color: white;
  padding: 15px;
  text-align: left;
}

.cart-table td {
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.cart-item {
  transition: all 0.3s ease;
}

.cart-item:hover {
  background-color: #f9f5ff;
}

.product-cell {
  display: flex;
  align-items: center;
}

.product-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 15px;
  border: 2px solid #e6e6e6;
}

.product-info h3 {
  margin-bottom: 5px;
  color: #333;
  font-size: 1.1rem;
}

.product-info p {
  color: #666;
  font-size: 0.9rem;
}

.quantity-controls {
  display: flex;
  align-items: center;
}

.quantity-btn {
  background: #8a2be2;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.quantity-btn:hover {
  background: #6a0dad;
  transform: scale(1.1);
}

.quantity-input {
  width: 50px;
  text-align: center;
  margin: 0 10px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.delete-btn {
  background: #ff4757;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-btn:hover {
  background: #ff2e43;
  transform: scale(1.05);
}

.total-label {
  text-align: right;
  font-weight: bold;
  font-size: 1.2rem;
  color: #8a2be2;
}

.total-price {
  font-weight: bold;
  font-size: 1.2rem;
  color: #8a2be2;
}

tfoot tr {
  background-color: #f3e8ff;
}

.features {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

.feature {
  background: white;
  flex-grow: 0;
  width: 280px;
  text-align: center;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
}

.feature-icon {
  color: #8a2be2;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 4rem;
}

.feature-content h3 {
  color: #8a2be2;
  margin-bottom: 5px;
  font-size: 1.75rem;
}

.feature-content p {
  color: #666;
  font-size: 1rem;
}

.back-btn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  margin-top: 3rem;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.back-btn i {
  margin-right: 8px;
}

/* Loading Screen Styles */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6a0dad, #9b30ff); /* Purple theme */
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999999999999;
  overflow: hidden;
  text-align: center;
  transition: transform 0.8s ease;
}

.hide {
  transform: translateY(100%);
}

.loader {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.loader .spinner {
  width: 50px;
  height: 50px;
  border: 5px solid white;
  border-top: 5px solid #e0c3ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

.loader p {
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-align: center;
}

/* Livraison Row */

.delivery-label {
  width: 100%;
  text-align: right;
  font-weight: 600;
  font-size: 1.1rem;
  color: #6a0dad;
}

.delivery-price {
  font-weight: 600;
  font-size: 1.1rem;
  color: #6a0dad;
}

.delivery-row {
  background-color: #f5e7ff;
}
tfoot tr {
  background: rgb(92, 0, 128);
}

/* Empty Cart Section */
.empty-cart {
  text-align: center;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  background: white;
  padding: 20px 10px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.empty-cart i {
  font-size: 4rem;
  color: #8a2be2;
  margin-bottom: 15px;
}

.empty-cart h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #333;
}

.empty-cart p {
  color: #666;
  margin-bottom: 20px;
  font-size: 1rem;
}

.shop-now-btn {
  display: flex;
  width: 30%;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #8a2be2;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.shop-now-btn:hover {
  background: #6a0dad;
}

.shop-now-btn i {
  font-size: 1.5rem;
  align-self: center;
  margin: 0;
  color: white;
}

/* ================= Responsive ================= */

/* Medium devices (tablets) */
@media (max-width: 992px) {
  .container {
    padding: 10px;
  }

  h1 {
    font-size: 2rem;
  }

  .feature {
    width: 45%;
  }

  .shop-now-btn {
    width: 60%;
  }
}

/* Small devices (phones) */
@media (max-width: 768px) {
  /* Cart Table responsive */
  .cart-table thead {
    display: none;
  }

  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table td {
    display: block;
    width: 100%;
  }

  .cart-table tr {
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 10px;
    background: #fff;
  }

  .cart-table td {
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: left;
  }

  .cart-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    font-weight: bold;
    color: #8a2be2;
  }

  .product-cell {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-image {
    margin-bottom: 10px;
    margin-right: 0;
    width: 100%;
    height: auto;
  }

  .delete-btn {
    width: 100%;
    justify-content: center;
  }

  .total-label,
  .delivery-label {
    width: 100%;
    text-align: center;
  }

  .shop-now-btn {
    width: 100%;
    justify-content: center;
    gap: 10px;
  }

  .features {
    flex-direction: column;
    align-items: center;
  }

  .feature {
    width: 100%;
  }

  .cart-table tbody,
  .cart-table tbody tr,
  .cart-table tbody td {
    display: block;
    width: 100%;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table tbody tr {
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 10px;
    background: #fff;
  }

  .cart-table tbody td {
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: left;
  }


}

/* Extra small devices */
@media (max-width: 480px) {
  h1 {
    font-size: 1.6rem;
  }

  header p {
    font-size: 0.9rem;
  }

  .product-info h3 {
    font-size: 1rem;
  }

  .product-info p {
    font-size: 0.85rem;
  }

  .quantity-input {
    width: 40px;
  }

  .shop-now-btn {
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
  }
}

@media (max-width: 768px) {
  .cart-table tfoot tr {
    display: inline-flex;
    margin-bottom: 10px;
    justify-content: center;
    align-items: center;
    flex: 5;
    width: 198%;
    overflow: visible;
  }

  .cart-table tfoot td {
    display: flex;
    justify-content: center; /* center content horizontally */
    align-items: center; /* center vertically */
    width: 200%;
    padding-left: 0; /* REMOVE the 50% padding */
    padding: 12px 0;
  }
  .delivery-row {
    background-color: #f5e7ff;
  }
  tfoot tr {
    background: rgb(92, 0, 128);
  }
}


.checkout-btn-container {
    display: flex;
    margin-top: 2rem;
    padding-bottom: 1rem;
    justify-content: center; /* centre le bouton horizontalement */
    margin-top: 20px;        /* espace au-dessus */
}

#checkout-btn {
    background-color: #9350ff; /* couleur du bouton */
    border: none;
    padding: 12px 25px;
    font-weight: bold;
    border-radius: 8px;        /* coins arrondis */
    cursor: pointer;
    transition: background 0.3s;
}

#checkout-btn:hover {
    background-color: #72039e; /* couleur au survol */
}

#checkout-btn a{
  color: #fff;   
  text-decoration: none;  
  font-size: 18px;          /* texte blanc */
}