/* ==========================================================================
   KAMAL MEDICAL & GENERAL STORE - COMPONENTS & MODALS (V2 FIXED LAYOUT)
   ========================================================================== */

/* ==========================================================================
   Slide-over Cart Drawer (Zero Overlap, Clean Layout)
   ========================================================================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Hide floating bottom bar when cart is open so it never overlaps */
.cart-overlay.active ~ #floatingBottomCartBar {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(120px) !important;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 460px;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  background-color: var(--bg-card);
  z-index: 10000;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.cart-overlay.active .cart-drawer {
  transform: translateX(0) !important;
}

/* Cart Header */
.cart-header {
  flex-shrink: 0;
  position: relative;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  z-index: 5;
}

.cart-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-header-title h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.cart-count-chip {
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

[data-theme="dark"] .cart-count-chip {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-200);
}

.cart-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-clear-all-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--danger-500);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--danger-50);
  transition: all 0.2s ease;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.cart-clear-all-btn:hover {
  background: var(--danger-500);
  color: #ffffff;
}

.drawer-close-btn {
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

/* Express Delivery ETA Strip */
.cart-eta-banner {
  flex-shrink: 0;
  background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
  border-bottom: 1px solid #bbf7d0;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #065f46;
}

[data-theme="dark"] .cart-eta-banner {
  background: rgba(16, 185, 129, 0.12);
  border-bottom-color: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.eta-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: etaPulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes etaPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Free Shipping Progress Bar */
.free-shipping-tracker {
  flex-shrink: 0;
  position: relative;
  padding: 10px 20px;
  background: var(--secondary-50);
  border-bottom: 1px solid var(--border-light);
}

[data-theme="dark"] .free-shipping-tracker {
  background: rgba(14, 165, 233, 0.1);
}

.shipping-status-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary-700);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="dark"] .shipping-status-text {
  color: var(--secondary-500);
}

.shipping-progress-bar {
  height: 6px;
  width: 100%;
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.shipping-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary-500), var(--primary-500));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Rx Warning Banner inside Cart */
.cart-rx-alert-box {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

[data-theme="dark"] .cart-rx-alert-box {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

.btn-cart-rx-action {
  background: #d97706;
  color: #ffffff;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.btn-cart-rx-action:hover {
  opacity: 0.9;
}

/* Cart Scrollable Items Container (min-height: 0 prevents flex overflow) */
.cart-items-container {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.cart-item-row {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
}

.cart-item-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
  color: var(--text-main);
  line-height: 1.3;
}

.cart-item-pack {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.cart-qty-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
}

.cart-qty-ctrl button {
  padding: 2px 8px;
  color: var(--text-main);
  background: var(--bg-subtle);
  font-weight: 800;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.cart-qty-ctrl button:hover {
  background: var(--border-medium);
}

.cart-qty-ctrl span {
  padding: 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.cart-item-delete-btn {
  color: var(--text-subtle);
  padding: 4px;
  transition: color 0.2s;
}

.cart-item-delete-btn:hover {
  color: var(--danger-500);
}

/* Frequently Bought Together / Quick Add Section */
.cart-recommendations-box {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-light);
}

.cart-recommendations-box h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.cart-recommendations-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.rec-item-card {
  min-width: 130px;
  max-width: 130px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  transition: transform 0.2s, border-color 0.2s;
}

.rec-item-card:hover {
  border-color: var(--primary-500);
}

.rec-item-img {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.rec-item-img img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.rec-item-title {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
}

.rec-item-price {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary-600);
  margin-bottom: 4px;
}

.btn-rec-quick-add {
  background: var(--bg-card);
  border: 1px solid var(--primary-500);
  color: var(--primary-700);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  text-align: center;
}

.btn-rec-quick-add:hover {
  background: var(--primary-600);
  color: #ffffff;
}

/* Delivery Instruction Preference Badges */
.delivery-preferences-box {
  margin-top: 10px;
  padding: 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.delivery-preferences-box h5 {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.pref-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pref-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-main);
}

.pref-chip:hover {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

.pref-chip.active {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: #ffffff;
}

/* Available Coupons Tap-to-Apply Strip */
.available-coupons-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.available-coupons-strip::-webkit-scrollbar {
  display: none;
}

.coupon-pill-card {
  background: #f0fdf4;
  border: 1px dashed #86efac;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

[data-theme="dark"] .coupon-pill-card {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.coupon-pill-card:hover {
  background: #dcfce7;
  border-color: var(--primary-600);
}

.coupon-pill-card span.code {
  font-weight: 800;
  color: var(--primary-700);
}

[data-theme="dark"] .coupon-pill-card span.code {
  color: #6ee7b7;
}

.coupon-pill-card span.action {
  font-weight: 700;
  color: var(--primary-600);
  text-decoration: underline;
}

/* Empty Cart State */
.cart-empty-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  text-align: center;
  height: 100%;
}

.cart-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  margin-bottom: 14px;
}

.cart-empty-icon svg {
  width: 32px;
  height: 32px;
}

.cart-empty-view h4 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.cart-empty-view p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Cart Footer (Strictly pinned at bottom, never overlaps) */
.cart-footer {
  flex-shrink: 0;
  position: relative;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-card);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 5;
}

.coupon-section {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.coupon-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 3px 10px;
  background: var(--bg-subtle);
}

.coupon-input-wrap input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.btn-apply-coupon {
  background: var(--text-main);
  color: var(--bg-card);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: opacity 0.2s;
}

.btn-apply-coupon:hover {
  opacity: 0.9;
}

.applied-coupon-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}

[data-theme="dark"] .applied-coupon-tag {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-200);
}

.price-summary-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 0.82rem;
}

