/**
 * VELIO Mart - Master Stylesheet
 * Amazon/Flipkart-style multivendor layout, mobile-first, modern typography
 */

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --dark: #0f172a;
  --dark-surface: #1e293b;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --bottom-nav-height: 60px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  padding-bottom: var(--bottom-nav-height);
  overflow-x: hidden;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

/* Announcement Top Bar */
.top-announcement-bar {
  background: var(--dark);
  color: #e2e8f0;
  font-size: 0.825rem;
  padding: 6px 0;
}

.top-announcement-bar a {
  color: var(--accent);
}

/* Sticky Main Header */
.velio-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: var(--shadow-sm);
}

.header-logo img {
  height: 42px;
  width: auto;
}

/* Pincode Selector Pill */
.pincode-pill {
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.pincode-pill:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* Autocomplete Search Bar */
.search-wrapper {
  position: relative;
  width: 100%;
}

.search-input-group {
  border: 2px solid var(--primary);
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  background: #fff;
}

.search-input-group .form-control {
  border: none;
  box-shadow: none;
  padding: 10px 18px;
  font-size: 0.95rem;
}

.search-input-group .btn-search {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.search-input-group .btn-search:hover {
  background: var(--primary-hover);
}

.search-autocomplete-dropdown {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1050;
  display: none;
  max-height: 380px;
  overflow-y: auto;
}

.search-autocomplete-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s;
}

.search-autocomplete-item:hover {
  background: #f8fafc;
}

.search-autocomplete-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
}

/* Mega Menu Bar */
.navbar-mega {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}

.navbar-mega .nav-link {
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-mega .nav-link:hover {
  color: var(--primary);
}

.mega-dropdown-menu {
  width: 100%;
  left: 0;
  right: 0;
  border: none;
  border-bottom: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 24px 30px;
}

/* Product Cards */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.product-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect ratio */
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  margin-bottom: 12px;
}

.product-card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-img-wrap img {
  transform: scale(1.05);
}

.badge-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  z-index: 2;
}

.btn-wishlist {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-wishlist:hover,
.btn-wishlist.active {
  color: #ef4444;
  background: #fff;
  border-color: #ef4444;
}

.product-title {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  height: 2.7em;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.current-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.mrp-price {
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.stars-rating {
  color: #f59e0b;
  font-size: 0.85rem;
}

.product-card-footer {
  margin-top: auto;
  padding-top: 10px;
}

.btn-add-cart {
  width: 100%;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border: none;
  transition: all 0.2s;
}

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

/* Category Tiles */
.category-tile {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
  transition: all 0.2s;
  display: block;
}

.category-tile:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.category-tile img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 8px;
}

.category-tile-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

/* Flash Deal Countdown Banner */
.flash-deal-strip {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px 30px;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.countdown-box {
  display: inline-flex;
  gap: 8px;
}

.countdown-segment {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  min-width: 50px;
}

.countdown-value {
  font-size: 1.25rem;
  font-weight: 900;
  display: block;
  line-height: 1;
}

.countdown-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #cbd5e1;
  font-weight: 600;
}

/* Mobile Fixed Bottom Navigation */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1040;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

@media (min-width: 992px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  position: relative;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--primary);
}

.mobile-nav-item i {
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 2px;
}

.nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
}

/* Sticky Mobile Add To Cart Bar */
.sticky-mobile-cart-bar {
  position: fixed;
  bottom: var(--bottom-nav-height);
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 10px 16px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1035;
}

@media (min-width: 992px) {
  .sticky-mobile-cart-bar {
    display: none !important;
  }
}

/* PWA Bottom-Sheet Install Prompt */
.pwa-install-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 24px 20px 30px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
  z-index: 1060;
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-install-sheet.show {
  transform: translateY(0);
}

/* Toast Notifications Container */
.velio-toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 1090;
}

@media (min-width: 992px) {
  .velio-toast-container {
    bottom: 24px;
  }
}

/* =====================================================================
   VELIO Mart - Premium Executive Dashboard & Portal Styles
   Colors, Glassmorphism, Micro-Interactions, Keyframe Animations
   ===================================================================== */

/* Animations */
@keyframes velioFadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes velioPulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes velioPulseGlowPrimary {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
  }
}

@keyframes velioFloatSlow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.anim-fade-up {
  animation: velioFadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-delay-1 { animation-delay: 0.08s; opacity: 0; }
.anim-delay-2 { animation-delay: 0.16s; opacity: 0; }
.anim-delay-3 { animation-delay: 0.24s; opacity: 0; }
.anim-delay-4 { animation-delay: 0.32s; opacity: 0; }

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  animation: velioPulseGlow 1.8s infinite;
}

