/* ==========================================================================
   SHOPTHEGIARE - MOBILE APP MODERN DESIGN SYSTEM
   Optimized for Native Mobile App feel, PWA, and Hybrid WebViews
   ========================================================================== */

:root {
  --app-primary: #2563eb;
  --app-primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --app-accent-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --app-success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --app-warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --app-purple-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  
  --app-bg-dark: #0f172a;
  --app-card-bg-dark: rgba(30, 41, 59, 0.85);
  --app-border-dark: rgba(255, 255, 255, 0.1);
  --app-text-muted: #94a3b8;
  
  --app-radius-lg: 20px;
  --app-radius-md: 14px;
  --app-radius-sm: 8px;

  --app-shadow-glow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
  --app-shadow-card: 0 10px 20px rgba(0, 0, 0, 0.15);
  --app-bottom-nav-height: 64px;
}

/* Header Bar & Brand System (White Header) */
#page-header {
  background: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  position: sticky;
  top: 0;
  z-index: 1040;
}

.app-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.app-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--app-primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.app-brand-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a !important;
  margin: 0;
}

.user-balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 5px 12px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13px;
  color: #2563eb;
  margin-right: 10px;
}

/* PC Inline Header Menu (Text only, compact font, no icons, hidden on mobile) */
.app-pc-inline-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pc-nav-item {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #334155 !important;
  text-decoration: none !important;
  padding: 6px 9px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: -0.2px;
  transition: all 0.2s ease;
}

.pc-nav-item:hover {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08);
}

.pc-nav-item.active {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.12);
  font-weight: 800;
}

@media (max-width: 991.98px) {
  .app-pc-inline-nav {
    display: none !important;
  }
}

/* Mobile Menu Bar Button */
.app-mobile-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
}

/* Mobile Slide Drawer Menu (Blue Cover Theme) */
.app-mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1060;
}

.app-mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background: linear-gradient(180deg, #02479f 0%, #00265d 100%) !important;
  z-index: 1070;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.app-mobile-menu-drawer.open {
  right: 0;
}

.app-mobile-menu-overlay.open {
  display: block;
}

.bg-white-10 {
  background: rgba(255, 255, 255, 0.12);
}

.border-white-10 {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.mobile-drawer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-drawer-nav li a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #e2e8f0 !important;
  font-weight: 600;
  font-size: 14px;
  border-radius: 12px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.mobile-drawer-nav li a:hover,
.mobile-drawer-nav li a.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
  transform: translateX(4px);
}

/* Modern Single Hero Banner Card for PC & Mobile */
.app-hero-banner-container {
  margin-bottom: 24px;
  width: 100%;
}

.app-hero-banner-card {
  width: 100%;
  border-radius: var(--app-radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border: none !important;
  background: transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-hero-banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.25);
}

.app-hero-banner-link {
  display: block;
  width: 100%;
  text-decoration: none !important;
}

.app-hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--app-radius-lg);
  object-fit: contain;
}

/* Global Body Adjustments for Mobile App */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  padding-bottom: calc(var(--app-bottom-nav-height) + 20px);
}

@media (min-width: 769px) {
  body {
    padding-bottom: 30px;
  }
}

/* App Header styling */
.app-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-header-brand img {
  height: 36px;
  border-radius: 8px;
}
.app-header-title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

/* Mobile Top Header Bar */
.app-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1020;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.user-balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13px;
  color: #60a5fa;
}

/* Mobile Quick Action Service Grid */
.app-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 576px) {
  .app-quick-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
}

.app-service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-service-item:active {
  transform: scale(0.92);
}

.app-service-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  position: relative;
}

.app-service-label {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  color: #e2e8f0;
}

/* Color gradients for service icons */
.bg-gradient-blue { background: var(--app-primary-gradient); }
.bg-gradient-cyan { background: var(--app-accent-gradient); }
.bg-gradient-green { background: var(--app-success-gradient); }
.bg-gradient-orange { background: var(--app-warning-gradient); }
.bg-gradient-purple { background: var(--app-purple-gradient); }

/* App Glass Cards */
.app-card {
  background: var(--app-card-bg-dark);
  border: 1px solid var(--app-border-dark);
  border-radius: var(--app-radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--app-shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.app-card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
}

/* Modern Form Controls for Mobile Touch */
.app-input, .app-select {
  height: 48px !important;
  border-radius: var(--app-radius-md) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background-color: rgba(15, 23, 42, 0.6) !important;
  color: #f8fafc !important;
  font-weight: 500;
  padding: 0 16px !important;
  font-size: 15px !important;
  transition: all 0.2s ease;
}

.app-input:focus, .app-select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
  outline: none;
}

/* Modern Touch Buttons */
.app-btn-primary {
  height: 50px;
  border-radius: var(--app-radius-md);
  background: var(--app-primary-gradient);
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-shadow: var(--app-shadow-glow);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.app-btn-primary:active {
  transform: scale(0.97);
  opacity: 0.9;
}

/* Mobile Bottom Navigation Bar */
.app-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--app-bottom-nav-height);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1050;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 768px) {
  .app-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
}

.app-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-decoration: none !important;
  flex: 1;
  height: 100%;
  transition: color 0.2s ease, transform 0.15s ease;
  position: relative;
}

.app-bottom-nav-item i {
  font-size: 20px;
  margin-bottom: 3px;
  transition: transform 0.2s ease;
}

.app-bottom-nav-item span {
  font-size: 11px;
  font-weight: 600;
}

.app-bottom-nav-item.active {
  color: #3b82f6;
}

.app-bottom-nav-item.active i {
  transform: translateY(-2px);
}

.app-bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  background: #3b82f6;
  border-radius: 0 0 4px 4px;
}

/* Telco Cards Selector Grid */
.telco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.telco-card-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.telco-card-item:hover, .telco-card-item.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.telco-card-item img {
  max-height: 32px;
  max-width: 80%;
  object-fit: contain;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

/* Mobile Smooth Horizontal Scrollable Nav Tabs */
ul.scrollable-tabs, ul.nav.scrollable-tabs, ul.nav-tabs.scrollable-tabs, .scrollable-tabs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  white-space: nowrap !important;
  scrollbar-width: none !important;
  padding-bottom: 6px !important;
  margin-bottom: 10px !important;
  width: 100% !important;
}
ul.scrollable-tabs::-webkit-scrollbar, .scrollable-tabs::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
ul.scrollable-tabs > li, ul.scrollable-tabs > li.nav-item, .scrollable-tabs .nav-item {
  flex: 0 0 auto !important;
  display: inline-block !important;
  float: none !important;
  white-space: nowrap !important;
}
ul.scrollable-tabs > li > a, ul.scrollable-tabs > li.nav-item > a.nav-link, .scrollable-tabs .nav-link {
  white-space: nowrap !important;
  display: inline-block !important;
  float: none !important;
  padding: 8px 16px !important;
}

/* Footer Boxed Width Alignment */
#page-footer .content {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Step Card Hover & Connected Line Styling */
.app-step-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.app-step-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(2, 71, 159, 0.25) !important;
}
