/* ==================== SCOPED CHECKOUT & CART STYLES ==================== */
.mateshwari-ecom-scope {
  font-family: 'Inter', sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  box-sizing: border-box;
  width: 100%;
}

.mateshwari-ecom-scope *, 
.mateshwari-ecom-scope *::before, 
.mateshwari-ecom-scope *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Header Utilities */
.mateshwari-ecom-scope .header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mateshwari-ecom-scope .logo {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #008f82;
  text-decoration: none;
}

.mateshwari-ecom-scope .secure-badge {
  font-size: 13px;
  color: #05554E;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Main Container Grid */
.mateshwari-ecom-scope .checkout-layout-wrapper {
  max-width: 1200px;
  margin: 30px auto 30px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 25px;
  align-items: start;
}

/* Form Column */
.mateshwari-ecom-scope .checkout-form-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mateshwari-ecom-scope .checkout-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
}

.mateshwari-ecom-scope .card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #05554E;
}

.mateshwari-ecom-scope .card-title span.step-num {
  background: #008f82;
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* Form Fields */
.mateshwari-ecom-scope .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.mateshwari-ecom-scope .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mateshwari-ecom-scope .form-group.full-width {
  grid-column: span 2;
}

.mateshwari-ecom-scope .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.mateshwari-ecom-scope .form-control {
  height: 42px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  background: #f8fafc;
  transition: all 0.2s ease;
  width: 100%;
}

.mateshwari-ecom-scope .form-control:focus {
  border-color: #008f82;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 143, 130, 0.1);
}

/* Scrollable Container for Ordered Items in Left Column */
.mateshwari-ecom-scope .summary-items-scrollbox {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mateshwari-ecom-scope .summary-items-scrollbox::-webkit-scrollbar {
  width: 4px;
}

.mateshwari-ecom-scope .summary-items-scrollbox::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Item Preview Card inside Checkout */
.mateshwari-ecom-scope .item-preview {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  align-items: center;
}

.mateshwari-ecom-scope .item-img {
  width: 65px;
  height: 65px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  object-fit: cover;
  flex-shrink: 0;
}

.mateshwari-ecom-scope .item-details h4 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
}

.mateshwari-ecom-scope .item-details p {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.4;
}

.mateshwari-ecom-scope .item-price-action-col {
  text-align: right;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.mateshwari-ecom-scope .btn-checkout-item-delete {
  background: #ffffff;
  border: 1px solid #fecaca;
  color: #ef4444;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  line-height: 1;
}

.mateshwari-ecom-scope .btn-checkout-item-delete:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.15);
}

.mateshwari-ecom-scope .btn-checkout-item-delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Payment Methods */
.mateshwari-ecom-scope .payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mateshwari-ecom-scope .payment-option-label {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
}

.mateshwari-ecom-scope .payment-option-label:hover, 
.mateshwari-ecom-scope .payment-option-label.active {
  border-color: #008f82;
  background: #F0FDFA;
}

.mateshwari-ecom-scope .payment-option-label input[type="radio"] {
  accent-color: #008f82;
  width: 18px;
  height: 18px;
}

.mateshwari-ecom-scope .payment-info {
  display: flex;
  flex-direction: column;
}

.mateshwari-ecom-scope .payment-info .title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
}

.mateshwari-ecom-scope .payment-info .desc {
  font-size: 11.5px;
  color: #64748b;
}

/* Order Summary Sidebar (Right Fixed Column) */
.mateshwari-ecom-scope .summary-column {
  position: sticky;
  top: 20px;
}

.mateshwari-ecom-scope .summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
}

.mateshwari-ecom-scope .price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  margin-bottom: 10px;
  color: #1e293b;
}

.mateshwari-ecom-scope .price-row.free-text {
  color: #10B981;
  font-weight: 600;
}

.mateshwari-ecom-scope .price-row.total-row {
  border-top: 1px dashed #e2e8f0;
  padding-top: 12px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #05554E;
}

