/* GLOBAL CART & ORDER MODAL STYLES */

/* CART ICON BUTTON */
.cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-body, 'Montserrat', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: #222;
  border-radius: 8px;
  transition: background 0.25s ease;
}

.cart-btn:hover {
  background: rgba(0, 200, 83, .07);
  color: #004d20;
}

.cart-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

.cart-badge.show {
  display: flex;
}

/* CART PANEL */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 94vw);
  height: 100vh;
  background: #fff;
  z-index: 1101;
  box-shadow: -8px 0 40px rgba(0, 0, 0, .12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.cart-panel-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: #888;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
  transition: color .2s;
}

.cart-close:hover {
  color: #333;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.cart-empty {
  text-align: center;
  padding: 48px 0;
  color: #aaa;
  font-size: 14px;
}

.cart-empty svg {
  width: 56px;
  height: 56px;
  stroke: #ddd;
  margin-bottom: 12px;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f0faf3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  font-size: 13.5px;
  color: #222;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 13px;
  color: #004d20;
  font-weight: 600;
}

.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 18px;
  line-height: 1;
  transition: color .2s;
  padding: 0 4px;
}

.cart-item-remove:hover {
  color: #e53935;
}

.cart-foot {
  padding: 20px 24px;
  border-top: 2px solid #f0f0f0;
  background: #fafafa;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total-label {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.cart-total-val {
  font-size: 20px;
  font-weight: 800;
  color: #004d20;
}

.cart-order-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #00c853, #004d20);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 20px rgba(0, 200, 83, .3);
  letter-spacing: .5px;
}

.cart-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 200, 83, .4);
}

.cart-order-btn:disabled {
  opacity: .6;
  transform: none;
  cursor: not-allowed;
}


/* MODAL OVERLAY */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px 32px;
  max-width: 520px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  line-height: 1;
}

.modal-title {
  font-family: var(--ff-head, 'Playfair Display', serif);
  font-size: 1.8rem;
  color: #004d20;
  margin: 0 0 6px;
  font-weight: 700;
}

.modal-subtitle {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.modal-pkg-info {
  background: #f0faf4;
  border-left: 4px solid #004d20;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: #004d20;
  font-weight: 600;
  margin-bottom: 22px;
}

.modal-form label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: #333;
  margin-bottom: 6px;
  margin-top: 16px;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--ff-body, 'Montserrat', sans-serif);
  outline: none;
  transition: border-color 0.2s;
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
  border-color: #004d20;
}

.modal-form textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-submit {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  background: #004d20;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s;
  text-transform: uppercase;
}

.modal-submit:hover {
  background: #003515;
}

.modal-success {
  display: none;
  text-align: center;
  padding: 20px 0 10px;
}

.modal-success .check-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.modal-success h3 {
  color: #004d20;
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.modal-success p {
  color: #555;
  margin: 0;
}
