@tailwind base;
@tailwind components;
@tailwind utilities;
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
html[data-app-layout="mobile"][data-ios-shell="true"] {
  --ios-safe-area-top: env(safe-area-inset-top, 0px);
  --ios-safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --ios-viewport-height: var(--app-height, 100dvh);
  --ios-bottom-stack-offset: calc(var(--mobile-bottom-nav-height, 64px) + var(--ios-safe-area-bottom));
}

html[data-app-layout="mobile"][data-ios-shell="true"] {
  min-height: 100%;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
}

html[data-app-layout="mobile"][data-ios-shell="true"] body {
  min-height: 100%;
  min-height: -webkit-fill-available;
  background-color: #ffffff;
}

html[data-app-layout="mobile"][data-ios-shell="true"] body {
  min-height: var(--ios-viewport-height);
  -webkit-tap-highlight-color: transparent;
}

/* ─── Optimized Scrolling ─── */
html[data-app-layout="mobile"][data-ios-shell="true"] .mobile-main,
html[data-app-layout="mobile"][data-ios-shell="true"] #mobile-app-menu,
html[data-app-layout="mobile"][data-ios-shell="true"] .app-mobile-modal__body,
html[data-app-layout="mobile"][data-ios-shell="true"] .overflow-y-auto {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* ─── GPU Accelerated Components (Only where needed) ─── */
html[data-app-layout="mobile"][data-ios-shell="true"] .mobile-app-header,
html[data-app-layout="mobile"][data-ios-shell="true"] .mobile-bottom-nav,
html[data-app-layout="mobile"][data-ios-shell="true"] .mobile-sticky-bottom-bar {
  transform: translateZ(0);
  will-change: transform;
}

html[data-app-layout="mobile"][data-ios-shell="true"] .mobile-bottom-nav,
html[data-app-layout="mobile"][data-ios-shell="true"] .mobile-sticky-bottom-bar {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
}

html[data-app-layout="mobile"][data-ios-shell="true"] .mobile-sticky-bottom-bar {
  bottom: var(--ios-bottom-stack-offset);
}

/* ─── Modal Optimization ─── */
html[data-app-layout="mobile"][data-ios-shell="true"] .app-mobile-modal__body {
  max-height: calc(var(--ios-viewport-height) - var(--ios-safe-area-top) - 104px) !important;
  padding-bottom: calc(24px + var(--ios-safe-area-bottom));
}

/* ─── Keyboard Interactions ─── */
html[data-app-layout="mobile"][data-ios-shell="true"] input,
html[data-app-layout="mobile"][data-ios-shell="true"] textarea {
  scroll-margin-top: calc(var(--mobile-header-height, 60px) + var(--ios-safe-area-top) + 20px);
}

html[data-app-layout="mobile"][data-ios-shell="true"][data-keyboard-open="true"] .mobile-bottom-nav,
html[data-app-layout="mobile"][data-ios-shell="true"][data-keyboard-open="true"] .mobile-sticky-bottom-bar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
}
/* ═══════════════════════════════════════════════════════════
   MisrPrime Native — Design System v3
   Brand: Blue #1D4ED8 | Orange #F97316
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Brand - More vibrant and professional */
  --mp-blue:          #1D4ED8;
  --mp-blue-dark:     #111827;
  --mp-blue-light:    #3B82F6;
  --mp-blue-pale:     #F0F7FF;
  --mp-orange:        #F97316;
  --mp-orange-dark:   #EA580C;
  --mp-orange-pale:   #FFF7ED;

  /* Neutrals - High-end palette */
  --mp-bg:            #F8FAFC;
  --mp-surface:       #FFFFFF;
  --mp-surface-2:     #F1F5F9;
  --mp-surface-3:     #E2E8F0;
  --mp-border:        #E2E8F0;
  --mp-border-light:  #F1F5F9;

  /* Text - Better hierarchy */
  --mp-text:          #0F172A;
  --mp-text-2:        #475569;
  --mp-text-3:        #94A3B8;
  --mp-text-inv:      #FFFFFF;

  /* Radius - Modern rounded corners */
  --mp-r-xs:    10px;
  --mp-r-sm:    14px;
  --mp-r-md:    18px;
  --mp-r-lg:    22px;
  --mp-r-xl:    28px;
  --mp-r-2xl:   36px;
  --mp-r-full:  9999px;

  /* Shadow - Premium elevations */
  --mp-shadow-xs:  0 1px 2px rgba(15,23,42,0.04);
  --mp-shadow-sm:  0 4px 12px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.03);
  --mp-shadow-md:  0 8px 24px rgba(15,23,42,0.08), 0 2px 8px rgba(15,23,42,0.04);
  --mp-shadow-lg:  0 12px 40px rgba(15,23,42,0.12), 0 4px 16px rgba(15,23,42,0.06);
  --mp-shadow-xl:  0 28px 64px rgba(15,23,42,0.16), 0 12px 32px rgba(15,23,42,0.08);
  --mp-shadow-blue: 0 8px 32px rgba(29,78,216,0.22);
  --mp-shadow-ora:  0 8px 32px rgba(249,115,22,0.22);

  /* Transition - Apple-style easings */
  --mp-ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --mp-ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --mp-ease-out:  cubic-bezier(0, 0, 0.2, 1);
  --mp-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Base Reset ─── */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Eliminate 300ms tap delay on Android — must be on all interactive elements */
