/* ═══════════════════════════════════════════
   LUNARIS CART STYLES
   Link in every HTML page:
   <link rel="stylesheet" href="cart.css">
════════════════════════════════════════════ */

/* ── Cart icon in nav ── */
.cart-nav-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-nav-btn svg {
  width: 22px;
  height: 22px;
  stroke: #333;
  fill: none;
  transition: stroke .2s;
}
.cart-nav-btn:hover svg { stroke: #C8547A; }

#cartBadge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #C8547A;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
}

/* ── Overlay ── */
#cartOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
#cartOverlay.show {
  opacity: 1;
  pointer-events: all;
}

/* ── Drawer ── */
#cartDrawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 999;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}
#cartDrawer.open { transform: translateX(0); }

/* ── Drawer header ── */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.cart-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}
.cart-header-sub {
  font-size: 11px;
  color: #C8547A;
  direction: rtl;
  margin-top: 2px;
}
.cart-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.cart-close-btn:hover { background: #f5f5f5; }
.cart-close-btn svg { width: 20px; height: 20px; stroke: #555; fill: none; }

/* ── Items view ── */
#cartItemsView {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#cartItems {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: #bbb;
  font-size: 14px;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 80px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8eef2;
  flex-shrink: 0;
}
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.cart-item-info { flex: 1; }
.cart-item-name {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.cart-item-meta {
  font-size: 11px;
  color: #999;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.cart-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #C8547A;
  margin-bottom: 10px;
}

.cart-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1.5px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  line-height: 1;
}
.qty-btn:hover { border-color: #C8547A; color: #C8547A; }
.qty-num {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  min-width: 20px;
  text-align: center;
}
.remove-btn {
  background: none;
  border: none;
  color: #bbb;
  font-size: 11px;
  cursor: pointer;
  margin-left: 8px;
  text-decoration: underline;
  transition: color .2s;
}
.remove-btn:hover { color: #C8547A; }

/* ── Cart footer ── */
.cart-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cart-total-label {
  font-size: 13px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#cartTotal {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}
.btn-checkout {
  width: 100%;
  background: #C8547A;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 15px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn-checkout:hover { background: #A03060; transform: translateY(-1px); }
.btn-continue {
  width: 100%;
  background: none;
  border: none;
  color: #aaa;
  font-size: 12px;
  cursor: pointer;
  margin-top: 10px;
  text-decoration: underline;
  transition: color .2s;
}
.btn-continue:hover { color: #555; }

/* ── Checkout view ── */
#cartCheckoutView {
  flex: 1;
  overflow-y: auto;
  display: none;
  flex-direction: column;
}

.checkout-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.checkout-back {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #555;
  padding: 0;
  transition: color .2s;
}
.checkout-back:hover { color: #C8547A; }
.checkout-header h4 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.checkout-form {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.form-group input,
.form-group select {
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
  background: #fff;
  transition: border-color .2s;
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus { border-color: #C8547A; }
.form-group input::placeholder { color: #bbb; }

.form-divider {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #bbb;
  margin: 20px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #eee;
}

#formErrors {
  display: none;
  background: #fff5f7;
  border: 1px solid #f5c0cc;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
#formErrors p {
  font-size: 12px;
  color: #C8547A;
  margin-bottom: 4px;
}
#formErrors p:last-child { margin-bottom: 0; }

.checkout-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}
.order-summary-mini {
  background: #fdf5f8;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.order-summary-mini .summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #777;
  margin-bottom: 4px;
}
.order-summary-mini .summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e8c4d2;
}
.btn-whatsapp {
  width: 100%;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 15px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-whatsapp:hover { background: #1aab52; transform: translateY(-1px); }
.btn-whatsapp svg { width: 20px; height: 20px; fill: #fff; }
.whatsapp-note {
  font-size: 11px;
  color: #bbb;
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

@media (max-width: 480px) {
  #cartDrawer { width: 100vw; }
  .form-row { grid-template-columns: 1fr; }
}