
.cart-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.cart-items {
  flex: 2;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  padding: 1rem 0;
}

.cart-item img {
  width: 80px;
  border-radius: 8px;
}

.item-info {
  flex: 1;
  margin-left: 1rem;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-control button {
  background-color: #fb9908;
  border: none;
  color: #292929;
  font-weight: bold;
  padding: 5px 10px;
  margin: 0 5px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 1rem;
}

.qty-control button:hover {
  background-color: #292929;
  color: #fb9908;
}

.cart-summary {
  flex: 1;
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 10px;
}

.cart-summary h3 {
  margin-bottom: 1rem;
}

.cart-summary .line {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0;
}

.cart-summary .btn-filled {
  width: 100%;
  margin-top: 1rem;
}

@media(max-width: 768px) {
  .cart-container {
    flex-direction: column;
  }
}

/* Dark mode */
body.dark .cart-summary {
  background: #2a2a2a;
  color: #f1f1f1;
}

body.dark .cart-summary .line {
  color: #f1f1f1;
}

.remove-item {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #d33;
}

.remove-item:hover {
  color: #f00;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}

.modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 1.2rem;
  width: 90%;
  max-width: 340px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}


.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-title {
  margin-bottom: 1rem;
}

.modal-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal-actions button {
  min-width: 100px;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
}

.btn-filled.danger {
  background-color: #d33;
  color: white;
}

.btn-outlined {
  border: 1px solid #aaa;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.hidden {
  display: none;
}

@media (max-width: 480px) {
  .modal-box {
    width: 90%;
    max-width: 300px;
    padding: 1rem;
    border-radius: 12px;
    margin: auto;
  }

  .modal-title {
    font-size: 1.1rem;
    word-break: break-word;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .modal-actions button {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
  }

  .modal-overlay {
    align-items: center;
    justify-content: center;
  }
  .modal-box {
    max-height: 630px;
    overflow-y: auto;
  }
}