a, button, label, select,
input[type="submit"], input[type="button"], input[type="reset"],
input[type="checkbox"], input[type="radio"],
[role="button"], [role="tab"], [role="link"] {
  touch-action: manipulation;
}

/* ─── Glassmorphism ─── */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ─── Premium Input Group ─── */
.premium-input-group {
  position: relative;
  margin-bottom: 16px;
  width: 100%;
}

.premium-input {
  width: 100%;
  height: 60px;
  background: var(--mp-surface-2);
  border: 2px solid transparent;
  border-radius: var(--mp-r-sm);
  padding: 24px 20px 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--mp-text);
  transition: all 0.25s var(--mp-ease);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  letter-spacing: -0.01em;
}

.premium-input::placeholder { color: transparent; }

.premium-input:focus {
  background: var(--mp-surface);
  border-color: var(--mp-blue);
  box-shadow: 0 0 0 4px rgba(29,78,216,.08);
}

.premium-label {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mp-text-3);
  pointer-events: none;
  transition: all 0.2s var(--mp-ease);
  transform-origin: left top;
}

.premium-input:focus ~ .premium-label,
.premium-input:not(:placeholder-shown) ~ .premium-label {
  transform: translateY(-12px) scale(0.8);
  color: var(--mp-blue);
  font-weight: 700;
}

/* ─── Floating Buttons ─── */
.btn-premium-primary {
  width: 100%;
  height: 58px;
  background: var(--mp-blue);
  color: #fff;
  border: none;
  border-radius: var(--mp-r-md);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s var(--mp-ease);
  box-shadow: var(--mp-shadow-blue);
  text-transform: uppercase;
  tracking: 0.05em;
}

.btn-premium-primary:active {
  transform: scale(0.96);
  background: var(--mp-blue-dark);
  box-shadow: 0 4px 12px rgba(29,78,216,0.15);
}

.btn-premium-secondary {
  width: 100%;
  height: 58px;
  background: var(--mp-surface);
  color: var(--mp-text);
  border: 2px solid var(--mp-border);
  border-radius: var(--mp-r-md);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s var(--mp-ease);
}

.btn-premium-secondary:active {
  transform: scale(0.96);
  background: var(--mp-surface-2);
}

/* ─── Sticky Footer / Action Bar ─── */
.premium-form-footer,
.sticky-action-bar {
  position: fixed;
  left: 0; right: 0;
  /* Sit physically above the nav bar — no z-index race needed */
  bottom: var(--nav-offset, 65px);
  z-index: 70;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border-top: 1px solid rgba(15,23,42,0.05);
  box-shadow: 0 -10px 30px rgba(15,23,42,0.08);
  padding: 16px 20px;
}

/* On checkout / auth pages the nav is slid off-screen — drop footer to the bottom */
body[data-hide-nav="true"] .premium-form-footer,
body[data-hide-nav="true"] .sticky-action-bar {
  bottom: 0;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 20px));
}

.sticky-action-bar__content {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
}

html[data-keyboard-open="true"] .premium-form-footer,
html[data-keyboard-open="true"] .sticky-action-bar {
  display: none !important;
}

/* ─── Section Typography ─── */
.native-section-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--mp-text);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.native-section-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--mp-text-2);
  margin-bottom: 32px;
  line-height: 1.5;
}

.native-section-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--mp-blue);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.native-page-header { padding: 48px 24px 32px; }
.native-page-title {
  font-size: 34px;
  font-weight: 900;
  color: var(--mp-text);
  letter-spacing: -0.05em;
  line-height: 1;
}

.native-page-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: var(--mp-text-3);
  margin-top: 10px;
  line-height: 1.4;
}

/* ─── Native List Groups ─── */
.native-list-group {
  background: var(--mp-surface);
  border-radius: var(--mp-r-xl);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--mp-shadow-sm);
  border: 1px solid rgba(15,23,42,0.03);
}

.native-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: transparent;
  border-bottom: 1px solid var(--mp-border-light);
  transition: all 0.2s var(--mp-ease);
}

.native-list-item:active { background: var(--mp-surface-2); transform: scale(0.99); }
.native-list-item:last-child { border-bottom: none; }

/* ─── Form Screens ─── */
.native-form-screen {
  min-height: calc(100dvh - var(--header-offset, 0px));
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  padding-bottom: calc(var(--nav-offset, 0px) + 140px);
}

