/* ==========================
   Homepage-only Dark Mode (loaded last to win cascade)
   ========================== */
body.home-dark,
body.home-dark #page-wrapper {
  background: linear-gradient(135deg, #0b1220 0%, #111827 100%) !important;
  color: #e5e7eb !important;
}
body.home-dark h1,
body.home-dark h2,
body.home-dark h3,
body.home-dark h4,
body.home-dark h5,
body.home-dark h6,
body.home-dark .hero-title { color: #f9fafb !important; }
body.home-dark p,
body.home-dark .lead,
body.home-dark .hero-description,
body.home-dark .text-muted { color: #cbd5e1 !important; }
body.home-dark .hero,
body.home-dark section.hero,
body.home-dark .full-height-hero { background-color: #0b1220 !important; background-image: none !important; }
body.home-dark .card { background: #111827 !important; color: #e5e7eb !important; border: 1px solid #1f2937 !important; }
body.home-dark .card .text-muted { color: #9ca3af !important; }
body.home-dark .header {
  background: rgba(107, 114, 128, 0.32) !important; /* grey-500 with transparency */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.25) !important;
}
body.home-dark .mobile-menu-toggle span { background: #e5e7eb !important; }
body.home-dark .mobile-nav { background: #0f172a !important; box-shadow: 0 12px 24px rgba(0,0,0,0.25) !important; }
body.home-dark .mobile-nav .mobile-nav-link,
body.home-dark .mobile-nav .mobile-cta { color: #e5e7eb !important; }
body.home-dark .mobile-nav .mobile-nav-link:hover { background: #1f2937 !important; }
body.home-dark .bg-light,
body.home-dark section.bg-light { background: linear-gradient(135deg, #0b1220 0%, #111827 100%) !important; }
body.home-dark a { color: var(--primary) !important; }
body.home-dark a:hover { text-decoration: underline; }
body.home-dark #tempaltemo_footer,
body.home-dark #tempaltemo_footer.bg-dark { background-color: #0b1220 !important; }
/* Override common Bootstrap utilities on homepage */
body.home-dark .text-dark,
body.home-dark .text-dark * { color: #e5e7eb !important; }
body.home-dark .bg-white { background-color: #0f172a !important; }

/* Issue section: fixed viewport height, grey background, black text */
#issue, #how-it-works, #who-is-this-for, #solution {
  min-height: 100vh !important; /* ensure section occupies 80% of viewport height */
  background: #afb2b7!important; /* gray-200 */
  color: #111827 !important; /* gray-900 text */
}
#how-it-works h1, #how-it-works h2, #how-it-works h3, #how-it-works h4, #how-it-works h5, #how-it-works h6,
#how-it-works p, #how-it-works .lead, #how-it-works .text-muted { color: #111827 !important; }
body.home-dark #how-it-works, body.home-dark #how-it-works * { color: #111827 !important; }
#issue h1, #issue h2, #issue h3, #issue h4, #issue h5, #issue h6,
#issue p, #issue .lead, #issue .text-muted {
  color: #111827 !important;
}
/* If homepage dark mode is active, keep #issue light per request */
body.home-dark #issue, body.home-dark #who-is-this-for { background: #afb2b7 !important; color: #111827 !important; }
body.home-dark #issue .lead, body.home-dark #issue p, body.home-dark #issue h2, body.home-dark #who-is-this-for .lead, body.home-dark #who-is-this-for p, body.home-dark #who-is-this-for h2 { color: #111827 !important; }

body.home-dark #solution { background: #111827 !important; color: #e5e7eb !important; }
body.home-dark #solution .lead, body.home-dark #solution p, body.home-dark #solution h2 { color: #e5e7eb !important; }

/* Featured Products section - dark mode styling (homepage only) */
body.home-dark #featured-products {
  background: #0b1220 !important;
}
body.home-dark #featured-products h2,
body.home-dark #featured-products .lead,
body.home-dark #featured-products p { color: #e5e7eb !important; }
body.home-dark #featured-products .text-muted { color: #cbd5e1 !important; }
body.home-dark #featured-products .who-card {
  background: #111827 !important;
  color: #e5e7eb !important;
  border: 1px solid #1f2937 !important;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2) !important;
}
body.home-dark #featured-products .who-card a { color: #e5e7eb !important; }

/* ==========================
   Homepage-only Dark Mode
   Applies only when <body class="home-dark">
   ========================== */
body.home-dark,
body.home-dark #page-wrapper {
  background: linear-gradient(135deg, #0b1220 0%, #111827 100%) !important;
  color: #e5e7eb !important;
}

/* Typography */
body.home-dark h1,
body.home-dark h2,
body.home-dark h3,
body.home-dark h4,
body.home-dark h5,
body.home-dark h6,
body.home-dark .hero-title {
  color: #f9fafb !important;
}
body.home-dark p,
body.home-dark .lead,
body.home-dark .hero-description,
body.home-dark .text-muted { color: #cbd5e1 !important; }

/* Hero section */
body.home-dark .hero,
body.home-dark section.hero,
body.home-dark .full-height-hero {
  background-color: #0b1220 !important;
  background-image: none !important;
}

/* Cards */
body.home-dark .card {
  background: #111827 !important;
  color: #e5e7eb !important;
  border: 1px solid #1f2937 !important;
}
body.home-dark .card .text-muted { color: #9ca3af !important; }

/* Header (frosted dark) */
body.home-dark .header {
  background: rgba(1, 22, 39, 0.80) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}
body.home-dark .mobile-menu-toggle span { background: #e5e7eb !important; }

/* Mobile nav */
body.home-dark .mobile-nav {
  background: #0f172a !important;
  box-shadow: 0 12px 24px rgba(0,0,0,0.25) !important;
}
body.home-dark .mobile-nav .mobile-nav-link,
body.home-dark .mobile-nav .mobile-cta { color: #e5e7eb !important; }
body.home-dark .mobile-nav .mobile-nav-link:hover { background: #1f2937 !important; }

/* Section utilities */
body.home-dark .bg-light,
body.home-dark section.bg-light {
  background: linear-gradient(135deg, #0b1220 0%, #111827 100%) !important;
}

/* Links maintain brand color; ensure readable hover underline */
body.home-dark a { color: var(--primary) !important; }
body.home-dark a:hover { text-decoration: underline; }

/* Footer */
body.home-dark #tempaltemo_footer,
body.home-dark #tempaltemo_footer.bg-dark {
  background-color: #0b1220 !important;
}
/* FINAL TEMPLATE OVERRIDE - Load this last to override all Bootstrap styles */

/* Force Template colors and fonts everywhere */
body,
html,
* {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.6 !important;
}

/* Restore correct font for Font Awesome 6 icons (prevent universal override from breaking icons) */
.fa-solid,
.fas { /* FA6/FA5 solid */
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

.fa-regular,
.far { /* FA6/FA5 regular */
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 400 !important;
}

.fa-brands,
.fab { /* FA6/FA5 brands */
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* Template color variables */
:root {
  --primary: #DE4D86 !important;
  --primary-hover: #C73F76 !important;
  --light-blue: #98b9f2 !important;
  --purple-blue: #918ef4 !important;
  --dark-navy: #141b41 !important;
  --blue-50: #eff6ff !important;
  --indigo-50: #eef2ff !important;
  --blue-100: #dbeafe !important;
  --gray-50: #f9fafb !important;
  --gray-100: #f3f4f6 !important;
  --gray-600: #4b5563 !important;
  --gray-700: #374151 !important;
  --gray-900: #111827 !important;
}

/* Override ALL Bootstrap text color utilities */
.text-success,
.text-success *,
h1.text-success,
.h1.text-success,
h1.h1.text-success {
  color: var(--primary) !important;
}

.text-primary,
.text-primary * {
  color: var(--primary) !important;
}

.text-dark,
.text-dark * {
  color: var(--dark-navy) !important;
}

/* Override ALL Bootstrap button styles */
.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.btn-success:not(:disabled):not(.disabled),
.btn-success:not(:disabled):not(.disabled):hover,
.btn-success:not(:disabled):not(.disabled):focus,
.btn-success:not(:disabled):not(.disabled):active,
.btn.btn-success,
.btn.btn-success:hover,
.btn.btn-success:focus,
.btn.btn-success:active,
a.btn-success,
a.btn-success:hover,
a.btn-success:focus,
a.btn-success:active {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-weight: 500 !important;
  border-radius: 0.375rem !important;
  transition: all 0.2s !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn.btn-success:hover,
a.btn-success:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  color: white !important;
  box-shadow: 0 0 0 0.2rem rgba(221, 242, 235, 0.35) !important; /* highlight ring */
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:not(:disabled):not(.disabled),
.btn-primary:not(:disabled):not(.disabled):hover,
.btn-primary:not(:disabled):not(.disabled):focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn.btn-primary,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active,
a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-weight: 500 !important;
  border-radius: 0.375rem !important;
  transition: all 0.2s !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn.btn-primary:hover,
a.btn-primary:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  color: white !important;
  box-shadow: 0 0 0 0.2rem rgba(221, 242, 235, 0.35) !important; /* unified highlight */
}

/* CTA: make only the Explore the Collection button use #E05263 */
#cta a.btn.btn-primary,
#cta .btn.btn-primary {
  background-color: #E05263 !important;
  border-color: #E05263 !important;
}
#cta a.btn.btn-primary:hover,
#cta a.btn.btn-primary:focus,
#cta a.btn.btn-primary:active,
#cta .btn.btn-primary:hover,
#cta .btn.btn-primary:focus,
#cta .btn.btn-primary:active {
  background-color: #cc4959 !important; /* a touch darker for hover */
  border-color: #cc4959 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(224, 82, 99, 0.25) !important;
}

.btn-lg,
.btn-large {
  padding: 0.75rem 2rem !important;
  font-size: 1rem !important;
}

/* Narrower hero primary button */
.hero .btn-large {
  padding: 0.6rem 1.25rem !important; /* reduce horizontal padding */
  font-size: 0.95rem !important;
}

/* Override Bootstrap background utilities */
.bg-light,
.bg-light *,
section.bg-light {
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--indigo-50) 100%) !important;
}

/* Force Template body background */
body,
#page-wrapper {
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--indigo-50) 100%) !important;
  min-height: 100vh !important;
}

/* Override ALL heading styles */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.hero-title {
  color: var(--gray-900) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-weight: bold !important;
}

/* Template hero section styling */
.hero,
section.hero,
.full-height-hero {
  position: relative !important;
  padding: 3rem 0 !important;
  overflow: hidden !important;
  background-color: #BFDBF7 !important;
  background-image: none !important;
}

/* Featured Products: make card action buttons smaller */
#featured-products .who-card .btn,
#featured-products .who-card .btn.btn-sm {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
  border-radius: 0.3rem !important;
}

#featured-products .who-card .btn i {
  font-size: 0.9em !important;
}

@media (min-width: 768px) {
  .hero,
  section.hero,
  .full-height-hero {
    padding: 5rem 0 !important;
  }

/* Hero 3D visual should not be constrained by grid column sizing */
.hero { position: relative !important; }
.hero-visual {
  position: relative !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: flex !important;
  height: 70vh !important;
  width: 100% !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding-right: 1rem !important; /* small breathing room from edge */
}

/* Make 3D container/canvas fill the hero-visual container (desktop/tablet) */
#3dContainer { height: 100vh !important; width: 100% !important; }
#tumbler-canvas { height: 100vh !important; width: 100% !important; display: block !important; }
}

/* Ensure hero section fills viewport height; 3D area is responsive */
.hero,
section.hero {
  min-height: 100vh !important;
}

/* Mobile-first: container and canvas take full width and a stable height */
#3dContainer,
#tumbler-canvas {
  width: 100% !important;
  height: 100vh !important; /* avoids extreme aspect ratios on mobile */
  display: block !important;
}

@media (min-width: 768px) {
  /* On larger screens, let them follow the hero-visual (100% of its size) */
  #3dContainer,
  #tumbler-canvas {
    height: 100vh !important;
  }
}

.hero-content {
  display: grid !important;
  gap: 2rem !important;
  align-items: center !important;
}

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr 1fr !important;
    gap: 3rem !important;
  }
}

.hero-title {
  font-size: 1.875rem !important;
  font-weight: bold !important;
  line-height: 1.2 !important;
  margin-bottom: 1.5rem !important;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.5rem !important;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3rem !important;
  }
}

.hero-description {
  font-size: 1rem !important;
  color: var(--gray-600) !important;
  line-height: 1.7 !important;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.125rem !important;
  }
}