.price-summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.price-summary-row.discount-row {
  color: var(--primary-600);
  font-weight: 600;
}

.price-summary-row.total-row {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  border-top: 1px dashed var(--border-light);
  padding-top: 6px;
  margin-top: 2px;
}

.btn-checkout-proceed {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: #ffffff;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  transition: all 0.2s ease;
}

.btn-checkout-proceed:hover {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.4);
}

/* ==========================================================================
   Floating Bottom Sticky Cart Bar (Mobile & Desktop)
   ========================================================================== */
/* Styles moved to style.css to prevent fluctuation */
}

.floating-bar-amount {
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.2;
}

.floating-bar-note {
  font-size: 0.7rem;
  color: #94a3b8;
}

.btn-floating-view-cart {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-floating-view-cart:hover {
  background: var(--primary-50);
  transform: translateY(-1px);
}

/* ==========================================================================
   Modals & Lightboxes
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-card.large {
  max-width: 820px;
}

.modal-card.small {
  max-width: 440px;
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-subtle);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* ==========================================================================
   Prescription Upload Modal Styles
   ========================================================================== */
.rx-upload-dropzone {
  border: 2px dashed var(--primary-500);
  background: var(--primary-50);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

[data-theme="dark"] .rx-upload-dropzone {
  background: rgba(16, 185, 129, 0.08);
}

.rx-upload-dropzone:hover {
  background: var(--primary-100);
}

[data-theme="dark"] .rx-upload-dropzone:hover {
  background: rgba(16, 185, 129, 0.15);
}

.rx-dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .rx-dropzone-icon {
  background: var(--bg-card);
}

.rx-preview-container {
  display: none;
  position: relative;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  max-height: 240px;
  background: var(--bg-subtle);
}

.rx-preview-container img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.rx-preview-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-main);
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  outline: none;
  font-size: 0.88rem;
  transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ==========================================================================
   Checkout Flow & Payment Modal
   ========================================================================== */
.checkout-steps-nav {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.checkout-step-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkout-step-tab.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
  background: var(--bg-card);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border-medium);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.checkout-step-tab.active .step-num {
  background: var(--primary-600);
}

.payment-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.payment-option-card {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
}

.payment-option-card:hover {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

[data-theme="dark"] .payment-option-card:hover {
  background: rgba(16, 185, 129, 0.1);
}

.payment-option-card.selected {
  border-color: var(--primary-600);
  background: var(--primary-50);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.3);
}

[data-theme="dark"] .payment-option-card.selected {
  background: rgba(16, 185, 129, 0.15);
}

.payment-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

.payment-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* UPI QR Code Container */
.upi-qr-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-top: 14px;
  border: 1px solid var(--border-light);
}