/* ─── Checkbox & Switch ─── */
.premium-checkbox {
  width: 24px; height: 24px;
  border-radius: 8px;
  border: 2px solid var(--mp-border);
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.premium-checkbox:checked {
  background: var(--mp-blue);
  border-color: var(--mp-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
}

.premium-switch { position: relative; display: inline-block; width: 52px; height: 30px; }
.premium-switch input { opacity: 0; width: 0; height: 0; }
.premium-switch-slider {
  position: absolute;
  cursor: pointer; inset: 0;
  background: var(--mp-surface-3);
  transition: background 0.3s var(--mp-ease);
  border-radius: 30px;
}
.premium-switch-slider::before {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  left: 4px; bottom: 4px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15,23,42,0.15);
  transition: transform 0.3s var(--mp-spring);
  will-change: transform;
}
input:checked + .premium-switch-slider { background: var(--mp-blue); }
input:checked + .premium-switch-slider::before { transform: translateX(22px); }

/* ─── Modal Overrides ─── */
.app-mobile-modal { z-index: 500 !important; }
.app-mobile-modal__frame { min-height: 100dvh !important; }
.app-mobile-modal__panel {
  margin: 0;
  width: 100% !important;
  max-width: 100% !important;
  border-radius: var(--mp-r-xl) var(--mp-r-xl) 0 0 !important;
  overflow: hidden;
  position: fixed; bottom: 0; left: 0;
  animation: sheet-up 0.4s var(--mp-ease);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.app-mobile-modal__body {
  max-height: 85dvh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  padding-bottom: calc(var(--nav-offset, 0px) + 32px) !important;
}

/* ─── Animations ─── */
.animate-shake {
  animation: mp-shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes mp-shake {
  10%, 90% { transform: translate3d(-1px,0,0); }
  20%, 80% { transform: translate3d(2px,0,0); }
  30%,50%,70% { transform: translate3d(-3px,0,0); }
  40%, 60% { transform: translate3d(3px,0,0); }
}

/* ─── Skeleton Loader ─── */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.6s ease-in-out infinite;
  border-radius: var(--mp-r-xs);
}

@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Native Toast Notifications ─── */
#mp-toast-container {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.mp-toast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 14px);
  padding-bottom: 16px;
  padding-left: 20px;
  padding-right: 16px;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 10px 40px rgba(15,23,42,0.18), 0 2px 8px rgba(15,23,42,0.08);
  pointer-events: auto;
  animation: mp-toast-in 0.38s cubic-bezier(0.22,1,0.36,1) forwards;
  will-change: transform;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.mp-toast::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--mp-toast-color, #3B82F6);
}

.mp-toast::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 3px;
  background: rgba(255,255,255,0.4);
  animation: mp-toast-progress 4.2s linear forwards;
  transform-origin: left;
}

@keyframes mp-toast-progress {
  from { width: 100%; }
  to   { width: 0%; }
}

.mp-toast__icon-wrap {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--mp-toast-bg, #EFF6FF);
}

.mp-toast__icon {
  width: 22px; height: 22px;
  color: var(--mp-toast-color, #3B82F6);
}

.mp-toast__body { flex: 1; min-width: 0; }

.mp-toast__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 3px;
  color: var(--mp-toast-color, #3B82F6);
  line-height: 1;
}

.mp-toast__msg {
  font-size: 14px;
  font-weight: 500;
  color: #0F172A;
  margin: 0;
  line-height: 1.45;
  word-break: break-word;
}

.mp-toast__close {
  width: 22px; height: 22px;
  opacity: 0.35;
  flex-shrink: 0;
}

.mp-toast.leaving {
  animation: mp-toast-out 0.28s cubic-bezier(0.4,0,1,1) forwards;
}

.mp-toast.swiping { transition: none !important; }

@keyframes mp-toast-in {
  from { transform: translateY(-110%); }
  to   { transform: translateY(0); }
}

@keyframes mp-toast-out {
  to { transform: translateY(-110%); }
}

/* ─── Native Form Validation ─── */
div.field_with_errors { display: contents; }
div.field_with_errors input,
div.field_with_errors select,
div.field_with_errors textarea {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12) !important;
}

.native-field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #EF4444;
  line-height: 1.3;
}

.native-field-error::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='%23EF4444'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0zm-9 3.75h.008v.008H12v-.008z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.native-input-valid {
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1) !important;
}

.native-input-error {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12) !important;
}

/* ─── Premium Spinner ─── */
.premium-spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--mp-surface-2);
  border-top-color: var(--mp-blue);
  border-right-color: var(--mp-orange);
  border-radius: 50%;
  animation: mp-spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes mp-spin { to { transform: rotate(360deg); } }

/* ─── Active Scale Feedback ─── */
.tap-scale { transition: transform 0.2s var(--mp-spring); will-change: transform; }
.tap-scale:active { transform: scale(0.95); }

/* ─── AliExpress Style Sections ─── */
.mp-section-card {
  background: white;
  margin-bottom: 12px;
  padding: 20px;
  border-radius: var(--mp-r-lg);
  box-shadow: var(--mp-shadow-sm);
}


