/* --- checkout.css --- */
body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background: #f9f9f9;
}

.container {
  max-width: 700px;
  margin: auto;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1, h3 {
  color: #2e7d32;
  text-align: left; /* default untuk desktop */
}

@media (max-width: 768px) {
  h1, h3 {
    text-align: center;
  }
}


.product-summary {
  display: block;
  margin-top: 20px;
}

/* Gaya produk yang baru diasingkan daripada inline style */
.product-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 10px;
  background: #fff;
}

.product-item img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

/* Gaya shipping dan total */
.shipping-fee {
  color: #888;
  font-size: 14px;
  margin-top: 10px;
}

.total-grand {
  font-weight: bold;
  color: #000;
}

/* Gaya form */
.details p, form p {
  margin: 8px 0;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.confirm {
  text-align: center;
  margin-top: 30px;
}

.confirm button {
  padding: 12px 30px;
  font-size: 16px;
  background-color: #2e7d32;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.confirm button:hover {
  background-color: #1b5e20;
}

.shipping-note {
  font-size: 0.9em;
  color: #666;
  margin-top: -10px;
  margin-bottom: 15px;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: max-content;
  max-width: 250px;
  background-color: #333;
  color: #fff;
  text-align: left;
  padding: 5px 8px;
  border-radius: 4px;
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85em;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.jumlah-pokok {
  font-size: 1em;
  color: #333;
  margin-top: 5px;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .product-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  .product-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
  }

  .product-item div {
    text-align: left;
    width: 100%;
  }

  .product-item p {
    margin: 4px 0;
    font-size: 15px;
  }

  .jumlah-pokok,
  .shipping-fee,
  .shipping-note,
  .total-grand {
    font-size: 15px;
    text-align: left;
  }

  .confirm button {
    width: 100%;
    font-size: 18px;
    padding: 14px 0;
  }
}

@media (max-width: 768px) {
  .product-item img {
    width: 90%;
    height: auto;
    max-width: 200px;
    object-fit: cover;
    display: block;
    margin: auto;
    border-radius: 10px;
  }

  .product-item {
    align-items: center;
  }
}

.note-email {
  color: gray;
  font-size: 0.85rem;
  font-style: italic;
  display: block;
  margin-top: 4px;
}