.upi-qr-img {
  width: 170px;
  height: 170px;
  margin: 0 auto 12px;
  background: #ffffff;
  padding: 8px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.upi-apps-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   Printable Invoice / Order Receipt Modal
   ========================================================================== */
.invoice-container {
  background: #ffffff;
  color: #0f172a;
  padding: 32px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.invoice-store-info h2 {
  color: #059669;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.invoice-store-info p {
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.4;
}

.invoice-meta-right {
  text-align: right;
}

.invoice-meta-right h3 {
  font-size: 1.3rem;
  color: #0f172a;
  margin-bottom: 4px;
}

.invoice-meta-right p {
  font-size: 0.82rem;
  color: #64748b;
}

.invoice-customer-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  padding: 14px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
}

.invoice-customer-info h4 {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.invoice-table th {
  background: #f1f5f9;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid #cbd5e1;
}

.invoice-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.88rem;
}

.invoice-total-summary {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.invoice-total-table {
  width: 260px;
}

.invoice-total-table tr td {
  padding: 6px 10px;
}

.invoice-total-table tr.grand-total td {
  font-weight: 800;
  font-size: 1.1rem;
  border-top: 2px solid #0f172a;
  color: #059669;
}

.invoice-footer-note {
  text-align: center;
  font-size: 0.78rem;
  color: #64748b;
  border-top: 1px dashed #cbd5e1;
  padding-top: 16px;
}

/* ==========================================================================
   Health Tools Modals (BMI & Medicine Reminder)
   ========================================================================== */
.bmi-result-card {
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  display: none;
}

.bmi-result-card.normal {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.bmi-result-card.underweight {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.bmi-result-card.overweight {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.bmi-result-card.obese {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.bmi-number {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.reminder-list-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.reminder-item-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reminder-item-card h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.reminder-item-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Admin Store Owner Panel
   ========================================================================== */
.admin-tab-bar {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.admin-tab-btn {
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}

.admin-tab-btn.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.admin-stat-card {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-light);
}

.admin-stat-card span.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.admin-stat-card span.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

.admin-orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-order-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.3s, opacity 0.3s;
}

.toast-item.toast-success {
  border-left: 4px solid var(--success-500);
}

.toast-item.toast-error {
  border-left: 4px solid var(--danger-500);
}

.toast-item.toast-info {
  border-left: 4px solid var(--secondary-500);
}

.toast-icon {
  flex-shrink: 0;
}

.toast-item.toast-success .toast-icon {
  color: var(--success-500);
}

.toast-item.toast-error .toast-icon {
  color: var(--danger-500);
}

.toast-item.toast-info .toast-icon {
  color: var(--secondary-500);
}

.toast-content {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Print Styles for Invoices
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  #invoiceModal, #invoiceModal * {
    visibility: visible;
  }
  #invoiceModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }
  .modal-card {
    box-shadow: none;
    border: none;
    max-width: 100%;
  }
  .modal-header, .modal-footer {
    display: none;
  }
  .invoice-container {
    padding: 0;
  }
}

/* Mobile cart bar must override the desktop transform declared above. */
@media (max-width: 768px) {
  .cart-drawer {
    inset: 0;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .floating-bottom-cart-bar {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 10px 14px;
    border-radius: 14px;
    transform: translateY(100px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .floating-bottom-cart-bar.visible {
    transform: translateY(0);
  }

  .floating-bar-left,
  .floating-bar-details {
    min-width: 0;
  }

  .floating-bar-left {
    gap: 8px;
  }

  .floating-bar-note {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .btn-floating-view-cart {
    min-height: 36px;
    padding: 7px 12px;
    white-space: nowrap;
  }
}

/* Quick View Modal Styles */
.qv-layout-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}
.qv-image-section {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  border: 1px solid rgba(0,0,0,0.04);
}
.qv-product-img {
  max-height: 280px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
}
.qv-details-section {
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .qv-layout-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .qv-image-section {
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    min-height: 200px;
  }
  .qv-product-img {
    max-height: 240px;
  }
}

/* ==========================================================================
   Wishlist / Save for Later
   ========================================================================== */

/* Wishlist Heart Button on Product Cards */
.wishlist-heart-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #94a3b8;
}

.wishlist-heart-btn svg {
  width: 18px;
  height: 18px;
}

.wishlist-heart-btn:hover {
  transform: scale(1.1);
  background: #fff;
}

.wishlist-heart-btn.active {
  color: #ef4444;
  background: #fff;
}

.wishlist-heart-btn.active:hover {
  color: #dc2626;
}

[data-theme="dark"] .wishlist-heart-btn {
  background: rgba(30, 41, 59, 0.9);
  color: #64748b;
}

[data-theme="dark"] .wishlist-heart-btn.active {
  color: #ef4444;
  background: rgba(30, 41, 59, 0.95);
}

/* Wishlist Header Button */
.wishlist-button {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.wishlist-button:hover {
  color: #ef4444;
}

.wishlist-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Wishlist Modal Items */
.wishlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  transition: box-shadow 0.2s;
}

.wishlist-item:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.wishlist-item-img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-subtle);
  cursor: pointer;
}

.wishlist-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wishlist-item-details {
  flex: 1;
  min-width: 0;
}

.wishlist-item-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wishlist-item-title:hover {
  color: var(--primary-600);
}

.wishlist-item-salt {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.wishlist-item-price {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.wishlist-current-price {
  font-weight: 800;
  color: var(--primary-600);
  font-size: 0.95rem;
}

.wishlist-mrp-price {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.wishlist-discount-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.wishlist-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.wishlist-btn-move-cart {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary-600);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.wishlist-btn-move-cart:hover:not(:disabled) {
  background: var(--primary-700);
}

.wishlist-btn-move-cart:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.wishlist-btn-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  font-size: 0.75rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.wishlist-btn-remove:hover {
  background: rgba(239, 68, 68, 0.15);
}

@media (max-width: 480px) {
  .wishlist-item {
    flex-wrap: wrap;
  }
  .wishlist-item-actions {
    flex-direction: row;
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   Low Stock Badge
   ========================================================================== */
.badge-low-stock {
  position: absolute;
  bottom: 60px;
  left: 12px;
  z-index: 10;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
  pointer-events: none;
}

/* ==========================================================================
   Delivery Slot Selector
   ========================================================================== */
.delivery-slots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.delivery-slot-card {
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-card);
  text-align: center;
}

.delivery-slot-card:hover {
  border-color: var(--primary-400);
  background: var(--primary-50);
}

.delivery-slot-card.selected {
  border-color: var(--primary-600);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.delivery-slot-card.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  border-color: var(--border-light);
}

.delivery-slot-card .slot-hint {
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 3px 6px;
  border-radius: 6px;
  display: inline-block;
}

.slot-icon {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.slot-time {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.slot-window {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.slot-price {
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 4px;
}

.slot-price.free { color: var(--success-500); }
.slot-price.paid { color: var(--accent-orange); }

/* Admin low stock alert panel */
.low-stock-alert-panel {
  background: linear-gradient(135deg, #fef2f2, #fff1f2);
  border: 2px solid #fecaca;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.low-stock-alert-panel h4 {
  color: #dc2626;
  font-size: 0.95rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.low-stock-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid #fecaca;
  font-size: 0.82rem;
}

.low-stock-item .stock-qty {
  font-weight: 800;
  color: #dc2626;
}

.out-of-stock-item .stock-qty {
  color: #991b1b;
  background: #fef2f2;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ==========================================================================
   Smart Reorder Suggestions
   ========================================================================== */
.smart-reorder-section {
  padding: 20px 0 10px;
}

.smart-reorder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.smart-reorder-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.smart-reorder-icon {
  font-size: 2rem;
}

.smart-reorder-title h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.smart-reorder-title p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.smart-reorder-add-all {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 2px solid var(--primary-600);
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.smart-reorder-add-all:hover {
  background: var(--primary-600);
  color: #fff;
}

.smart-reorder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.sr-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.sr-card:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-md);
}

.sr-card-in-cart {
  border-color: var(--success-300);
  background: rgba(16, 185, 129, 0.03);
}

.sr-card-top {
  position: relative;
  margin-bottom: 8px;
}

.sr-card-img {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  overflow: hidden;
}

.sr-card-img img {
  max-width: 70%;
  max-height: 85%;
  object-fit: contain;
}

.sr-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.sr-badge-urgent {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.sr-badge-soon {
  background: rgba(245, 158, 11, 0.9);
  color: #fff;
}

.sr-badge-info {
  background: rgba(56, 189, 248, 0.15);
  color: #0284c7;
}

.sr-card-body {
  flex: 1;
}

.sr-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.sr-card-title:hover {
  color: var(--primary-600);
}

.sr-card-salt {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sr-card-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.sr-card-price {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary-600);
}

.sr-card-mrp {
  font-size: 0.7rem;
  color: var(--text-subtle);
  text-decoration: line-through;
}

.sr-card-cycle {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.sr-card-reason {
  font-size: 0.7rem;
  color: var(--accent-orange);
  font-weight: 700;
}

.sr-card-footer {
  margin-top: 8px;
}

.sr-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sr-btn-add {
  background: var(--primary-600);
  color: #fff;
}

.sr-btn-add:hover {
  background: var(--primary-700);
}

.sr-btn-in-cart {
  background: var(--success-50);
  color: var(--success-700);
  cursor: default;
}

/* ==========================================================================
   Profile Dashboard
   ========================================================================== */
.profile-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Login View */
.profile-login-view {
  text-align: center;
  padding: 20px 0 10px;
}

.profile-login-hero {
  margin-bottom: 28px;
}

.profile-login-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.25);
}

.profile-login-avatar svg {
  width: 40px;
  height: 40px;
  stroke: #fff;
}

.profile-login-hero h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.profile-login-hero p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

.profile-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 360px;
  margin: 0 auto;
}

.profile-login-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* OTP Login */
.otp-phone-row {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.otp-phone-row:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.otp-country-code {
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  background: var(--bg-subtle);
  border-right: 1.5px solid var(--border-light);
  user-select: none;
}

.otp-phone-row input {
  flex: 1;
  border: none !important;
  padding: 12px;
  font-size: 1rem;
  letter-spacing: 1px;
  background: transparent;
}

.otp-phone-row input:focus {
  outline: none;
  box-shadow: none !important;
}

.otp-verify-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.otp-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s;
}

.otp-back-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--primary-300);
}

.otp-verify-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text-main);
}

.otp-verify-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.otp-input-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 8px 0 4px;
}

.otp-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-main);
  caret-color: var(--primary-500);
  transition: all 0.2s;
  -webkit-appearance: none;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.otp-digit.filled {
  border-color: var(--primary-400);
  background: var(--primary-50);
}

.otp-resend-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.otp-timer {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.otp-resend-btn {
  background: none;
  border: none;
  color: var(--primary-600);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}

.otp-resend-btn:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

.otp-debug-box {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #fef9c3, #fef3c7);
  border: 1.5px solid #fbbf24;
  border-radius: 12px;
  text-align: center;
  font-size: 0.88rem;
  color: #92400e;
}

/* Profile Header */
.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-50), #ecfdf5, #f0fdf4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--primary-100);
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.08), transparent 70%);
  border-radius: 50%;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-info h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 2px;
}

.profile-phone {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.profile-email {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-edit-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--primary-300);
  background: #fff;
  color: var(--primary-600);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.profile-edit-btn:hover {
  background: var(--primary-50);
}

/* Edit Form */
.profile-edit-form {
  padding: 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
}

.profile-form-group input,
.profile-form-group select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.88rem;
}

.profile-form-group input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.profile-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* Stats Row */
.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.profile-stat-card {
  text-align: center;
  padding: 16px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

.profile-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.profile-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-600);
  margin-bottom: 4px;
}

.profile-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Quick Actions */
.profile-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.profile-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
}

.profile-action-btn:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.1);
}