/* ─── Product Card (Native) ─── */
.mp-product-card {
  background: #fff;
  border-radius: var(--mp-r-md);
  overflow: hidden;
  border: 1px solid var(--mp-border-light);
  box-shadow: var(--mp-shadow-xs);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.15s var(--mp-ease-out), box-shadow 0.15s var(--mp-ease-out);
  -webkit-tap-highlight-color: transparent;
}

.mp-product-card:active {
  transform: scale(0.97);
  box-shadow: none;
}

.mp-product-card__img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--mp-surface-2);
  flex-shrink: 0;
}

.mp-product-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--mp-ease-out);
}

.mp-product-card__body {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mp-product-card__vendor {
  font-size: 10px; font-weight: 700;
  color: var(--mp-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-product-card__title {
  font-size: 13px; font-weight: 600;
  color: var(--mp-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  flex: 1;
}

.mp-product-card__price {
  font-size: 15px; font-weight: 800;
  color: var(--mp-blue);
  letter-spacing: -0.02em;
}

.mp-product-card__price-orig {
  font-size: 11px; font-weight: 500;
  color: var(--mp-text-3);
  text-decoration: line-through;
  margin-left: 4px;
}

.mp-product-card__badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--mp-orange);
  color: white;
  font-size: 10px; font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--mp-r-full);
  letter-spacing: 0.02em;
}

.mp-product-card__add {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--mp-blue);
  color: white;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--mp-shadow-blue);
  transition: transform 0.15s var(--mp-spring);
}

.mp-product-card__add:active { transform: scale(0.88); }

/* ─── Bottom Nav ─── */
.mobile-bottom-nav {
  position: fixed;
  inset-x: 0; bottom: 0;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--mp-border-light);
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -1px 16px rgba(0,0,0,.06);
}

.mobile-bottom-nav__inner {
  display: flex;
  align-items: stretch;
  height: 60px;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 4px;
}

.mobile-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--mp-text-3);
  transition: color 0.15s;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  border: none; background: none; cursor: pointer;
  padding: 0;
}

.mobile-bottom-nav__item.is-active { color: var(--mp-blue); }

.mobile-bottom-nav__icon {
  position: relative;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}

.mobile-bottom-nav__dot {
  position: absolute;
  bottom: -4px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--mp-blue);
  opacity: 0;
  transition: opacity 0.15s;
}

.mobile-bottom-nav__item.is-active .mobile-bottom-nav__dot { opacity: 1; }

.mobile-bottom-nav__label {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

/* ─── Filter Drawer ─── */
.mp-filter-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.mp-filter-sheet.is-open { pointer-events: auto; }

.mp-filter-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,23,42,.5);
  opacity: 0;
  transition: opacity 0.3s;
}

.mp-filter-sheet.is-open .mp-filter-backdrop { opacity: 1; }

.mp-filter-panel {
  position: absolute;
  inset-x: 0; bottom: 0;
  background: #fff;
  border-radius: var(--mp-r-2xl) var(--mp-r-2xl) 0 0;
  max-height: 90dvh;
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s var(--mp-ease);
  padding-bottom: env(safe-area-inset-bottom);
}

.mp-filter-sheet.is-open .mp-filter-panel {
  transform: translateY(0);
}

/* ─── Step Indicator ─── */
.mp-step-dot {
  width: 28px; height: 4px;
  border-radius: var(--mp-r-full);
  transition: background 0.2s;
}

.mp-step-dot.active   { background: var(--mp-blue); }
.mp-step-dot.inactive { background: var(--mp-border); }

/* ─── Section header ─── */
.mp-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}

.mp-section-title {
  font-size: 17px; font-weight: 800;
  color: var(--mp-text);
  letter-spacing: -0.02em;
}

.mp-section-link {
  font-size: 12px; font-weight: 700;
  color: var(--mp-blue);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── Category Card ─── */
.mp-category-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.mp-category-pill:active .mp-category-pill__art { transform: scale(0.94); }

.mp-category-pill__art {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--mp-surface-2);
  overflow: hidden;
  border: 2px solid var(--mp-border-light);
  box-shadow: var(--mp-shadow-sm);
  transition: transform 0.15s var(--mp-spring);
}

.mp-category-pill__art img { width: 100%; height: 100%; object-fit: cover; }

.mp-category-pill__label {
  font-size: 10px; font-weight: 700;
  color: var(--mp-text-2);
  text-align: center;
  max-width: 68px;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Scroll Rail ─── */
.mp-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
  overscroll-behavior-x: contain;
}
.mp-rail::-webkit-scrollbar { display: none; }
.mp-rail > * { scroll-snap-align: start; flex-shrink: 0; }

/* ─── Empty State ─── */
.mp-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.mp-empty__icon {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--mp-surface-2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  color: var(--mp-text-3);
}

