/* ============ HOME PAGE - CLEAN & SIMPLE DESIGN ============ */

body.home-page,
body.home-mobile {
  --primary-bg: #ffffff;
  --secondary-bg: #f9fafb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --accent-blue: #3b82f6;
  --accent-teal: #14b8a6;
  --accent-purple: #8b5cf6;
  --accent-orange: #f59e0b;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  overflow-x: hidden;
}

body.home-page main.main-content,
body.home-mobile main.main-content {
  background: var(--primary-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

body.home-page main.main-content .container,
body.home-mobile main.main-content .container {
  max-width: 1200px;
}

/* Homepage product cards: keep full image visible (compact/contain) */
body.home-page .product-image,
body.home-mobile .product-image {
  background: #f5f5f5;
}

body.home-page .product-image img,
body.home-mobile .product-image img {
  object-fit: cover !important;
  padding: 0;
}

/* ============ HERO SECTION ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 20px 88px;
  margin-bottom: 18px;
  text-align: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
  color: white;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero::before {
  width: 420px;
  height: 420px;
  top: -180px;
  right: -140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
}

.hero::after {
  width: 360px;
  height: 360px;
  bottom: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.35) 0%, rgba(20, 184, 166, 0) 72%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -1.2px;
  line-height: 1.06;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.hero p {
  max-width: 760px;
  margin: 0 auto 34px;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
  opacity: 0.92;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.hero-search .bmz-autocomplete-wrap {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: #ffffff;
  font-size: 16px;
  color: #111827;
  outline: none;
}

.hero-search input::placeholder {
  color: #94a3b8;
}

.hero-search .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  height: 54px;
  min-width: 132px;
  padding: 0 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.3);
}

.hero-search .btn:hover {
  background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(2, 6, 23, 0.35);
}

.hero-search .btn:active {
  transform: translateY(0);
}

/* Logged-in user label styling in navbar */
body.home-page .navbar-actions .nav-dropdown .dropdown-toggle .nav-text,
body.home-mobile .navbar-actions .nav-dropdown .dropdown-toggle .nav-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  font-weight: 700;
  line-height: 1;
  border: 1px solid #bfdbfe;
}

body.home-page .navbar-actions .nav-dropdown .dropdown-toggle .fa-user,
body.home-mobile .navbar-actions .nav-dropdown .dropdown-toggle .fa-user {
  color: #1d4ed8;
}

/* ============ STATS SECTION ============ */
.stats-section {
  padding: 60px 20px;
  background: var(--secondary-bg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-card {
  background: white;
  padding: 32px 24px;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============ MODULES SECTION ============ */
.modules-section {
  padding: 80px 20px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text-primary);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.module-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  cursor: pointer;
}

.module-card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

.module-icon {
  font-size: 48px;
  color: var(--accent-blue);
  margin-bottom: 16px;
}

.module-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.module-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.module-link {
  display: inline-block;
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 14px;
}

/* ============ GETTING STARTED SECTION ============ */
.getting-started {
  padding: 80px 20px;
  background: var(--secondary-bg);
}

.getting-started h2 {
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.step {
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: white;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============ CTA SECTION ============ */
.cta-section {
  padding: 24px 0 56px;
  background: transparent;
  color: white;
}

body.home-page main.main-content .cta-section .container,
body.home-mobile main.main-content .cta-section .container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
  border-radius: 0;
  padding: 64px 42px;
  text-align: center;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  max-width: none;
  width: 100%;
  margin: 0;
}

.cta-section .container::before,
.cta-section .container::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.cta-section .container::before {
  width: 300px;
  height: 300px;
  top: -140px;
  right: -100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
}

.cta-section .container::after {
  width: 240px;
  height: 240px;
  bottom: -120px;
  left: -90px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.32) 0%, rgba(20, 184, 166, 0) 72%);
}

.cta-section .container>* {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.4px;
}

.cta-section p {
  font-size: 16px;
  margin-bottom: 20px;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 auto;
  align-items: center;
}

.cta-section .cta-buttons,
.mobile-cta .cta-buttons {
  justify-content: center !important;
  align-items: center;
}

.cta-section .cta-buttons .btn,
.mobile-cta .cta-buttons .btn {
  margin: 0;
}

.cta-section .btn,
.cta-section .btn.btn-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border-radius: 12px;
  min-width: 190px;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease;
}

body.home-page .cta-section .btn-primary,
body.home-mobile .cta-section .btn-primary,
body.home-page .mobile-cta .btn-primary,
body.home-mobile .mobile-cta .btn-primary {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

body.home-page .cta-section .btn-secondary,
body.home-mobile .cta-section .btn-secondary,
body.home-page .mobile-cta .btn-secondary,
body.home-mobile .mobile-cta .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
}

body.home-page .cta-section .btn:hover,
body.home-mobile .cta-section .btn:hover,
body.home-page .mobile-cta .btn:hover,
body.home-mobile .mobile-cta .btn:hover {
  transform: translateY(-1px);
}

body.home-page .cta-section .btn-primary:hover,
body.home-mobile .cta-section .btn-primary:hover,
body.home-page .mobile-cta .btn-primary:hover,
body.home-mobile .mobile-cta .btn-primary:hover {
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.34);
}