/* Override Bootstrap container */
.container,
.container-fluid {
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 0 1rem !important;
}

/* Increase side margins on tablet */
@media (max-width: 991.98px) {
  .container,
  .container-fluid {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

/* Increase side margins on mobile */
@media (max-width: 575.98px) {
  .container,
  .container-fluid {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/* Template card styles */
.card {
  border: 1px solid #DDF2EB !important; /* unified highlight/outline */
  border-radius: 0.5rem !important;
  background: white !important;
  transition: box-shadow 0.2s !important;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Header: transparent grey frosted glass across all pages */
.header {
  background: rgba(107, 114, 128, 0.32) !important; /* grey-500 with transparency */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  /* subtle drop shadow below header */
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.15) !important;
}

/* Ensure we beat any background images/colors coming later */
header.header {
  /* keep rgba from .header so blur remains visible */
  background-image: none !important;    /* cancel out template bg images */
}

/* Footer: force solid background color to #011627 (override Bootstrap bg-dark) */
#tempaltemo_footer,
#tempaltemo_footer.bg-dark {
  background-color: #011627 !important;
  background-image: none !important;
}

/* Responsive Navigation (Hamburger) */
.mobile-menu-toggle {
  display: none; /* shown on tablet/mobile via media query */
  background: transparent;
  border: 0;
  padding: 8px;
  margin-left: 8px;
  border-radius: 8px;
  cursor: pointer;
}
.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #111827;
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.header .mobile-menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header .mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
.header .mobile-menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav panel (hidden by default) */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  padding: 16px 24px; /* increase side padding */
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 1000;
}
.mobile-nav.open { display: block; }
.mobile-nav .mobile-nav-link,
.mobile-nav .mobile-cta {
  display: block;
  padding: 12px 12px; /* increase inner padding */
  margin: 0 10px;     /* add horizontal margin */
  color: #111827;
  text-decoration: none;
}
.mobile-nav .mobile-nav-link:hover { background: #f3f4f6; border-radius: 8px; }
.mobile-nav .mobile-cta { margin-top: 8px; }

/* Give the search block equal side margins */
.mobile-nav .mobile-search { margin: 8px 10px; }
.mobile-nav .mobile-search .input-group { width: 100%; }

/* Extra comfy padding on small phones */
@media (max-width: 575.98px) {
  .mobile-nav { padding-left: 20px; padding-right: 20px; }
}

/* Tablet/Mobile breakpoint behavior */
@media (max-width: 991.98px) {
  .header .nav { display: none !important; }
  .header .mobile-menu-toggle { display: inline-block !important; }
  /* keep header-actions but allow wrapping */
  .header .header-actions { gap: 8px; }
  /* Show only the cart in header-actions */
  .header .header-actions > * { display: none !important; }
  .header .header-actions > .cart-link { display: inline-flex !important; align-items: center; }
  .header { position: sticky; top: 0; z-index: 1020; }
}
