.cart-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.cart-modal-content {
  background: white;
  border-radius: 20px;
  max-width: 320px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

/* =========================
   BUY NOW MODAL (single flavor)
========================= */
.buy-now-modal { max-width: 460px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0;
}

.modal-close {
  flex-shrink: 0;
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 700;
  color: #1f2937;
  cursor: pointer;
  transition: transform 0.2s;
}
.modal-close:hover { transform: scale(1.1); }

.flavor-hero {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.flavor-visual {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.flavor-jar-img {
  width: 68%;
  height: 68%;
  object-fit: contain;
}

.flavor-info { min-width: 0; text-align: center; }

.flavor-title {
  font-family: 'Pageson', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

.flavor-desc {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
}

.size-select-panel {
  background: #f3f3f3;
  border: 1px solid #dcdcdc;
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
}

.size-panel-label {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1f2937;
  margin: 0 0 0.65rem;
}

.size-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  cursor: pointer;
}
.size-option + .size-option { border-top: 1px solid #e2e2e2; }

.size-option-name {
  color: #6b7280;
  font-weight: 600;
  font-size: 0.95rem;
}

.size-option-price {
  color: #6b7280;
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: auto;
}

.size-radio-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.radio-visual {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.radio-visual::after {
  content: '';
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s;
}
.size-radio-input:checked + .radio-visual { border-color: #344300; }
.size-radio-input:checked + .radio-visual::after { background: #344300; }
.size-radio-input:focus-visible + .radio-visual { outline: 3px solid rgba(122, 154, 35, 0.25); }

.buy-now-footer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.qty-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #f1f3f6;
  border: 1px solid #e5e7eb;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.qty-btn:hover { background: #e5e7eb; }
.qty-btn:disabled { opacity: 0.35; cursor: default; }
.qty-btn:disabled:hover { background: #f1f3f6; }

.qty-value {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #111827;
}

.add-to-cart-btn {
  flex: 1;
  background: #6e911d;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s;
  border: none;
}
.add-to-cart-btn:hover { transform: scale(1.03); }

@media (min-width: 640px) {
  .flavor-hero { flex-direction: row; align-items: center; }
  .flavor-visual { margin: 0; flex: 0 0 40%; }
  .flavor-info { text-align: left; }
}

@media (min-width: 768px) {
  .buy-now-modal { max-width: 640px; }
  .flavor-title { font-size: 2rem; }
}

@media (max-width: 767px) {
  .cart-modal-content { width: calc(100% - 1.5rem); max-width: 26rem; }
}

/* =========================
   CONFIRM MODAL
========================= */
.confirm-modal-content {
  max-width: 360px;
  text-align: center;
}

.confirm-modal-message {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.confirm-modal-actions {
  display: flex;
  gap: 0.75rem;
}

.confirm-btn {
  flex: 1;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.confirm-btn:hover { transform: scale(1.03); }

.confirm-btn-cancel { background: #f1f3f6; color: #111827; }
.confirm-btn-cancel:hover { background: #e5e7eb; }

.confirm-btn-danger { background: #b51435; color: white; }
.confirm-btn-danger:hover { background: #971029; }

.confirm-btn-primary { background: #6e911d; color: white; }
.confirm-btn-primary:hover { background: #5c7a17; }

/* =========================
   PLACE ORDER BUTTON (disabled state)
========================= */
#place-order-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
#place-order-btn:disabled:hover { background: #65a30d; }

/* =========================
   FIELD VALIDATION
========================= */
.field-error-text {
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.25rem 0 0.75rem;
}

.input-invalid {
  outline: 2px solid #dc2626 !important;
  outline-offset: -2px;
  background-color: #fef2f2 !important;
}

/* =========================
   PAYMENT OPTIONS
========================= */
.payment-radio {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #6e911d;
  flex-shrink: 0;
}

.payment-option:has(.payment-radio:checked) {
  border-color: #6e911d;
  background: #f4f8ea;
}

.payment-details {
  margin: -0.5rem 0 0.25rem;
  padding: 0.85rem 1rem;
  border: 1px dashed #6e911d;
  border-radius: 0.5rem;
  background: #f4f8ea;
  font-size: 0.9rem;
  color: #344300;
  line-height: 1.5;
}

.payment-details p { margin: 0 0 0.4rem; }
.payment-details p:last-child { margin-bottom: 0; }

.payment-account {
  font-weight: 700;
  font-size: 1rem;
}

.payment-account-title {
  font-weight: 500;
  font-size: 0.85rem;
}

.payment-whatsapp-link {
  color: #25D366;
  font-weight: 700;
  text-decoration: underline;
}