.profile-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.profile-action-btn span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Section Cards */
.profile-section-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.profile-section-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-address-text {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: 8px;
  border-left: 3px solid var(--primary-400);
}

/* Order Cards */
.profile-orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
}

.profile-orders-list::-webkit-scrollbar { width: 4px; }
.profile-orders-list::-webkit-scrollbar-track { background: transparent; }
.profile-orders-list::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

.profile-order-card {
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  transition: border-color 0.2s;
}

.profile-order-card:hover {
  border-color: var(--primary-200);
}

.profile-order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.profile-order-id {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--primary-600);
}

.profile-order-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-order-amount {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-main);
}

.profile-order-items {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.profile-order-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-order-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.profile-order-slot {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 4px;
}

.profile-order-actions {
  margin-left: auto;
}

.profile-order-btn {
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s;
}

.profile-track-btn {
  background: #0ea5e9;
  color: #fff;
}

.profile-track-btn:hover {
  background: #0284c7;
}

.profile-reorder-btn {
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-200);
}

.profile-reorder-btn:hover {
  background: var(--primary-100);
}

/* Buttons */
.profile-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.profile-btn-secondary {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.profile-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: 1.5px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.05);
  color: #ef4444;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 18px;
}

.profile-logout-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.6);
  transform: translateY(-1px);
}