body.home-page .products-scroll,
body.home-mobile .products-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.home-page .products-scroll::-webkit-scrollbar,
body.home-mobile .products-scroll::-webkit-scrollbar {
  display: none;
}

body.home-mobile main.main-content .promotional-section>.container,
body.home-mobile main.main-content .seasonal-section>.container,
body.home-mobile main.main-content .category-section>.container {
  padding-left: 8px;
  padding-right: 8px;
}

body.home-mobile .products-scroll {
  padding: 0 8px 12px 8px;
}

.btn {
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-block;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 40px;
  font-size: 18px;
}

/* ============ MOBILE VERSION ============ */
.mobile-hero {
  position: relative;
  overflow: visible;
  padding: 72px 20px 64px;
  margin-bottom: 18px;
  text-align: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
  color: white;
  z-index: 5;
}

.mobile-hero::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  top: -120px;
  right: -80px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.mobile-hero .container {
  position: relative;
  z-index: 1;
}

.mobile-hero h1 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.8px;
  line-height: 1.08;
}

.mobile-hero p {
  font-size: 16px;
  margin-bottom: 22px;
  opacity: 0.92;
}

.mobile-hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 25;
}

.mobile-hero-search .bmz-autocomplete-wrap {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 26;
}

body.home-mobile .mobile-hero .bmz-autocomplete {
  z-index: 9999 !important;
}

.mobile-hero-search input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
}

.mobile-hero-search input::placeholder {
  color: #94a3b8;
}

.mobile-hero-search button {
  width: 44px;
  height: 44px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.mobile-stats {
  padding: 22px 16px;
  background: #ffffff;
}

body.home-mobile .mobile-stats-grid {
  display: flex !important;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: nowrap !important;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  overflow-x: hidden;
}

body.home-mobile .mobile-stats .stat-item {
  background: transparent;
  padding: 0;
  border-radius: 0;
  text-align: center;
  box-shadow: none;
  flex: 1 1 0;
  min-width: 0;
}

body.home-mobile .mobile-stats .stat-number {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 10px;
}

body.home-mobile .mobile-stats .stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.mobile-modules {
  padding: 40px 20px;
}

.mobile-modules h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 24px;
}

.modules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.module-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
}

.module-item:active {
  background: var(--secondary-bg);
  border-color: var(--accent-blue);
}

.module-item i {
  font-size: 28px;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.module-item h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.module-item p {
  font-size: 12px;
  color: var(--text-secondary);
}

.mobile-getting-started {
  padding: 40px 20px;
  background: var(--secondary-bg);
}

.mobile-getting-started h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 24px;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: 8px;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}

.step-item h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.step-item p {
  font-size: 12px;
  color: var(--text-secondary);
}

.mobile-cta {
  padding: 18px 0 34px;
  background: transparent;
  color: white;
}

body.home-mobile main.main-content .mobile-cta {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.home-mobile main.main-content .mobile-cta .container,
body.home-page main.main-content .mobile-cta .container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
  border-radius: 0;
  padding: 64px 26px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  max-width: none;
  width: 100%;
  margin: 0;
}

body.home-mobile main.main-content .mobile-cta>.container {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

.mobile-cta .container::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -90px;
  right: -70px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.mobile-cta .container>* {
  position: relative;
  z-index: 1;
}

.mobile-cta h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.mobile-cta p {
  font-size: 14px;
  margin-bottom: 14px;
  opacity: 0.95;
}

.mobile-cta .cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.mobile-cta .btn {
  height: 40px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  width: 100%;
  min-width: 0;
  max-width: 280px;
  line-height: 1;
  border-radius: 10px;
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-search {
    flex-direction: row;
    align-items: center;
    max-width: 100%;
    border-radius: 14px;
    padding: 8px;
  }

  .hero-search input {
    height: 46px;
    border-radius: 10px;
  }

  .hero-search .btn {
    height: 46px;
    min-width: 112px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .hero-search {
    flex-direction: column;
  }

  .hero-search input,
  .hero-search .btn {
    width: 100%;
  }

  .section-title {
    font-size: 28px;
  }

  .modules-grid {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
  }

  .cta-section .btn,
  .mobile-cta .btn {
    width: 100% !important;
    min-width: 0;
    max-width: 250px;
    height: 38px;
    padding: 0 12px;
    font-size: 11px;
    border-radius: 10px;
  }

  body.home-mobile main.main-content .mobile-cta .container {
    padding-top: 58px;
    padding-bottom: 52px;
    padding-left: 18px;
    padding-right: 18px;
  }

  body.home-mobile main.main-content .mobile-cta>.container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
  }
}