/* styles/cart.css */

main {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
  color: #5a4631;
}
.header {
  position: fixed;         /* fixed at top */
  top: 0;
  left: 0;
  width: 100vw;            /* full viewport width */
  background-color: #a8997e; /* theme color */
  padding: 15px 30px;
  box-shadow: 0 2px 5px rgba(122, 94, 58, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
  box-sizing: border-box;
}

/* Center header content and limit max width */
.header > * {
  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
}

.header a {
  color: white;
  text-align: center;
  padding: 10px 16px;
  text-decoration: none;
  font-size: 1.1rem;
  border-radius: 6px;
  font-weight: 700;
  transition: background-color 0.3s ease;
  margin-left: 1rem;
}

.header a.logo {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 10px 20px 10px 0;
  cursor: pointer;
  margin-left: 0;
}

.header a:hover {
  background-color: #7a674a;
  color: white;
}

.header a.active {
  background-color: #7a674a;
  pointer-events: none;
  cursor: default;
}

/* Add padding to body to prevent content hidden behind fixed header */
body {
  padding-top: 70px;
}

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

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;
}

.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 styling */
.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: stack table on small screens */
@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 styles (reuse your existing .modal and .modal-content styles) */

#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;
}