.mateshwari-ecom-scope .btn-place-order {
  width: 100%;
  height: 48px;
  background: #ff8f00;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 18px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(255, 143, 0, 0.25);
}

.mateshwari-ecom-scope .btn-place-order:hover {
  background: #e07d00;
  transform: translateY(-1px);
}

/* ==================== REDESIGNED REVIEW & PLACE ORDER MODAL ==================== */
.mateshwari-ecom-scope .modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.72) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  display: none !important; /* Controlled via JS adding .active */
  align-items: center !important;
  justify-content: center !important;
  z-index: 999999 !important;
  padding: 24px 16px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}

.mateshwari-ecom-scope .modal-overlay.active {
  display: flex !important;
}

.mateshwari-ecom-scope .modal-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  max-width: 860px !important;
  width: 100% !important;
  max-height: calc(100vh - 48px) !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
  position: relative !important;
  animation: modalSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow: hidden !important;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(20px) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Modal Header */
.mateshwari-ecom-scope .modal-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 16px 24px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  flex-shrink: 0 !important;
  margin-bottom: 0 !important;
}

.mateshwari-ecom-scope .modal-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.mateshwari-ecom-scope .modal-header-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: #e6f4f1 !important;
  color: #008f82 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  flex-shrink: 0 !important;
}