.mp-empty__title {
  font-size: 20px; font-weight: 800;
  color: var(--mp-text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.mp-empty__text {
  font-size: 14px; font-weight: 500;
  color: var(--mp-text-2);
  line-height: 1.5;
  max-width: 220px;
}

/* ─── GPU Compositing — promote fixed chrome to own layers to avoid repaints ─── */
.mobile-app-header,
.mobile-bottom-nav,
.premium-form-footer,
.sticky-action-bar,
.mp-cart-checkout-bar,
#mp-toast-container,
#native-app-loader {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* ─── Scroll containers — prevent scroll chain leaking to body ─── */
.mp-filter-panel,
.app-mobile-modal__body,
#mobile-app-menu {
  overscroll-behavior: contain;
}

/* ─── Haptic Feedback ─── */
a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }

/* ─── Pull Refresh Hint ─── */
.mp-pull-hint {
  text-align: center;
  padding: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-text-3);
}

/* ─── Page Enter Animation — horizontal slide like native iOS/Android push ─── */
.native-push-enter {
  animation: mp-page-enter 0.28s var(--mp-ease) both;
  will-change: transform, opacity;
}
.native-push-enter[style*="animation"] { will-change: auto; }

@keyframes mp-page-enter {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .native-push-enter { animation: mp-page-fade 0.15s ease both; }
  @keyframes mp-page-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* ─── Scroll Performance ─── */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ─── Turbo Progress Bar ─── */
.turbo-progress-bar {
  height: 3px !important;
  background: linear-gradient(90deg, var(--mp-blue) 0%, var(--mp-orange) 50%, var(--mp-blue) 100%) !important;
  background-size: 200% 100% !important;
  animation: mp-progress-shimmer 1.2s linear infinite !important;
}
@keyframes mp-progress-shimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Navigation Skeleton Overlay ─── */
.mp-nav-skeleton {
  position: fixed;
  inset: 0;
  top: var(--header-offset);
  background: #f8fafc;
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 20px calc(var(--nav-offset) + 28px);
}
.mp-nav-skeleton.visible { opacity: 1; }

/* ─── Pull-to-Refresh ─── */
.mp-ptr {
  position: fixed;
  top: var(--header-offset);
  inset-x: 0;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 46;
  background: #f0f6ff;
  border-bottom: 1px solid rgba(29,78,216,.12);
  transform: translateY(-100%);
  transition: transform 0.3s var(--mp-ease);
  will-change: transform;
}
.mp-ptr.visible { transform: translateY(0); }

.mp-ptr__spinner {
  display: none;
}
.mp-ptr__label {
  display: none;
}

/* ─── Image Shimmer Wrapper ─── */
.img-wrap {
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}
.img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: img-shimmer 1.5s ease-in-out infinite;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.img-wrap.loaded::after { opacity: 0; animation: none; }
.img-wrap img {
  opacity: 1;
  transition: opacity 0.35s ease;
  position: relative;
  z-index: 1;
}
@keyframes img-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Banner Slider ─── */
.banner-dot {
  height: 5px;
  border-radius: 9999px;
  background: rgba(255,255,255,.35);
  transition: all 0.32s var(--mp-ease);
  width: 5px;
  display: inline-block;
}
.banner-dot.active {
  background: #fff;
  width: 22px;
}

/* ─── Gallery Dots ─── */
.gallery-dot {
  width: 5px; height: 5px;
  border-radius: 9999px;
  background: rgba(255,255,255,.4);
  transition: all 0.25s var(--mp-ease);
  display: inline-block;
}
.gallery-dot.active, .gallery-dot:first-child {
  background: #fff;
  width: 14px;
}

/* ─── Content Reveal Animation ─── */
.mp-reveal {
  animation: mp-reveal 0.38s var(--mp-ease) both;
}
@keyframes mp-reveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Staggered Reveal ─── */
.mp-stagger > * { animation: mp-reveal 0.35s var(--mp-ease) both; }
.mp-stagger > *:nth-child(1) { animation-delay: 0ms; }
.mp-stagger > *:nth-child(2) { animation-delay: 50ms; }
.mp-stagger > *:nth-child(3) { animation-delay: 100ms; }
.mp-stagger > *:nth-child(4) { animation-delay: 150ms; }
.mp-stagger > *:nth-child(5) { animation-delay: 200ms; }
.mp-stagger > *:nth-child(6) { animation-delay: 250ms; }

/* ─── Scroll Performance ─── */
.will-scroll {
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ─── Active Scale Feedback ─── */
.tap-scale { transition: transform 0.15s var(--mp-spring); }
.tap-scale:active { transform: scale(0.96); }

/* ─── AliExpress Home ─── */
.ae-home {
  min-height: 100vh;
}

/* Full-bleed banner: no border-radius on top banner */
.ae-home .ae-banner-slide {
  border-radius: 0;
}

/* Compact 3-col product grid gap lines */
.ae-home .grid-cols-3 > a {
  position: relative;
}

/* Countdown timer blocks */
#ae-countdown span[id] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  line-height: 1;
}

/* ─── Wishlist / Heart Button ─── */
.mp-heart-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.14);
  transition: transform 0.15s var(--mp-spring);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mp-heart-btn:active { transform: scale(0.85); }