.live-pulse-dot-primary {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4f46e5;
  display: inline-block;
  animation: velioPulseGlowPrimary 1.8s infinite;
}

/* Admin & Vendor Sidebar */
.admin-sidebar {
  min-height: 100vh;
  background: linear-gradient(180deg, #090e17 0%, #0f172a 60%, #131d31 100%);
  color: #94a3b8;
  padding: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.admin-sidebar .sidebar-brand {
  padding: 20px 20px 16px 20px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.admin-sidebar .nav-item {
  margin: 3px 12px;
}

.admin-sidebar .nav-link {
  color: #94a3b8;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.admin-sidebar .nav-link i {
  font-size: 1.15rem;
  transition: transform 0.24s;
}

.admin-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
}

.admin-sidebar .nav-link:hover i {
  transform: scale(1.15);
}

/* Super Admin Active Link: Indigo & Cyan Gradient */
.admin-sidebar .nav-link.active {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 18px -2px rgba(79, 70, 229, 0.45);
}

/* Vendor Portal Active Link: Emerald & Mint Gradient */
.vendor-portal-sidebar .nav-link.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 18px -2px rgba(16, 185, 129, 0.45);
}

.admin-content {
  background: #f8fafc;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* Premium Stat Cards with Gradient Accents */
.stat-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  transition: all 0.28s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  border-color: rgba(99, 102, 241, 0.25);
}

.stat-card-indigo::before { background: linear-gradient(90deg, #4f46e5, #06b6d4); }
.stat-card-emerald::before { background: linear-gradient(90deg, #059669, #10b981); }
.stat-card-amber::before { background: linear-gradient(90deg, #d97706, #f59e0b); }
.stat-card-violet::before { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.stat-card-rose::before { background: linear-gradient(90deg, #e11d48, #fb7185); }
.stat-card-sky::before { background: linear-gradient(90deg, #0284c7, #38bdf8); }

.stat-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(4deg);
}

/* Stat Icon Gradient Glows */
.stat-icon-indigo {
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  color: #ffffff;
  box-shadow: 0 8px 16px -2px rgba(79, 70, 229, 0.35);
}

.stat-icon-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  box-shadow: 0 8px 16px -2px rgba(16, 185, 129, 0.35);
}

.stat-icon-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #ffffff;
  box-shadow: 0 8px 16px -2px rgba(245, 158, 11, 0.35);
}

.stat-icon-violet {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: #ffffff;
  box-shadow: 0 8px 16px -2px rgba(124, 58, 237, 0.35);
}

.stat-icon-rose {
  background: linear-gradient(135deg, #e11d48 0%, #fb7185 100%);
  color: #ffffff;
  box-shadow: 0 8px 16px -2px rgba(225, 29, 72, 0.35);
}

.stat-icon-sky {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #ffffff;
  box-shadow: 0 8px 16px -2px rgba(2, 132, 199, 0.35);
}

/* Glassmorphic Chart & Section Cards */
.chart-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: 24px;
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.chart-card:hover {
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.07), 0 4px 10px rgba(15, 23, 42, 0.03);
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.chart-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trend-badge-up {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.trend-badge-neutral {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
}

/* Modern Gradient Banner Header */
.dashboard-hero-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1e293b 100%);
  border-radius: 24px;
  padding: 28px 32px;
  color: #ffffff;
  box-shadow: 0 12px 30px -5px rgba(30, 27, 75, 0.25);
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

.dashboard-hero-banner::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(6, 182, 212, 0.08) 70%, transparent 100%);
  pointer-events: none;
}

.vendor-hero-banner {
  background: linear-gradient(135deg, #022c22 0%, #064e3b 40%, #0f172a 100%);
  border-radius: 24px;
  padding: 28px 32px;
  color: #ffffff;
  box-shadow: 0 12px 30px -5px rgba(6, 78, 59, 0.25);
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

.vendor-hero-banner::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(20, 184, 166, 0.08) 70%, transparent 100%);
  pointer-events: none;
}

/* Animated Progress Bars */
.progress-animated .progress-bar {
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Micro-interactive table styling */
.table-modern {
  border-collapse: separate;
  border-spacing: 0 6px;
}

.table-modern tbody tr {
  background: #ffffff;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.table-modern tbody tr:hover {
  background: #f8fafc;
  transform: scale(1.002);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.table-modern td, .table-modern th {
  padding: 14px 16px;
  border-top: none;
  border-bottom: none;
}

.table-modern tbody tr td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.table-modern tbody tr td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}