.mateshwari-ecom-scope .modal-header h3 {
  font-family: 'Poppins', sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

.mateshwari-ecom-scope .modal-subtitle {
  font-size: 12px !important;
  color: #64748b !important;
  margin-top: 2px !important;
  display: block !important;
}

.mateshwari-ecom-scope .close-modal-btn {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  font-size: 18px !important;
  cursor: pointer !important;
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.mateshwari-ecom-scope .close-modal-btn:hover {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

/* Modal Scrollable Body */
.mateshwari-ecom-scope .modal-body-scroll {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  padding: 20px 24px !important;
  background: #f8fafc !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: #cbd5e1 transparent !important;
}

.mateshwari-ecom-scope .modal-body-scroll::-webkit-scrollbar {
  width: 6px;
}
.mateshwari-ecom-scope .modal-body-scroll::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

/* 2-Column Grid Layout on Desktop */
.mateshwari-ecom-scope .modal-grid-layout {
  display: grid !important;
  grid-template-columns: 1.15fr 0.85fr !important;
  gap: 18px !important;
  align-items: start !important;
}

.mateshwari-ecom-scope .modal-col-main,
.mateshwari-ecom-scope .modal-col-side {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

/* Review Blocks */
.mateshwari-ecom-scope .review-block {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  position: relative !important;
}

.mateshwari-ecom-scope .review-block-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 12px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px dashed #e2e8f0 !important;
}

.mateshwari-ecom-scope .block-title {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: #475569 !important;
  letter-spacing: 0.5px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.mateshwari-ecom-scope .block-title i {
  color: #008f82 !important;
  font-size: 12px !important;
}

.mateshwari-ecom-scope .btn-inline-edit {
  background: #f0fdfa !important;
  border: 1px solid #99f6e4 !important;
  color: #008f82 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  transition: all 0.15s ease !important;
}

.mateshwari-ecom-scope .btn-inline-edit:hover {
  background: #008f82 !important;
  color: #ffffff !important;
  border-color: #008f82 !important;
}

/* Address Card Inside Modal */
.mateshwari-ecom-scope .pop-recipient-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-bottom: 6px !important;
}

.mateshwari-ecom-scope .pop-recipient-name {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.mateshwari-ecom-scope .pop-addr-line {
  font-size: 13px !important;
  color: #334155 !important;
  line-height: 1.45 !important;
  margin-bottom: 3px !important;
  word-break: break-word !important;
}

.mateshwari-ecom-scope .pop-addr-landmark {
  font-size: 12px !important;
  color: #64748b !important;
  font-style: italic !important;
  margin: 4px 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.mateshwari-ecom-scope .pop-addr-city-pin {
  font-size: 13px !important;
  color: #0f172a !important;
  margin-top: 8px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Ordered Items List Inside Modal */
.mateshwari-ecom-scope .modal-items-scroll-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  max-height: 250px !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
  scrollbar-width: thin !important;
  scrollbar-color: #cbd5e1 transparent !important;
}

.mateshwari-ecom-scope .modal-items-scroll-list::-webkit-scrollbar {
  width: 5px;
}
.mateshwari-ecom-scope .modal-items-scroll-list::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.mateshwari-ecom-scope .modal-product-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  transition: background 0.15s ease !important;
}

.mateshwari-ecom-scope .modal-product-row:hover {
  background: #f1f5f9 !important;
}

.mateshwari-ecom-scope .modal-item-thumb {
  width: 50px !important;
  height: 50px !important;
  border-radius: 6px !important;
  object-fit: contain !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  padding: 2px !important;
  flex-shrink: 0 !important;
}

.mateshwari-ecom-scope .modal-item-details {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.mateshwari-ecom-scope .modal-item-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  margin: 0 0 3px 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.mateshwari-ecom-scope .modal-item-meta {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 11.5px !important;
  color: #64748b !important;
  margin-bottom: 3px !important;
}

.mateshwari-ecom-scope .modal-variant-tag {
  background: #e2e8f0 !important;
  color: #334155 !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  font-size: 11px !important;
}

.mateshwari-ecom-scope .modal-qty-text {
  font-size: 11.5px !important;
  color: #475569 !important;
}

.mateshwari-ecom-scope .modal-pack-pill {
  font-size: 11px !important;
  color: #008f82 !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.mateshwari-ecom-scope .modal-item-price-col {
  text-align: right !important;
  flex-shrink: 0 !important;
}

.mateshwari-ecom-scope .modal-item-price {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.mateshwari-ecom-scope .modal-item-rate {
  font-size: 10.5px !important;
  color: #64748b !important;
}

/* Packaging Stats in Modal */
.mateshwari-ecom-scope .modal-pack-stats {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.mateshwari-ecom-scope .pack-stat-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 12.5px !important;
  color: #334155 !important;
}

.mateshwari-ecom-scope .pack-stat-row .stat-label {
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12px !important;
}

.mateshwari-ecom-scope .pack-stat-row .stat-val {
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* Payment & Delivery in Modal */
.mateshwari-ecom-scope .pop-payment-pill {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  margin-bottom: 8px !important;
}

.mateshwari-ecom-scope .pop-payment-pill.online {
  background: #f0fdfa !important;
  border: 1px solid #99f6e4 !important;
  color: #0f766e !important;
}

.mateshwari-ecom-scope .pop-payment-pill.cod {
  background: #fefce8 !important;
  border: 1px solid #fef08a !important;
  color: #854d0e !important;
}

.mateshwari-ecom-scope .pop-payment-pill i {
  font-size: 16px !important;
}

.mateshwari-ecom-scope .pop-payment-pill strong {
  display: block !important;
  font-size: 13px !important;
  color: #0f172a !important;
}

.mateshwari-ecom-scope .pop-payment-pill .desc {
  font-size: 11px !important;
  color: #64748b !important;
}

.mateshwari-ecom-scope .modal-delivery-eta {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-weight: 500 !important;
}

/* Bill Details in Modal */
.mateshwari-ecom-scope .modal-bill-rows {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.mateshwari-ecom-scope .bill-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 13px !important;
  color: #475569 !important;
}

.mateshwari-ecom-scope .bill-row .val {
  font-weight: 600 !important;
  color: #1e293b !important;
}

.mateshwari-ecom-scope .bill-row .val.text-muted {
  color: #64748b !important;
  font-weight: 500 !important;
}

.mateshwari-ecom-scope .bill-row.total-bill-row {
  border-top: 1.5px dashed #cbd5e1 !important;
  padding-top: 10px !important;
  margin-top: 4px !important;
}

.mateshwari-ecom-scope .bill-row.total-bill-row .total-label {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.mateshwari-ecom-scope .bill-row.total-bill-row .total-val {
  font-size: 19px !important;
  font-weight: 800 !important;
  color: #008f82 !important;
}

/* Modal Footer */
.mateshwari-ecom-scope .modal-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 14px 24px !important;
  border-top: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  flex-shrink: 0 !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

.mateshwari-ecom-scope .modal-footer-trust {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  font-size: 12px !important;
  color: #64748b !important;
  font-weight: 500 !important;
}

.mateshwari-ecom-scope .modal-footer-trust i {
  color: #008f82 !important;
  font-size: 14px !important;
}

.mateshwari-ecom-scope .modal-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
}

.mateshwari-ecom-scope .btn-secondary {
  height: 44px !important;
  padding: 0 18px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  cursor: pointer !important;
  color: #334155 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
}

.mateshwari-ecom-scope .btn-secondary:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

.mateshwari-ecom-scope .btn-primary {
  height: 44px !important;
  padding: 0 24px !important;
  border: none !important;
  background: #ff8f00 !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(255, 143, 0, 0.25) !important;
  font-family: inherit !important;
}

.mateshwari-ecom-scope .btn-primary:hover {
  background: #e07d00 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(255, 143, 0, 0.35) !important;
}

.mateshwari-ecom-scope .btn-primary:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ==================== MODAL RESPONSIVE BREAKPOINTS ==================== */
@media (max-width: 820px) {
  .mateshwari-ecom-scope .modal-card {
    max-width: 600px !important;
  }
  .mateshwari-ecom-scope .modal-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

@media (max-width: 640px) {
  .mateshwari-ecom-scope .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important; /* Bottom-sheet style on mobile */
  }
  .mateshwari-ecom-scope .modal-card {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 92vh !important;
    margin: 0 !important;
    animation: modalSlideUpMobile 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  @keyframes modalSlideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .mateshwari-ecom-scope .modal-header {
    padding: 14px 16px !important;
  }
  .mateshwari-ecom-scope .modal-header h3 {
    font-size: 16px !important;
  }
  .mateshwari-ecom-scope .modal-subtitle {
    display: none !important;
  }
  .mateshwari-ecom-scope .modal-body-scroll {
    padding: 14px 16px !important;
  }
  .mateshwari-ecom-scope .modal-footer {
    padding: 12px 16px !important;
    flex-direction: column-reverse !important;
    gap: 10px !important;
  }
  .mateshwari-ecom-scope .modal-footer-trust {
    justify-content: center !important;
    width: 100% !important;
    font-size: 11px !important;
  }
  .mateshwari-ecom-scope .modal-actions {
    width: 100% !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }
  .mateshwari-ecom-scope .btn-secondary,
  .mateshwari-ecom-scope .btn-primary {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Responsive Rules */
@media (max-width: 900px) {
  .mateshwari-ecom-scope .checkout-layout-wrapper {
    grid-template-columns: 1fr;
    padding: 0 10px;
    margin: 15px auto;
  }
  .mateshwari-ecom-scope .summary-column {
    position: relative;
    top: 0;
  }
}

@media (max-width: 600px) {
  .mateshwari-ecom-scope .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .mateshwari-ecom-scope .form-group.full-width {
    grid-column: span 1;
  }
}

/* ==================== PACKAGING BREAKDOWN & AUTO-ADDRESS STYLES ==================== */
.mateshwari-ecom-scope .address-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.mateshwari-ecom-scope .btn-detect-loc {
  background: #f0fdfa;
  color: #008f82;
  border: 1.5px solid #008f82;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.mateshwari-ecom-scope .btn-detect-loc:hover {
  background: #008f82;
  color: #ffffff;
}

.mateshwari-ecom-scope .btn-detect-loc:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mateshwari-ecom-scope .pin-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mateshwari-ecom-scope .pin-input-wrap .form-control {
  padding-right: 36px;
}

.mateshwari-ecom-scope .pin-input-icon {
  position: absolute;
  right: 12px;
  font-size: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.mateshwari-ecom-scope .pin-status-msg {
  font-size: 12px;
  margin-top: 6px;
  border-radius: 6px;
  padding: 6px 10px;
  line-height: 1.4;
  display: none;
}

.mateshwari-ecom-scope .pin-status-msg.success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  display: block;
}

.mateshwari-ecom-scope .pin-status-msg.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  display: block;
}

.mateshwari-ecom-scope .pin-status-msg.loading {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
  display: block;
}

/* Packaging Overview Card */
.mateshwari-ecom-scope .packaging-overview-card {
  background: linear-gradient(135deg, #f0fdfa 0%, #e6f4f1 100%);
  border: 1.5px solid rgba(0, 143, 130, 0.25);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .mateshwari-ecom-scope .packaging-overview-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.mateshwari-ecom-scope .pack-meta-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mateshwari-ecom-scope .pack-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #0f766e;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mateshwari-ecom-scope .pack-meta-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #042f2e;
}

/* Item Badges */
.mateshwari-ecom-scope .badge-full-pack {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mateshwari-ecom-scope .badge-loose-pack {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mateshwari-ecom-scope .badge-capacity {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.mateshwari-ecom-scope .payment-option-label.disabled {
  opacity: 0.55;
  pointer-events: none;
  background: #f8fafc;
  cursor: not-allowed;
  border-style: dashed;
}

/* ==================== COMPACT SAVED ADDRESS CARD STYLES ==================== */
.mateshwari-ecom-scope .address-compact-box {
  background: #ffffff;
  border: 1.5px solid #008f82;
  border-left: 5px solid #008f82;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(0, 143, 130, 0.08);
  transition: all 0.25s ease;
}

.mateshwari-ecom-scope .address-compact-box:hover {
  box-shadow: 0 4px 14px rgba(0, 143, 130, 0.12);
}

.mateshwari-ecom-scope .compact-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e2e8f0;
}

.mateshwari-ecom-scope .badge-deliver-to {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.mateshwari-ecom-scope .btn-change-address {
  background: #f0fdfa;
  color: #008f82;
  border: 1.5px solid #008f82;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.mateshwari-ecom-scope .btn-change-address:hover {
  background: #008f82;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 143, 130, 0.25);
  transform: translateY(-1px);
}

.mateshwari-ecom-scope .compact-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mateshwari-ecom-scope .compact-person-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mateshwari-ecom-scope .compact-person-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.mateshwari-ecom-scope .compact-phone-pill,
.mateshwari-ecom-scope .compact-email-pill {
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e2e8f0;
}

.mateshwari-ecom-scope .compact-address-lines {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.55;
  margin: 4px 0 0 0;
  word-break: break-word;
}

.mateshwari-ecom-scope .compact-locality {
  font-size: 13px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-weight: 500;
}

.mateshwari-ecom-scope .compact-locality strong {
  color: #008f82;
  font-weight: 700;
}

/* Address Form Save / Cancel Action Buttons */
.mateshwari-ecom-scope .form-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.mateshwari-ecom-scope .btn-save-address {
  background: #008f82;
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.mateshwari-ecom-scope .btn-save-address:hover {
  background: #05554E;
  box-shadow: 0 4px 12px rgba(0, 143, 130, 0.25);
  transform: translateY(-1px);
}

.mateshwari-ecom-scope .btn-cancel-edit {
  background: #ffffff;
  color: #64748b;
  border: 1.5px solid #cbd5e1;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mateshwari-ecom-scope .btn-cancel-edit:hover {
  border-color: #94a3b8;
  color: #1e293b;
  background: #f8fafc;
}

@media (max-width: 640px) {
  .mateshwari-ecom-scope .compact-header-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .mateshwari-ecom-scope .btn-change-address {
    width: 100%;
    justify-content: center;
  }
  .mateshwari-ecom-scope .form-action-row {
    flex-direction: column;
    width: 100%;
  }
  .mateshwari-ecom-scope .btn-save-address,
  .mateshwari-ecom-scope .btn-cancel-edit {
    width: 100%;
    justify-content: center;
  }
}

