* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f3f4f6;
  color: #111827;
  line-height: 1.5;
}

header {
  background: #1f2937;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.brand a {
  color: #fff;
  text-decoration: none;
}

.cart-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  margin-bottom: 1.5rem;
  color: #1f2937;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.product:hover {
  transform: translateY(-4px);
}

.product img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.product-desc {
  color: #6b7280;
  font-size: 0.9rem;
  flex: 1;
  margin: 0.5rem 0;
}

.product-price {
  color: #2563eb;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.add-to-cart {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
}

.add-to-cart:hover {
  background: #059669;
}

.checkout-paypal {
  background: #ffc439;
  color: #111827;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
}

.checkout-paypal:hover {
  background: #e6b02f;
}

.cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 20;
  transform: translateX(0);
  transition: transform 0.25s ease;
}

.cart.hidden {
  transform: translateX(100%);
}

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

.cart-items {
  list-style: none;
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}

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

.cart-item-info {
  flex: 1;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

.cart-item-qty button {
  width: 28px;
  height: 28px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  border-radius: 0.25rem;
}

.remove-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: 0.75rem;
}

.cart-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e7eb;
}

.total {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.checkout-btn {
  width: 100%;
  background: #f97316;
  color: #fff;
  border: none;
  padding: 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
}

.checkout-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 30;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 0.75rem;
  padding: 2rem;
  width: 90%;
  max-width: 420px;
  position: relative;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  color: #6b7280;
}

#paypal-button-container {
  margin-top: 1rem;
  min-height: 40px;
}

.notification {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: #1f2937;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;
  z-index: 50;
}

.notification.hidden {
  display: none;
}

@media (max-width: 480px) {
  .cart {
    width: 100%;
  }
}

.result-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 64px);
}

.result-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 420px;
  width: 90%;
}

.result-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  color: #fff;
}

.result-icon.success {
  background: #10b981;
}

.result-icon.fail {
  background: #ef4444;
}

footer {
  background: #1f2937;
  color: #fff;
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 2rem;
}

.product a {
  color: inherit;
  text-decoration: none;
}

.product > a {
  display: block;
}

.product-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.detail-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
}

.detail-card img {
  width: 100%;
  max-width: 400px;
  object-fit: cover;
  flex: 0 0 auto;
  align-self: flex-start;
}

.detail-info {
  padding: 2rem;
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
}

.detail-info h1 {
  margin-bottom: 1rem;
  color: #1f2937;
}

.detail-desc {
  color: #6b7280;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.detail-price {
  color: #2563eb;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

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

  .detail-card img {
    max-width: 100%;
    height: auto;
  }
}

.footer-links {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.page-content h1 {
  margin-bottom: 1.5rem;
}

.page-content h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.page-content p {
  margin-bottom: 0.75rem;
  color: #4b5563;
  line-height: 1.7;
}

.page-content a {
  color: #2563eb;
}

.contact-form {
  max-width: 500px;
  margin-top: 1rem;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-family: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  margin-top: 1rem;
}