.mp-heart-btn svg { transition: fill 0.2s, stroke 0.2s; }
.mp-heart-btn.is-active svg { fill: #ef4444; stroke: #ef4444; }
@keyframes mp-heart-pop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.45); }
  60%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}
.mp-heart-btn.popping { animation: mp-heart-pop 0.38s var(--mp-spring); }

/* ─── Rating Stars ─── */
.mp-stars { display: flex; align-items: center; gap: 1px; }
.mp-star  { width: 10px; height: 10px; color: #F97316; }

/* ─── Free Shipping Chip ─── */
.mp-free-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9px; font-weight: 700;
  color: #10B981;
  letter-spacing: 0.01em;
}

/* ─── Add-to-Cart Button (enhanced) ─── */
.mp-atc-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.15s var(--mp-spring), box-shadow 0.15s;
}
.mp-atc-btn:active { transform: scale(0.87) !important; }

@keyframes mp-atc-success {
  0%   { transform: scale(1); background-color: var(--mp-blue); }
  25%  { transform: scale(1.15); background-color: var(--mp-success); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); background-color: var(--mp-blue); }
}
.mp-atc-btn.success { animation: mp-atc-success 0.5s var(--mp-spring); }

/* ─── Product Card v2 Improvements ─── */
.mp-product-card__sold {
  font-size: 9px; font-weight: 600;
  color: var(--mp-text-3);
  margin-top: 3px;
}

.mp-product-card__discount-badge {
  position: absolute;
  top: 8px; left: 8px; z-index: 10;
  background: var(--mp-orange);
  color: white;
  font-size: 9px; font-weight: 900;
  padding: 2px 7px;
  border-radius: var(--mp-r-full);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(249,115,22,0.35);
}

.mp-product-card__new-badge {
  position: absolute;
  top: 8px; left: 8px; z-index: 10;
  background: var(--mp-blue);
  color: white;
  font-size: 9px; font-weight: 900;
  padding: 2px 7px;
  border-radius: var(--mp-r-full);
  box-shadow: 0 2px 6px rgba(29,78,216,0.35);
}

/* ─── Cart Item Improvements ─── */
.mp-cart-item-img {
  width: 88px; height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--mp-surface-2);
  flex-shrink: 0;
}

/* ─── Empty Cart Illustration ─── */
.mp-empty-cart-art {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mp-blue-pale) 0%, var(--mp-orange-pale) 100%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 32px rgba(29,78,216,0.12);
}

/* ─── Bottom Nav Active Indicator ─── */
.mp-nav-active-pill {
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 3px;
  background: var(--mp-blue);
  border-radius: 0 0 3px 3px;
  opacity: 0;
  transition: opacity 0.2s, width 0.2s var(--mp-spring);
}
.is-active .mp-nav-active-pill { opacity: 1; width: 28px; }

/* ─── Search Bar v2 ─── */
.mp-search-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--mp-surface-2);
  border-radius: var(--mp-r-full);
  height: 44px;
  padding: 0 16px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.mp-search-bar:focus-within {
  background: var(--mp-surface);
  border-color: var(--mp-blue);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
}

/* ─── Filter Chip (active state) ─── */
.mp-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: var(--mp-r-full);
  font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--mp-border);
  background: var(--mp-surface);
  color: var(--mp-text-2);
  cursor: pointer;
  transition: all 0.15s var(--mp-ease-out);
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.mp-filter-chip.active {
  background: var(--mp-blue);
  border-color: var(--mp-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(29,78,216,0.25);
}
.mp-filter-chip:active { transform: scale(0.95); }

/* ─── Sort/Filter Active Indicator Badge ─── */
.mp-filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--mp-orange);
  color: white;
  font-size: 9px; font-weight: 900;
  flex-shrink: 0;
}