/* ==========================================================================
   Modern "My Account" UI Enhancements (Blinkit / 1mg Inspired)
   ========================================================================== */

/* Profile Modal Shell */
.profile-modal-card {
  max-width: 780px !important;
  width: 95% !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  border: 1px solid var(--border-light, #e2e8f0);
  background: var(--bg-card, #ffffff);
}

.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--bg-card, #ffffff);
  border-bottom: 1px solid var(--border-light, #f1f5f9);
}

.profile-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-modal-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-50, #ecfdf5), var(--primary-100, #d1fae5));
  color: var(--primary-600, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}

.profile-modal-logo-icon svg {
  width: 22px;
  height: 22px;
}

.profile-modal-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
  display: block;
  font-weight: 500;
  margin-top: 1px;
}

.profile-modal-body {
  padding: 20px 24px 28px !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
}

/* Hero Profile Card */
.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
  border-radius: 16px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.35);
  margin-bottom: 20px;
}

.profile-hero-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.profile-hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 2.5px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.profile-hero-details {
  flex: 1;
  min-width: 0;
}

.profile-hero-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-hero-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
}

.profile-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.profile-hero-phone {
  font-size: 0.85rem;
  opacity: 0.92;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-hero-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.profile-hero-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(6px);
}

.profile-hero-edit-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

