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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #F0EBE3;
  color: #2C1000;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.page-wrapper {
  width: 100%;
  max-width: 480px; margin: 0 auto;
  background: #F0EBE3;
  min-height: 100vh; position: relative;
  padding-bottom: max(90px, calc(75px + env(safe-area-inset-bottom, 0px)));
}

/* ===== TOPBAR ===== */
.cart-topbar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(74,21,0,0.08);
  box-shadow: 0 2px 12px rgba(74,21,0,0.06);
}

.cart-back-btn, .cart-clear-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(74,21,0,0.06);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #2C1000;
  transition: all 0.2s;
}
.cart-back-btn:hover { background: rgba(74,21,0,0.12); }
.cart-clear-btn:hover { background: rgba(192,57,43,0.12); color: #C0392B; }

.cart-topbar-title {
  font-size: 0.95rem; font-weight: 700; color: #2C1000;
}

/* ===== CONTENT ===== */
.cart-content {
  margin-top: 60px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 14px;
}

/* ===== ITEM CARD ===== */
.cart-items-wrap {
  display: flex; flex-direction: column; gap: 10px;
}

.cart-item-card {
  display: flex; gap: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(74,21,0,0.07);
  box-shadow: 0 2px 10px rgba(74,21,0,0.04);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cart-item-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(74,21,0,0.08);
}

.cart-item-img {
  width: 76px; height: 76px;
  border-radius: 10px; object-fit: cover;
  flex-shrink: 0; background: #f5ede2;
  cursor: pointer;
}

.cart-item-info {
  flex: 1; display: flex; flex-direction: column;
  justify-content: space-between;
}

.cart-item-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 6px;
}

.cart-item-name {
  font-size: 0.8rem; font-weight: 700; color: #2C1000;
  line-height: 1.25; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cart-item-name:hover { color: #B5661B; }

.cart-item-del {
  border: none; background: transparent;
  color: rgba(44,16,0,0.35); cursor: pointer;
  padding: 2px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s;
}
.cart-item-del:hover { color: #C0392B; }

.cart-item-price-unit {
  font-size: 0.68rem; color: rgba(44,16,0,0.55);
}

.cart-item-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px;
}

.cart-item-subtotal {
  font-size: 0.85rem; font-weight: 800; color: #4A1500;
}

.cart-qty-ctrl {
  display: flex; align-items: center;
  border: 1px solid rgba(74,21,0,0.18);
  border-radius: 8px; overflow: hidden;
  background: #FEFAF3;
}

.cart-qty-btn {
  width: 28px; height: 28px;
  border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #2C1000;
  transition: background 0.15s;
}
.cart-qty-btn:hover { background: rgba(74,21,0,0.08); }

.cart-qty-num {
  width: 32px; text-align: center;
  font-size: 0.78rem; font-weight: 700; color: #2C1000;
}

/* ===== EMPTY STATE ===== */
.cart-empty {
  text-align: center; padding: 48px 20px;
  background: #fff; border-radius: 16px;
  border: 1px solid rgba(74,21,0,0.06);
  box-shadow: 0 2px 12px rgba(74,21,0,0.04);
}
.empty-icon-wrap {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(212,160,23,0.12);
  color: #B5661B;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.cart-empty h3 {
  font-size: 1.05rem; font-weight: 700; color: #2C1000; margin-bottom: 6px;
}
.cart-empty p {
  font-size: 0.78rem; color: rgba(44,16,0,0.6); margin-bottom: 20px;
}
.btn-shop-now {
  display: inline-flex; align-items: center; justify-content: center;
  background: #4A1500; color: #F5C842;
  font-size: 0.8rem; font-weight: 700;
  padding: 11px 24px; border-radius: 25px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(74,21,0,0.25);
  transition: transform 0.2s;
}
.btn-shop-now:hover { transform: translateY(-2px); }

/* ===== SECTION TITLES & CARDS ===== */
.cart-section-title {
  font-size: 0.86rem; font-weight: 700; color: #2C1000;
  margin-bottom: 12px;
}

.cart-form-card, .cart-summary-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(74,21,0,0.07);
  box-shadow: 0 2px 10px rgba(74,21,0,0.04);
}

/* Form Styles */
.form-group {
  margin-bottom: 11px;
}
.form-group:last-child { margin-bottom: 0; }
.form-group label {
  display: block; font-size: 0.7rem; font-weight: 600;
  color: #4A1500; margin-bottom: 4px;
}
.form-group label .req { color: #C0392B; }
.form-group input, .form-group textarea {
  width: 100%; padding: 9px 12px;
  border-radius: 8px; border: 1.5px solid rgba(74,21,0,0.14);
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem; color: #2C1000;
  background: #FEFAF3; outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: #B5661B; background: #fff;
}

/* Summary Card */
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: rgba(44,16,0,0.7);
  margin-bottom: 8px;
}
.free-tag {
  font-size: 0.65rem; font-weight: 700; color: #27ae60;
  background: rgba(39,174,96,0.1); padding: 2px 6px; border-radius: 4px;
}
.info-tag {
  font-size: 0.65rem; font-weight: 600; color: #B5661B;
  background: rgba(181,102,27,0.1); padding: 2px 6px; border-radius: 4px;
}
.summary-divider {
  height: 1px; background: rgba(74,21,0,0.08); margin: 10px 0;
}
.total-row {
  margin-bottom: 0; font-size: 0.88rem; font-weight: 700; color: #2C1000;
}
.total-price {
  font-size: 1.15rem; font-weight: 800; color: #4A1500;
}

/* Trust Badges */
.cart-trust-badges {
  display: flex; gap: 8px;
}
.trust-badge {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  background: rgba(74,21,0,0.04);
  padding: 8px 10px; border-radius: 8px;
  font-size: 0.65rem; font-weight: 600; color: rgba(44,16,0,0.7);
}
.trust-badge svg { stroke: #27ae60; flex-shrink: 0; }

/* ===== BOTTOM BAR ===== */
.cart-bottom-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(74,21,0,0.08);
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(74,21,0,0.08);
}

.bar-total-wrap {
  display: flex; flex-direction: column;
}
.bar-label {
  font-size: 0.65rem; color: rgba(44,16,0,0.55); font-weight: 500;
}
.bar-price {
  font-size: 1.15rem; font-weight: 800; color: #4A1500;
}

.btn-checkout {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff; border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  padding: 13px 20px; border-radius: 12px;
  cursor: pointer; flex: 1; max-width: 230px;
  box-shadow: 0 4px 14px rgba(37,211,102,0.35);
  transition: all 0.2s;
}
.btn-checkout:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37,211,102,0.45);
}

