/* MODERN TOP NAVIGATION FIXES */
.header-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex: 1 1 auto !important;
  margin-left: 40px !important;
  margin-right: 20px !important;
  min-width: 0 !important;
}
.nav-list {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.nav-list li {
  margin: 0 !important;
}
.cta {
  display: flex !important;
  align-items: center !important;
  gap: 0.5em !important;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%) !important;
  color: white !important;
  text-decoration: none !important;
  padding: 10px 18px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
}
.cta:hover,
.cta:focus {
  background: linear-gradient(135deg, #357abd 0%, #2e6ba8 100%) !important;
  color: #fff !important;
  outline: 2px solid #4a90e2 !important;
}
@media (max-width: 1100px) {
  .header-nav {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }
  .nav-list {
    gap: 0.25rem !important;
  }
  .cta {
    padding: 8px 10px !important;
    font-size: 0.95rem !important;
  }
}
@media (max-width: 800px) {
  .header-nav {
    flex-direction: column !important;
    align-items: flex-end !important;
    margin: 0 !important;
  }
  .nav-list {
    flex-direction: column !important;
    align-items: flex-end !important;
    width: 100% !important;
  }
  .cta {
    width: 100% !important;
    justify-content: flex-start !important;
    margin-bottom: 4px !important;
  }
}
/* UNIVERSAL DALCART WEBSITE TEMPLATE STYLES */
/* Applied to ALL pages for uniform styling and professional appearance */

/* RESET AND BASE STYLES */
* {
  box-sizing: border-box !important;
}

html,
body {
  margin: 0 !important;
  padding: 0 !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  background: #f8f9fa !important;
  scroll-behavior: smooth !important;
}

/* HEADER FIXES - UNIFORM ACROSS ALL PAGES */
/* Apply legacy fixed header styling only when not using the new unified header */
.header:not(.dalcart-unified-header) {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
  background: linear-gradient(90deg, #1a2633 60%, #4a90e2 100%) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
  padding: 0 !important;
  height: 120px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.branding {
  display: flex !important;
  align-items: center !important;
  padding: 15px 20px !important;
  gap: 15px !important;
}

.branding img {
  width: 60px !important;
  height: 60px !important;
  border-radius: 8px !important;
  object-fit: cover !important;
}

.brand-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0 !important;
}

.brand-tagline {
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 !important;
}

/* HEADER ACTIONS AND NAVIGATION */
.actions {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
  padding: 15px 20px !important;
  margin-left: auto !important;
}

.menu-toggle {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-size: 16px !important;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

.cta {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%) !important;
  color: white !important;
  text-decoration: none !important;
  padding: 10px 20px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.cta:hover {
  background: linear-gradient(135deg, #357abd 0%, #2e6ba8 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* MAIN CONTENT FIXES - UNIFORM SPACING */
.main {
  margin-top: 120px !important;
  padding: 30px !important;
  min-height: calc(100vh - 120px) !important;
  background: #f8f9fa !important;
  max-width: 1600px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
}

/* When the unified header is injected, prefer its computed height for body offset */
:root {
  --header-height: 64px; /* default for unified header */
}
body[data-header-ready="1"] {
  padding-top: var(--header-height, 64px) !important;
}

/* When unified header is present, remove legacy main offset and compute height from variable */
body[data-header-ready="1"] .main {
  margin-top: 0 !important;
  min-height: calc(100vh - var(--header-height, 64px)) !important;
}

/* Utility to hide legacy stubs reliably */
.d-none {
  display: none !important;
}

/* CONTENT CENTERING AND ALIGNMENT */
.layout {
  width: 100% !important;
}

.main-content-wrapper {
  max-width: 1600px !important; /* widened */
  margin: 0 auto !important;
  width: 100% !important;
}

/* CENTERED HERO SECTIONS */
.hero-content {
  max-width: 800px !important;
  margin: 0 auto !important;
  text-align: center !important;
}

/* CENTERED CARD LAYOUTS */
.card-row {
  max-width: 1400px !important;
  margin: 30px auto !important;
}

/* ENHANCEMENT POPUP - IMPROVED FUNCTIONALITY */
.enhancement-notice {
  position: fixed !important;
  top: 140px !important;
  right: 24px !important;
  z-index: 999 !important;
}

.notice-btn {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%) !important;
  color: white !important;
  border: none !important;
  padding: 12px 18px !important;
  border-radius: 25px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3) !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
}

.notice-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4) !important;
}

.enhancement-popup {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.7) !important;
  z-index: 10001 !important; /* below ticker (10002) */
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
}

.popup-content {
  background: white !important;
  border-radius: 15px !important;
  padding: 25px !important;
  max-width: 500px !important;
  width: 90% !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
  position: relative !important;
}

.popup-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 15px !important;
  border-bottom: 2px solid #f0f0f0 !important;
  padding-bottom: 15px !important;
}

.popup-header h3 {
  margin: 0 !important;
  color: #25383c !important;
  font-size: 20px !important;
  font-weight: 700 !important;
}

.popup-close {
  background: none !important;
  border: none !important;
  font-size: 28px !important;
  cursor: pointer !important;
  color: #666 !important;
  padding: 0 !important;
  width: 35px !important;
  height: 35px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
}

.popup-close:hover {
  background: #f0f0f0 !important;
  color: #333 !important;
}