/* ─── Sticky Quick-Filter Bar ─── */
.mp-quick-filter-bar {
  background: var(--mp-surface);
  border-bottom: 1px solid var(--mp-border-light);
  padding: 10px 0 10px 16px;
  position: sticky;
  top: var(--header-offset);
  z-index: 38;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ─── Product Count Badge ─── */
.mp-count-badge {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 10px;
  background: var(--mp-surface-2);
  border-radius: var(--mp-r-full);
  font-size: 11px; font-weight: 700;
  color: var(--mp-text-2);
}

/* ─── Checkout Step Indicator v2 ─── */
.mp-checkout-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1;
}
.mp-checkout-step__dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--mp-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  color: var(--mp-text-3);
  transition: all 0.25s var(--mp-ease);
}
.mp-checkout-step.done .mp-checkout-step__dot {
  background: var(--mp-success);
  color: white;
}
.mp-checkout-step.current .mp-checkout-step__dot {
  background: var(--mp-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(29,78,216,0.3);
}
.mp-checkout-step__line {
  flex: 1;
  height: 2px;
  background: var(--mp-border);
  margin: 14px 0;
  border-radius: 2px;
  transition: background 0.25s;
}
.mp-checkout-step__line.done { background: var(--mp-success); }

/* ─── Quantity Stepper v2 ─── */
.mp-qty-stepper {
  display: flex; align-items: center;
  border-radius: var(--mp-r-sm);
  border: 1.5px solid var(--mp-border);
  overflow: hidden;
  background: var(--mp-surface);
}
.mp-qty-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 300;
  color: var(--mp-text-2);
  background: var(--mp-surface-2);
  border: none; cursor: pointer;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.mp-qty-btn:active { background: var(--mp-border); }
.mp-qty-val {
  min-width: 36px;
  text-align: center;
  font-size: 14px; font-weight: 700;
  color: var(--mp-text);
  padding: 0 4px;
}

/* ─── Cart Checkout Bar ─── */
.mp-cart-checkout-bar {
  position: fixed;
  inset-x: 0; bottom: 0;
  background: var(--mp-surface);
  border-top: 1px solid var(--mp-border-light);
  z-index: 65;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
}
.mp-cart-checkout-bar__inner {
  display: flex; align-items: center; gap: 16px;
  max-width: 480px; margin: 0 auto;
}

/* ─── Section Divider ─── */
.mp-divider {
  height: 8px;
  background: var(--mp-bg);
  margin: 0;
}

/* ─── Swipe hint for cart items ─── */
.mp-swipe-hint {
  font-size: 10px; font-weight: 600;
  color: var(--mp-text-3);
  text-align: center;
  padding: 6px;
}

/* ─── Coupon Input v2 ─── */
.mp-coupon-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--mp-surface-2);
  border-radius: var(--mp-r-sm);
  padding: 0 16px;
  height: 48px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s;
}
.mp-coupon-wrap:focus-within { border-color: var(--mp-orange); }
.mp-coupon-input {
  flex: 1; border: none; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--mp-text);
  outline: none;
}
.mp-coupon-input::placeholder { color: var(--mp-text-3); font-weight: 500; }
.mp-coupon-apply {
  font-size: 13px; font-weight: 800;
  color: var(--mp-orange);
  background: none; border: none; cursor: pointer;
  padding: 0; letter-spacing: -0.01em;
  -webkit-tap-highlight-color: transparent;
}
.mp-coupon-apply:active { opacity: 0.7; }

/* ═══════════════════════════════════════════════════════════
   Performance & Native-Feel Enhancements
   ═══════════════════════════════════════════════════════════ */

/* GPU acceleration for animated elements */
.tap-scale,
.mp-heart-btn,
.mp-atc-btn,
.btn-premium-primary,
.btn-premium-secondary,
.ae-variant-btn,
[class*="active:scale-"] {
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Remove iOS tap highlight everywhere */
a, button, label, input, select, textarea,
[role="button"], [data-action] {
  -webkit-tap-highlight-color: transparent;
}

/* Momentum scroll for horizontal rails */
.no-scrollbar {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar { display: none; }

/* Better font rendering on mobile */
body.native-app {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Native-feel overscroll bounce */
.native-app {
  overscroll-behavior-y: auto;
}

/* Prevent text selection during swipe/tap */
.ae-home,
.ae-product-detail,
[data-banner-root],
[data-gallery-root] {
  -webkit-user-select: none;
  user-select: none;
}

/* Image shimmer placeholders */
.img-wrap {
  position: relative;
  overflow: hidden;
  background: #F1F5F9;
}
.img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.5) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: img-shimmer 1.4s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}
.img-wrap.loaded::before { display: none; }
@keyframes img-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Image inside img-wrap removes shimmer when loaded */
.img-wrap img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-wrap img.loaded + ::before,
.img-wrap img[src] + ::before { display: none; }

/* Smooth page transitions */
.native-push-enter {
  animation: push-enter 0.28s var(--mp-ease) both;
}
@keyframes push-enter {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* Card stagger animation for grids */
.mp-stagger > * {
  animation: fade-up 0.35s var(--mp-ease) both;
}
.mp-stagger > *:nth-child(1)  { animation-delay: 0.02s; }
.mp-stagger > *:nth-child(2)  { animation-delay: 0.05s; }
.mp-stagger > *:nth-child(3)  { animation-delay: 0.08s; }
.mp-stagger > *:nth-child(4)  { animation-delay: 0.11s; }
.mp-stagger > *:nth-child(5)  { animation-delay: 0.14s; }
.mp-stagger > *:nth-child(6)  { animation-delay: 0.17s; }
.mp-stagger > *:nth-child(n+7){ animation-delay: 0.20s; }
@keyframes fade-up {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .native-push-enter,
  .mp-stagger > *,
  .img-wrap::before,
  .animate-pulse { animation: none !important; }
  .tap-scale,
  .mp-heart-btn,
  .mp-atc-btn,
  .btn-premium-primary { transition: none !important; }
}

/* Safe area padding helpers */
.pt-safe { padding-top:    env(safe-area-inset-top, 0px); }
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }
.pb-nav  { padding-bottom: calc(var(--nav-offset, 64px) + 16px); }

/* Skeleton loader pulse */
.skeleton {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
[data-native-app] .native-hidden {
  display: none !important;
}

.native-inset-top::before,
.native-inset::before {
  content: "";
  display: block;
  height: env(safe-area-inset-top);
}

.native-inset-bottom::after,
.native-inset::after {
  content: "";
  display: block;
  height: env(safe-area-inset-bottom);
}

.native-back-button {
  display: none;
}

body.can-go-back .native-back-button {
  display: inline;
}

[data-bridge-components~="form"]
[data-controller~="bridge--form"]
[type="submit"] {
  display: none;
}

[data-bridge-components~="button"]
[data-controller~="bridge--button"] {
  display: none;
}
/*


 */

/* ═══════════════════════════════════════════════════════
   MisrPrime — Mobile-only CSS overrides
   These styles ONLY apply inside mobile native app.
   ═══════════════════════════════════════════════════════ */

/* ─── App Loader Splash ─── */
#native-app-loader {
  position: fixed; inset: 0; z-index: 10000;
  background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  opacity: 1; visibility: visible;
}

#native-app-loader.hidden {
  opacity: 0; visibility: hidden; pointer-events: none;
}