/* ===== TOAST ===== */
.cart-toast {
  position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #2C1000; color: #F5C842;
  font-size: 0.78rem; font-weight: 600;
  padding: 9px 18px; border-radius: 25px;
  z-index: 200; opacity: 0; pointer-events: none;
  transition: all 0.3s ease; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(44,16,0,0.3);
}
.cart-toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* ===== CS WHATSAPP MODAL POPUP ===== */
.ds-cs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 16px;
}
.ds-cs-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.ds-cs-modal-card {
  width: 100%;
  max-width: 380px;
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(212, 160, 23, 0.4);
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.ds-cs-modal-overlay.show .ds-cs-modal-card {
  transform: translateY(0) scale(1);
}
.ds-cs-modal-header {
  background: linear-gradient(135deg, #4A1500 0%, #300A00 100%);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  position: relative;
  border-bottom: 1.5px solid rgba(212, 160, 23, 0.3);
}
.ds-cs-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}
.ds-cs-modal-titles {
  flex: 1;
}
.ds-cs-modal-titles h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #F5C842;
  margin: 0 0 2px;
}
.ds-cs-modal-titles p {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}
.ds-cs-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.ds-cs-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.ds-cs-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FEFAF3;
}
.ds-cs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1.5px solid rgba(74, 21, 0, 0.12);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(74, 21, 0, 0.05);
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.ds-cs-item:hover, .ds-cs-item:active {
  border-color: #25D366;
  background: #F0FFF4;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.22);
}
.ds-cs-item-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(37, 211, 102, 0.3);
}
.ds-cs-item-info {
  flex: 1;
  min-width: 0;
}
.ds-cs-item-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #2C1000;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.ds-cs-badge {
  font-size: 0.62rem;
  font-weight: 600;
  background: rgba(37, 211, 102, 0.15);
  color: #128C7E;
  padding: 2px 6px;
  border-radius: 4px;
}
.ds-cs-item-phone {
  font-size: 0.76rem;
  font-weight: 600;
  color: #7B3A10;
}
.ds-cs-item-arrow {
  font-size: 1.1rem;
  font-weight: 700;
  color: #25D366;
}
.ds-cs-modal-footer {
  padding: 10px 16px 12px;
  text-align: center;
  font-size: 0.7rem;
  color: #7B3A10;
  background: #FEFAF3;
  border-top: 1px solid rgba(74, 21, 0, 0.08);
}