/* CHATBOX FIXES - PROFESSIONAL AND CLEAN */
.kimberley-chat-button {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 9999 !important; /* below ticker */
  background: linear-gradient(135deg, #25383c 0%, #1a2b2f 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 30px !important;
  padding: 14px 22px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 6px 20px rgba(37, 56, 60, 0.3) !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  max-width: 220px !important;
  min-height: 52px !important;
  white-space: nowrap !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
}

.kimberley-chat-button:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(37, 56, 60, 0.4) !important;
  background: linear-gradient(135deg, #2d4247 0%, #1f3236 100%) !important;
}

.kimberley-chat-window {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 380px !important;
  height: 500px !important;
  z-index: 10000 !important; /* below ticker */
  background: white !important;
  border-radius: 15px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.kimberley-chat-window.hidden {
  display: none !important;
}

.chat-header {
  background: linear-gradient(135deg, #25383c 0%, #1a2b2f 100%) !important;
  color: white !important;
  padding: 15px 20px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.chat-messages {
  flex: 1 !important;
  padding: 15px !important;
  overflow-y: auto !important;
  background: #f9f9f9 !important;
}

.chat-input-form {
  padding: 15px !important;
  background: white !important;
  border-top: 1px solid #eee !important;
  display: flex !important;
  gap: 10px !important;
}

.chat-input {
  flex: 1 !important;
  padding: 10px 15px !important;
  border: 1px solid #ddd !important;
  border-radius: 20px !important;
  font-size: 14px !important;
  outline: none !important;
}

.chat-input:focus {
  border-color: #4a90e2 !important;
}

/* RESPONSIVE DESIGN - MOBILE COMPATIBILITY */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
  }

  .main {
    margin-left: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 20px 15px !important;
  }

  .main-content-wrapper {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .hero {
    padding: 30px 20px !important;
    margin-bottom: 30px !important;
  }

  .card-row {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    margin: 20px auto !important;
  }

  .header {
    padding: 0 15px !important;
  }

  .brand-title {
    font-size: 20px !important;
  }

  .kimberley-chat-button {
    bottom: 20px !important;
    right: 20px !important;
    max-width: 60px !important;
    border-radius: 50% !important;
    padding: 12px !important;
  }

  .kimberley-chat-button span {
    display: none !important;
  }

  .kimberley-chat-window {
    width: calc(100vw - 40px) !important;
    height: calc(100vh - 100px) !important;
    bottom: 20px !important;
    right: 20px !important;
  }

  .enhancement-notice {
    top: 130px !important;
    right: 15px !important;
  }
}

/* CARDS AND CONTENT STYLING */
.card-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 25px !important;
  margin: 30px 0 !important;
}

.card {
  background: white !important;
  padding: 25px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.3s ease !important;
  border: 1px solid #e9ecef !important;
}

.card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.card h3 {
  color: #25383c !important;
  margin-bottom: 15px !important;
  font-size: 20px !important;
  font-weight: 600 !important;
}

/* HERO SECTION STYLING */
.hero {
  background: linear-gradient(135deg, #25383c 0%, #4a90e2 100%) !important;
  color: white !important;
  padding: 50px 30px !important;
  border-radius: 15px !important;
  margin-bottom: 40px !important;
  text-align: center !important;
}

.hero h1 {
  font-size: 36px !important;
  font-weight: 700 !important;
  margin-bottom: 20px !important;
}

.hero p {
  font-size: 18px !important;
  opacity: 0.9 !important;
  max-width: 600px !important;
  margin: 0 auto !important;
}

/* FORMS STYLING */
.form-container {
  background: white !important;
  padding: 30px !important;
  border-radius: 15px !important;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
  margin: 20px 0 !important;
}

.form-group {
  margin-bottom: 20px !important;
}

.form-group label {
  display: block !important;
  margin-bottom: 8px !important;
  font-weight: 600 !important;
  color: #25383c !important;
}

/* ADDED FOR MOBILE: Hamburger menu, and sidebar slide-in/out */
.mobile-nav-toggle {
  display: none; /* Hidden by default */
  position: absolute;
  top: 40px;
  right: 20px;
  z-index: 1100;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1200; /* Ensure sidebar is on top of content */
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0 !important;
  }
  .mobile-nav-toggle {
    display: block; /* Visible on mobile */
  }
  body.nav-open .main {
    /* Optional: prevent interaction with main content when nav is open */
    pointer-events: none;
    opacity: 0.7;
  }
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100% !important;
  padding: 12px 15px !important;
  border: 2px solid #e9ecef !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  transition: border-color 0.3s ease !important;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #4a90e2 !important;
  outline: none !important;
}

/* BUTTONS STYLING */
.btn {
  padding: 12px 25px !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  display: inline-block !important;
}

.btn-primary {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%) !important;
  color: white !important;
}

.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3) !important;
}

/* FOOTER STYLING */
.footer {
  background: #25383c !important;
  color: white !important;
  padding: 40px 30px !important;
  margin-top: 50px !important;
  margin-left: 250px !important;
}

@media (max-width: 768px) {
  .footer {
    margin-left: 0 !important;
  }
}

/* SCROLLBAR STYLING */
::-webkit-scrollbar {
  width: 8px !important;
}

::-webkit-scrollbar-track {
  background: #f1f1f1 !important;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1 !important;
  border-radius: 4px !important;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8 !important;
}

/* ==== Mobile Navigation Enhancements (2025-09-10) ==== */
body.nav-open {
  overflow: hidden;
}
.mobile-nav-toggle {
  background: #004b8d;
  color: #fff;
  border: none;
  padding: 0.6rem 0.85rem;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  display: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.mobile-nav-toggle:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .mobile-nav-toggle {
    display: inline-block;
    margin-left: auto;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .layout {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    width: 260px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.35);
    background: #0c2238;
  }
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 900;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  header.header {
    position: sticky;
    top: 0;
    z-index: 1100;
  }
}
