/* Container & scroll-behavior */
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
html { scroll-behavior: smooth; }

/* No-items notice */
#no-items-message {
  text-align: center;
  font-size: 1.2rem;
  margin-top: 2rem;
}

/* Cart section wrapper */
section[cart] {
  margin: 0 auto;
  padding: 0 0.5rem;        /* reduced padding for mobile to make it wider */
  max-width: 1024px;
  width: 100%;
}
/* Even narrower on very small screens */
@media (max-width: 480px) {
  section[cart] {
    padding: 0 0.25rem;
  }
}

/* Wider on very small screens */
@media (max-width: 480px) {
  section[cart] {
    padding: 0 0.5rem;
  }
}

@media (min-width: 768px) {
  section[cart] {
    padding: 0 4rem;
  }
}
@media (min-width: 992px) {
  section[cart] {
    padding: 0 6rem;
  }
}
@media (min-width: 1200px) {
  section[cart] {
    padding: 0 8rem;
  }
}

section[cart] > h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

section[cart] > h2 + div {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  box-sizing: border-box;
}

section[cart] > h2 + div table {
  width: auto;
  min-width: 100%;
}

section[cart] > h2 + div + div {
  text-align: right;
}

#update-cart-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  background-color: #b0ecb4;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}
#update-cart-btn:hover {
  background-color: #a0dca4;
}

table {
  border-collapse: collapse;
  margin-top: 1rem;
}
th, td {
  text-align: center;
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
}
th {
  border-bottom: 2px solid #ddd;
}

#checkout-row {
  display: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
@media (max-width: 768px) {
  #checkout-row {
    align-items: center;
  }
}
#checkout-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  background-color: #056bfa27;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}
#checkout-btn:hover {
  background-color: #056bfa49;
}
@media (min-width: 992px) {
  #checkout-btn {
    max-width: 400px;
  }
}

#checkout-row > h5 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 15px 5px 0 0;
  font-size: 0.9rem;
  position: relative;
}
#checkout-row > h5::before,
#checkout-row > h5::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #ccc;
  margin: 0 10px;
}
#checkout-row > h5,
#cart-button-container {
  width: 100%;
}
@media (min-width: 992px) {
  #checkout-row > h5,
  #cart-button-container {
    max-width: 400px;
  }
}
#cart-button-container > div {
  width: 100%;
}

#no-items-message {
  text-align: center;
  font-size: 1.2rem;
  margin-top: 2rem;
}
.delete-icon {
  cursor: pointer;
}
a {
  text-decoration: none;
  color: #d61f1f;
}