/* ============================================
   BLEU DESIGN SYSTEM
   Modern B2B Commerce UI System
   ============================================ */

:root {
  /* Brand Colors */
  --primary: #0A5CFF;
  --primary-dark: #0848CC;
  --primary-light: #3D7FFF;
  --primary-bg: #F5F8FF;
  --primary-gradient: linear-gradient(135deg, #0A5CFF 0%, #3D7FFF 100%);

  /* Neutral Colors */
  --white: #FFFFFF;
  --bg: #FFFFFF;
  --bg-soft: #F7F9FC;
  --bg-muted: #F0F3F8;
  --surface: #FFFFFF;

  /* Text */
  --text-primary: #0F1729;
  --text-secondary: #4B5563;
  --text-tertiary: #9CA3AF;
  --text-on-primary: #FFFFFF;

  /* Borders */
  --border: #E5E7EB;
  --border-light: #F0F2F5;
  --border-strong: #D1D5DB;

  /* Status Colors */
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --error: #EF4444;
  --error-bg: #FEF2F2;
  --info: #3B82F6;
  --info-bg: #EFF6FF;

  /* Category Colors */
  --cat-orange: #FF7A45;
  --cat-orange-bg: #FFF1EC;
  --cat-purple: #8B5CF6;
  --cat-purple-bg: #F3EEFF;
  --cat-pink: #EC4899;
  --cat-pink-bg: #FDF2F8;
  --cat-teal: #14B8A6;
  --cat-teal-bg: #ECFDF5;
  --cat-yellow: #EAB308;
  --cat-yellow-bg: #FEFCE8;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 41, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 41, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 23, 41, 0.08);
  --shadow-xl: 0 16px 40px rgba(15, 23, 41, 0.12);
  --shadow-primary: 0 8px 24px rgba(10, 92, 255, 0.24);
  --shadow-card: 0 2px 8px rgba(15, 23, 41, 0.04);

  /* Mobile */
  --mobile-w: 390px;
  --mobile-h: 844px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

/* Use plain system sans-serif for the Indian Rupee symbol (₹).
   Poppins renders ₹ awkwardly — fall back to native fonts which have the
   standard, simple ₹ glyph. */
@font-face {
  font-family: 'RupeeOverride';
  src: local('Arial'), local('Helvetica'), local('Segoe UI'), local('Roboto');
  unicode-range: U+20B9; /* ₹ */
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'RupeeOverride', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-primary);
}

/* Invisible scrollbars everywhere — keep scrolling, just hide the UI */
* {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / old Edge */
}
*::-webkit-scrollbar {
  display: none;                /* Chrome / Safari / new Edge */
  width: 0;
  height: 0;
}

body.gallery-body {
  background: linear-gradient(180deg, #F0F4FF 0%, #E5EEFF 100%);
  min-height: 100vh;
  padding: 40px 20px 80px;
}

body.screen-body {
  background: #EEF2F8;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 20px;
}

/* ============================================
   Iframe-embed mode
   When a screen is loaded inside the gallery iframe,
   strip body chrome and let the parent frame supply the phone shell.
   ============================================ */
html.in-iframe, html.in-iframe body, body.in-iframe {
  background: var(--white) !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.in-iframe {
  display: block !important;
  min-height: 100vh !important;
  overflow: hidden;
}
body.in-iframe .back-to-gallery,
body.in-iframe .download-btn { display: none !important; }
body.in-iframe .screen-wrapper {
  display: block !important;
  gap: 0 !important;
  width: 100% !important;
}
body.in-iframe .mobile-frame {
  width: 100% !important;
  height: 100vh !important;
  max-width: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
/* Keep the notch + home indicator visible in iframe mode for phone realism */

/* ============================================
   Mobile Frame
   ============================================ */
.screen-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mobile-frame {
  width: var(--mobile-w);
  height: var(--mobile-h);
  background: var(--white);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 10px #1a1a1a,
    0 0 0 11px #2a2a2a,
    0 30px 80px rgba(10, 30, 80, 0.25);
  display: flex;
  flex-direction: column;
}

/* Notch */
.mobile-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #1a1a1a;
  border-radius: 20px;
  z-index: 100;
}

/* Status Bar */
.status-bar {
  height: 50px;
  padding: 16px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
  z-index: 50;
  position: relative;
}

.status-bar.dark { color: var(--white); }

.status-bar .time { font-weight: 600; }

.status-bar .icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.status-bar .icons i { font-size: 14px; }

/* Screen Content */
.screen-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.screen-content::-webkit-scrollbar { display: none; }
.screen-content { scrollbar-width: none; }

/* Home Indicator */
.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: #1a1a1a;
  border-radius: 3px;
  opacity: 0.8;
  z-index: 100;
}

.home-indicator.light { background: rgba(255,255,255,0.5); }

/* ============================================
   Download Button
   ============================================ */
.download-btn {
  position: absolute;
  top: -8px;
  right: -160px;
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  z-index: 1000;
  white-space: nowrap;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(10, 92, 255, 0.32);
}

.download-btn:active { transform: translateY(0); }

.download-btn i { font-size: 14px; }

.back-to-gallery {
  position: fixed;
  top: 20px;
  left: 20px;
  background: var(--white);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  transition: all 0.15s ease;
  z-index: 1000;
}

.back-to-gallery:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary-cta {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 16px 24px;
  border-radius: var(--r-md);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  width: 100%;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary-cta:hover { background: var(--primary-dark); }
.btn-primary-cta:active { transform: scale(0.98); }

.btn-secondary-cta {
  background: var(--primary-bg);
  color: var(--primary);
  border: none;
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-cta {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: none;
  padding: 8px 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
}

/* ============================================
   Typography Utility
   ============================================ */
.heading-xl { font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -0.5px; }
.heading-lg { font-size: 22px; font-weight: 700; line-height: 1.3; }
.heading-md { font-size: 18px; font-weight: 600; line-height: 1.3; }
.heading-sm { font-size: 16px; font-weight: 600; line-height: 1.4; }
.body-lg { font-size: 15px; font-weight: 400; line-height: 1.5; }
.body-md { font-size: 14px; font-weight: 400; line-height: 1.5; }
.body-sm { font-size: 13px; font-weight: 400; line-height: 1.5; }
.caption { font-size: 12px; font-weight: 500; line-height: 1.4; }

.text-primary-brand { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* ============================================
   Cards
   ============================================ */
.card-flat {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  border: 1px solid var(--border-light);
}

.card-elevated {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
}

.card-primary {
  background: var(--primary-bg);
  border-radius: var(--r-lg);
  padding: var(--space-4);
}

.card-gradient {
  background: var(--primary-gradient);
  color: var(--white);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-primary);
}

/* ============================================
   Inputs
   ============================================ */
.input-field {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
}

.input-field:focus {
  background: var(--white);
  border-color: var(--primary);
}

.input-field::placeholder { color: var(--text-tertiary); }

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-group-row {
  position: relative;
}

.input-group-row .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 16px;
}

.input-group-row .input-field { padding-left: 42px; }

/* Search Bar */
.search-bar {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--bg-soft);
  border: none;
  border-radius: var(--r-md);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}

/* ============================================
   Badges
   ============================================ */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-bg);
  color: var(--primary);
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-info { background: var(--info-bg); color: var(--info); }

/* ============================================
   App Header
   ============================================ */
.app-header {
  padding: 12px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
}

.app-header.with-shadow { box-shadow: var(--shadow-sm); }

.app-header .header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.app-header .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--bg-soft);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  position: relative;
}