/* Stat Grid Inside Account */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.profile-stat-box {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.profile-stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  border-color: var(--primary-300, #6ee7b7);
}

.profile-stat-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-600, #059669);
  line-height: 1.2;
}

.profile-stat-desc {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Navigation Tabs Bar */
.profile-tabs-nav {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 14px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.profile-tabs-nav::-webkit-scrollbar {
  display: none;
}

.profile-tab-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted, #64748b);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-tab-pill:hover {
  color: var(--text-main, #0f172a);
  background: rgba(0, 0, 0, 0.03);
}

.profile-tab-pill.active {
  background: #ffffff;
  color: var(--primary-700, #047857);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .profile-tab-pill.active {
  background: #1e293b;
  color: #34d399;
}

.profile-pill-badge {
  background: var(--primary-100, #d1fae5);
  color: var(--primary-800, #065f46);
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 800;
}

/* Tab Panels */
.profile-tab-panel {
  display: none;
  animation: fadeInProfileTab 0.25s ease;
}

.profile-tab-panel.active {
  display: block;
}

@keyframes fadeInProfileTab {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Orders List & Cards */
.profile-order-card-enhanced {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.profile-order-card-enhanced:hover {
  border-color: var(--primary-300, #6ee7b7);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
}

.profile-order-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-order-id-badge {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-700, #047857);
}

.profile-order-time-badge {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  margin-left: 6px;
}

.profile-order-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.profile-order-status-chip.delivered {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.profile-order-status-chip.active-live {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
}

.profile-order-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.profile-order-items-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.profile-order-item-pill {
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--text-main, #1e293b);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-order-item-qty {
  color: var(--primary-600, #059669);
  font-weight: 800;
}

.profile-order-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light, #f1f5f9);
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-order-price-box {
  display: flex;
  flex-direction: column;
}

.profile-order-price-label {
  font-size: 0.7rem;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  font-weight: 700;
}

.profile-order-price-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
}

.profile-order-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-action-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.profile-action-pill-btn.primary {
  background: linear-gradient(135deg, var(--primary-500, #10b981), var(--primary-600, #059669));
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.profile-action-pill-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.profile-action-pill-btn.secondary {
  background: var(--bg-card, #ffffff);
  border-color: var(--border-light, #cbd5e1);
  color: var(--text-main, #1e293b);
}

.profile-action-pill-btn.secondary:hover {
  background: var(--bg-subtle, #f8fafc);
  border-color: var(--primary-400, #34d399);
}

.profile-action-pill-btn.danger {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.profile-action-pill-btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Address Card & GPS Button */
.profile-address-box {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.profile-address-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.btn-detect-gps {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-detect-gps:hover {
  background: #dbeafe;
  transform: translateY(-1px);
}

/* Support & Contact Grid */
.profile-support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.profile-support-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border-light, #e2e8f0);
  background: var(--bg-card, #ffffff);
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.profile-support-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.profile-support-card.wa {
  border-color: #86efac;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.profile-support-card.call {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.profile-support-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.profile-support-icon.wa { background: #22c55e; color: #fff; }
.profile-support-icon.call { background: #3b82f6; color: #fff; }

/* Login Perks Box */
.profile-login-perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.profile-login-perk-item {
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
}

.profile-login-perk-item span {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 2px;
}

.profile-login-perk-item p {
  font-size: 0.72rem;
  color: var(--text-main, #334155);
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .profile-modal-card {
    width: 100% !important;
    max-height: 94vh !important;
    border-radius: 20px 20px 0 0 !important;
    margin-top: auto !important;
  }

  .profile-modal-body {
    padding: 14px 16px 24px !important;
  }

  .profile-hero-card {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }

  .profile-hero-name-row {
    justify-content: center;
  }

  .profile-hero-phone {
    justify-content: center;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .profile-tabs-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .profile-support-grid {
    grid-template-columns: 1fr;
  }

  .profile-order-footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-order-btn-group {
    width: 100%;
    justify-content: space-between;
  }
}


/* ===== My Account: full-page Edit Profile view ===== */
@keyframes acctSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.acct-edit-wrap {
  animation: acctSlideIn 0.3s ease both;
}
.acct-edit-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #059669 0%, #047857 60%, #065f46 100%);
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.35);
}
.acct-edit-head h3 { color: #fff; }
.acct-edit-head p { color: rgba(255,255,255,0.85) !important; }
.acct-edit-head .profile-hero-avatar {
  width: 52px;
  height: 52px;
  font-size: 1.15rem;
}
.edit-save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 12px 2px 4px;
  background: linear-gradient(transparent, var(--bg-card, #fff) 30%);
}
.edit-save-bar .profile-btn-primary { flex: 1; }
.edit-save-bar .profile-btn-primary:disabled { opacity: 0.7; cursor: wait; }
.acct-edit-wrap .profile-form-group input {
  padding: 12px 14px;
  font-size: 0.95rem;
}
@media (max-width: 480px) {
  .acct-edit-head { padding: 14px 12px; gap: 12px; }
  .edit-save-bar { flex-direction: column; }
}