/* ─── Global touch feedback ─── */
a:active, button:active, [role="button"]:active { opacity: 0.7; transition: opacity 0.08s; }

/* ─── Page Transitions ─── */
.animate-fade-in  { animation: app-fade  0.25s ease-out forwards; }
.animate-slide-up { animation: app-slide 0.35s cubic-bezier(0.16,1,0.3,1) forwards; }

@keyframes app-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes app-slide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.shadow-premium     { box-shadow: 0 20px 40px -12px rgba(0,0,0,.08); }
.shadow-red-premium { box-shadow: 0 20px 40px -12px rgba(29,78,216,.18); }

/* ─── Scrolling ─── */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ─── Mobile Gutter ─── */
.mobile-gutter { padding-left: var(--mobile-page-gutter,16px) !important; padding-right: var(--mobile-page-gutter,16px) !important; }

/* ─── Mobile Background ─── */
@media (max-width: 1023px) {
  body { background-color: #F8FAFC; }
}

/* ─── Native App Overrides ─── */
html[data-native-app-fallback="true"] .website-announcement,
html[data-native-app-fallback="true"] .website-header,
html[data-native-app-fallback="true"] .website-footer,
html[data-native-app-fallback="true"] .mobile-web-quick-nav { display: none !important; }
html[data-native-app-fallback="true"] main { display: block; }

body.mobile-menu-open { overflow: hidden; }

/* ─── Product Cards (mobile) ─── */
@media (max-width: 1023px) {
  .product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #F1F5F9;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: transform 0.15s ease;
    height: 100%;
    display: flex; flex-direction: column;
  }
  .product-card:active { transform: scale(0.97); }
  .product-card__info  { padding: 10px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
  .product-card__title { font-size: 13px; font-weight: 700; color: #1E293B; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
  .product-card__price { font-size: 15px; font-weight: 800; color: #1D4ED8; letter-spacing: -0.02em; }
  .product-card__price--sale { color: #1D4ED8; }
  .product-card__price--original { font-size: 11px; font-weight: 500; color: #94A3B8; text-decoration: line-through; }
}

/* ─── Mobile Form Input Overrides ─── */
.mobile-main input[type="text"]:not(.premium-input),
.mobile-main input[type="email"]:not(.premium-input),
.mobile-main input[type="password"]:not(.premium-input),
.mobile-main select:not(.premium-input),
.mobile-main textarea:not(.premium-input) {
  border: 1.5px solid #E2E8F0 !important;
  background: #F8FAFC !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 16px !important;
  box-shadow: none !important;
  transition: border-color 0.2s;
}

.mobile-main input:not(.premium-input):focus {
  border-color: #1D4ED8 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(29,78,216,.1) !important;
}

/* ─── Section headers ─── */
.mobile-home-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mobile-home-section-header h2 { font-size: 17px; font-weight: 800; color: #0F172A; letter-spacing: -0.02em; }
.mobile-home-section-header a { font-size: 11px; font-weight: 700; color: #1D4ED8; text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em; }

/* ─── Category pills (legacy) ─── */
.mobile-home-category-card { display: flex; flex-direction: column; align-items: center; text-decoration: none; min-width: 72px; }
.mobile-home-category-art { width: 60px; height: 60px; border-radius: 50%; background: #F1F5F9; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; overflow: hidden; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* ─── Filter Panel ─── */
@media (max-width: 1023px) {
  .mobile-filter-panel {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: flex-end; justify-content: center;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
  }
  .mobile-filter-panel.hidden { display: none !important; }
  .mobile-filter-panel__sheet {
    position: relative; z-index: 1;
    width: 100%; max-height: 88dvh;
    background: white;
    border-radius: 28px 28px 0 0;
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 -8px 40px rgba(0,0,0,.12);
    animation: sheet-up 0.35s cubic-bezier(0.16,1,0.3,1);
  }
  @keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
}
