/* styles/cart.css */

main {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
  color: #5a4631;
}

/* Page Title */

h1 {
  text-align: center;
  font-family: 'Quicksand', sans-serif;
  font-size: 2.5rem;
  color: #7a5e3a;
  margin-bottom: 20px;
}

/* Cart Table */

table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: white;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #a8997e;
  color: white;
  font-weight: 700;
}

tr:hover {
  background-color: #f4f1ea;
}

.total-row td {
  font-weight: 700;
  font-size: 1.2rem;
  border-top: 2px solid #7a5e3a;
}

/* Navigation buttons */

.nav-links {
  margin: 20px auto;
  max-width: 800px;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  background-color: #a8997e;
  color: white;
  padding: 10px 20px;
  border-radius: 40px;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

.nav-links a:hover {
  background-color: #7a674a;
}

/* Quantity buttons */

.qty-btn {
  background-color: #a8997e;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  user-select: none;
}

.qty-btn:hover,
.qty-btn:focus {
  background-color: #7a674a;
  outline: none;
}

/* Remove button */

.remove-btn {
  background-color: #c94f4f;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.remove-btn:hover,
.remove-btn:focus {
  background-color: #8b3535;
  outline: none;
}

/* Responsive cart layout */

@media (max-width: 600px) {

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead tr {
    display: none;
  }

  tbody tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
  }

  tbody td {
    padding: 10px 15px;
    text-align: right;
    position: relative;
  }

  tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    font-weight: 700;
    text-align: left;
    color: #7a674a;
  }

}

/* Confirmation modal adjustments */

#confirmModal .modal-content {
  max-width: 350px;
  text-align: center;
}

#confirmModal .btn-catalog {
  padding: 10px 30px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  background-color: #a8997e;
  color: white;
  border: none;
  transition: background-color 0.3s ease;
}

#confirmModal .btn-catalog:hover,
#confirmModal .btn-catalog:focus {
  background-color: #7a674a;
  outline: none;
}