.icon-btn .notif-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
  border: 2px solid var(--white);
}

/* Bottom Nav */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 8px 24px;
  z-index: 50;
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
  background: none;
  border: none;
  font-family: inherit;
}

.bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item i { font-size: 18px; }

.bottom-nav .nav-item.center {
  background: var(--primary);
  color: var(--white);
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  margin-top: -28px;
  box-shadow: var(--shadow-primary);
}
.bottom-nav .nav-item.center i { font-size: 22px; }
.bottom-nav .nav-item.center span { display: none; }

/* Scroll content with bottom nav padding */
.with-bottom-nav { padding-bottom: 90px; }

/* Helpers */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1{margin-top:4px;}.mt-2{margin-top:8px;}.mt-3{margin-top:12px;}.mt-4{margin-top:16px;}.mt-5{margin-top:20px;}.mt-6{margin-top:24px;}
.mb-1{margin-bottom:4px;}.mb-2{margin-bottom:8px;}.mb-3{margin-bottom:12px;}.mb-4{margin-bottom:16px;}.mb-5{margin-bottom:20px;}.mb-6{margin-bottom:24px;}
.px-4 { padding-left:16px; padding-right:16px;}
.px-5 { padding-left:20px; padding-right:20px;}
.py-3 { padding-top:12px; padding-bottom:12px;}
.py-4 { padding-top:16px; padding-bottom:16px;}
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.w-full { width: 100%; }

/* Skeleton image placeholder gradient blocks for illustrations */
.illus-block {
  background: var(--primary-bg);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

/* Avatars */
.avatar {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: var(--primary-gradient);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.xl { width: 80px; height: 80px; font-size: 28px; }

/* Divider */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-4) 0;
}

/* List Item */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
}

.list-item .leading {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.list-item .body { flex: 1; min-width: 0; }
.list-item .title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.list-item .subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.list-item .trailing { color: var(--text-tertiary); }

/* ============================================
   Gallery
   ============================================ */
.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-header {
  text-align: center;
  margin-bottom: 48px;
}

.gallery-title {
  font-size: 42px;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.gallery-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.gallery-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.gallery-stat {
  background: var(--white);
  padding: 12px 24px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.gallery-stat strong {
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 48px 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 2px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.gallery-card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  color: inherit;
}

.gallery-card-preview {
  height: 320px;
  background: linear-gradient(135deg, #F5F8FF, #E8EFFF);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.gallery-card-preview iframe {
  width: 195px;
  height: 422px;
  border: 0;
  transform: scale(0.5);
  transform-origin: center;
  pointer-events: none;
  border-radius: 22px;
}

.gallery-card-body {
  padding: 16px 20px;
  background: var(--white);
}

.gallery-card-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.gallery-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
}

.gallery-section-pill {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
