:root {
  /* Pink/Magenta Theme - Light Mode - Based on logo color #fb8de4 */
  --primary-color: #fb8de4; /* Main logo pink */
  --primary-dark: #e063c7; /* Darker pink for hover states */
  --primary-light: #fdb1eb; /* Lighter pink for subtle accents */
  --primary-accent: #f570d8; /* Medium pink for highlights */
  
  /* Complementary Colors */
  --secondary-color: #8de4fb; /* Complementary cyan-blue */
  --secondary-dark: #63c7e0; /* Darker cyan */
  --secondary-light: #b1ebfd; /* Lighter cyan */
  
  /* Neutral Colors - Light Mode */
  --background-color: #ffffff;
  --surface-color: #f8f9fa;
  --card-background: #ffffff;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;
  --border-color: #dee2e6;
  --border-light: #f1f3f4;
  
  /* Interactive Elements */
  --link-color: #fb8de4;
  --link-hover: #e063c7;
  --button-primary: var(--primary-color);
  --button-primary-hover: var(--primary-dark);
  --button-secondary: var(--secondary-color);
  --button-secondary-hover: var(--secondary-dark);
  
  /* Status Colors */
  --success-color: #d4edda;
  --success-text: #155724;
  --warning-color: #fff3cd;
  --warning-text: #856404;
  --danger-color: #f8d7da;
  --danger-text: #721c24;
  --info-color: #d1ecf1;
  --info-text: #0c5460;
  
  /* Shadows and Effects */
  --shadow-light: 0 0.125rem 0.25rem rgba(251, 141, 228, 0.075);
  --shadow-medium: 0 0.5rem 1rem rgba(251, 141, 228, 0.15);
  --shadow-large: 0 1rem 3rem rgba(251, 141, 228, 0.175);
  --shadow-hover: 0 0.5rem 1.5rem rgba(251, 141, 228, 0.2);
}

[data-theme="dark"] {
  /* Pink/Magenta Theme - Dark Mode - Adjusted for better contrast */
  --primary-color: #e063c7; /* Slightly darker pink for dark mode */
  --primary-dark: #c94aa3; /* Darker pink for hover states */
  --primary-light: #fb8de4; /* Brighter pink for accents */
  --primary-accent: #f570d8; /* Medium pink for highlights */
  
  /* Complementary Colors */
  --secondary-color: #63c7e0; /* Complementary cyan for dark mode */
  --secondary-dark: #4aa3c9; /* Darker cyan */
  --secondary-light: #8de4fb; /* Brighter cyan for accents */
  
  /* Neutral Colors - Dark Mode */
  --background-color: #1a1a1a;
  --surface-color: #2d2d2d;
  --card-background: #333333;
  --text-primary: #e9ecef;
  --text-secondary: #adb5bd;
  --text-muted: #6c757d;
  --border-color: #495057;
  --border-light: #404040;
  
  /* Interactive Elements */
  --link-color: #fb8de4;
  --link-hover: #fdb1eb;
  --button-primary: var(--primary-color);
  --button-primary-hover: var(--primary-light);
  --button-secondary: var(--secondary-color);
  --button-secondary-hover: var(--secondary-light);
  
  /* Status Colors - Dark Mode Variants */
  --success-color: #1e3a2e;
  --success-text: #75b798;
  --warning-color: #3d2914;
  --warning-text: #ffda6a;
  --danger-color: #3d1a1e;
  --danger-text: #ff6b6b;
  --info-color: #1a2e3d;
  --info-text: #6bb6ff;
  
  /* Shadows and Effects - Dark Mode */
  --shadow-light: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
  --shadow-large: 0 1rem 3rem rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
}

html {
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
  height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Fix the flexbox layout for proper footer positioning */
body {
  background-color: var(--background-color);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh !important;
  height: 100vh;
  display: flex !important;
  flex-direction: column !important;
  margin: 0;
  padding: 0;
}

/* Header should not grow or shrink */
header {
  flex: 0 0 auto !important;
}

/* Main content should fill available space */
main {
  flex: 1 1 auto !important;
  overflow-y: auto;
  min-height: 0;
}

/* Override any Bootstrap flex classes on main */
main.flex-grow-1 {
  flex: 1 1 auto !important;
}

main.container-fluid {
  flex: 1 1 auto !important;
}

/* Footer should stick to bottom */
footer.footer {
  flex: 0 0 auto !important;
  margin-top: 0 !important;
}

/* Reset container-fluid to not interfere with flexbox */
.container-fluid {
  max-width: 100%;
  padding-left: 8px;
  padding-right: 8px;
  height: auto;
}

/* Product Carousel - 50% width constraint */
#productCarousel {
  max-width: 50%;
  margin: 0 auto; /* Center the carousel */
}

/* Product Image Square Containers */
.product-image-square {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Perfect square aspect ratio */
  max-height: 400px; /* Add maximum height constraint */
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: var(--surface-color);
  box-shadow: var(--shadow-light);
  cursor: zoom-in;
}

.product-detail-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from cover to contain to show entire image */
  transition: opacity 0.3s ease;
}

.product-detail-image:hover {
  opacity: 0.95;
}

/* Responsive carousel sizing - maintain 50% width with adjustments for mobile */
@media (max-width: 575px) {
  #productCarousel {
    max-width: 70%; /* Slightly larger on mobile for better visibility */
  }
  
  .product-image-square {
    padding-bottom: 100%; /* Perfect square on mobile */
    max-height: 280px; /* Smaller max height on mobile */
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  #productCarousel {
    max-width: 60%; /* Slightly larger on small tablets */
  }
  
  .product-image-square {
    padding-bottom: 100%; /* Perfect square */
    max-height: 320px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  #productCarousel {
    max-width: 55%; /* Gradually reduce to 50% */
  }
  
  .product-image-square {
    padding-bottom: 100%; /* Perfect square */
    max-height: 360px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  #productCarousel {
    max-width: 50%; /* Target 50% width */
  }
  
  .product-image-square {
    padding-bottom: 100%; /* Perfect square */
    max-height: 380px;
  }
}

@media (min-width: 1200px) {
  #productCarousel {
    max-width: 50%; /* Target 50% width */
  }
  
  .product-image-square {
    padding-bottom: 100%; /* Perfect square */
    max-height: 400px; /* Maximum height to prevent oversized images */
  }
}

/* Add specific styling for product details page to ensure proper layout */
.product-details .product-image-square {
  margin-bottom: 1rem; /* Ensure space between main image and thumbnails */
}

/* Carousel controls optimized for centered 50% width carousel */
#productCarousel .carousel-control-prev,
#productCarousel .carousel-control-next {
  width: 8%; /* Slightly larger controls for better visibility */
  opacity: 0.7;
}

#productCarousel .carousel-control-prev:hover,
#productCarousel .carousel-control-next:hover {
  opacity: 1;
}

/* Carousel indicators optimized for centered layout */
#productCarousel .carousel-indicators {
  margin-bottom: 0.5rem;
}

#productCarousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 4px;
}

/* Enhanced thumbnail grid spacing for better layout with centered carousel - made smaller */
.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); /* Reduced from 60px to 40px */
  gap: 0.25rem; /* Reduced gap */
  margin-top: 1rem; /* Reduced margin */
  max-width: 30%; /* Reduced from 50% to 30% */
  margin-left: auto;
  margin-right: auto; /* Center thumbnails below carousel */
}

@media (max-width: 575px) {
  .thumbnail-grid {
    max-width: 50%; /* Reduced from 70% to 50% on mobile */
    grid-template-columns: repeat(auto-fit, minmax(35px, 1fr)); /* Smaller on mobile */
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .thumbnail-grid {
    grid-template-columns: repeat(auto-fit, minmax(45px, 1fr)); /* Reduced from 70px to 45px */
    gap: 0.3rem;
    margin-top: 1rem;
    max-width: 40%; /* Reduced from 60% to 40% */
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .thumbnail-grid {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr)); /* Reduced from 80px to 50px */
    gap: 0.4rem;
    margin-top: 1rem;
    max-width: 35%; /* Reduced from 55% to 35% */
  }
}

@media (min-width: 992px) {
  .thumbnail-grid {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr)); /* Reduced from 90px to 50px */
    margin-top: 1rem;
    max-width: 30%; /* Reduced from 50% to 30% */
  }
}

/* Thumbnail Square Containers - made smaller */
.thumbnail-square {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Keep 1:1 aspect ratio */
  overflow: hidden;
  border-radius: 0.25rem; /* Slightly smaller border radius */
  cursor: pointer;
  border: 2px solid transparent;
  background-color: var(--surface-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumbnail-square:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-medium);
}

.thumbnail-square.active {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-hover);
}

.thumbnail-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from cover to contain to show full thumbnail */
  transition: none; /* Removed transform animation to prevent spasming */
}

/* Thumbnail More Indicator */
.thumbnail-more {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  border-radius: 0.25rem; /* Smaller border radius to match thumbnails */
  background-color: var(--surface-color);
  border: 2px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem; /* Smaller font size */
}

.thumbnail-more span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* No Image Placeholder */
.no-image-placeholder {
  background: linear-gradient(135deg, var(--surface-color) 0%, var(--border-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.no-image-content {
  text-align: center;
  color: var(--text-muted);
}

.no-image-content i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .no-image-content i {
    font-size: 4rem;
  }
}

@media (min-width: 992px) {
  .no-image-content i {
    font-size: 5rem;
  }
}

.no-image-content p {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .no-image-content p {
    font-size: 1rem;
  }
}

/* Hero Section Styles */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
}

.hero-decoration {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.hero-decoration-1 {
    top: 10%;
    left: 10%;
    width: 100px;
    height: 100px;
    background: var(--primary-accent);
    animation-duration: 6s;
}

.hero-decoration-2 {
    top: 20%;
    right: 15%;
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    opacity: 0.4;
    animation-duration: 8s;
    animation-direction: reverse;
}

.hero-decoration-3 {
    bottom: 15%;
    left: 20%;
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    opacity: 0.2;
    animation-duration: 7s;
}

.hero-icon {
    font-size: 4rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: block;
}

/* Ensure Bootstrap Icons in hero section are properly sized */
.hero-section .bi {
    font-size: inherit;
}

/* Specific sizing for different hero icons */
.hero-section .bi-flower1 {
    font-size: 4rem;
}

.hero-section .bi-calendar-event {
    font-size: 1.5rem;
}

.hero-title {
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    color: var(--text-primary);
    font-size: 1.5rem;
}

.hero-card {
    max-width: 500px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-large);
    animation: fadeInUp 1s ease-out;
}

[data-theme="dark"] .hero-card {
    background: rgba(51,51,51,0.9);
}

.countdown-item {
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
}

.countdown-number {
    transition: transform 0.2s ease;
}

.features-section {
    background-color: var(--surface-color);
}

.feature-card {
    background: var(--card-background);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--primary-color);
  border: 2px solid var(--primary-dark);
  color: var(--text-primary) !important;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: var(--text-primary) !important;
}

.theme-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem var(--primary-accent);
  color: var(--text-primary) !important;
}

/* Theme toggle icon and text - preserve sizing */
.theme-toggle .icon:not(.bi),
.theme-toggle svg {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
    color: var(--text-primary) !important;
    width: 1em !important;
    height: 1em !important;
}

.theme-toggle .bi {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    width: auto !important;
    height: auto !important;
}

.theme-toggle #theme-text {
    color: var(--text-primary) !important;
    font-size: inherit !important;
}

.theme-toggle:hover .icon:not(.bi),
.theme-toggle:hover svg {
    transform: rotate(180deg);
    color: var(--text-primary) !important;
}

.theme-toggle:hover .bi {
    transform: rotate(180deg);
    color: var(--text-primary) !important;
    font-size: 1rem !important;
}

/* Dark mode specific theme toggle */
[data-bs-theme="dark"] .theme-toggle,
[data-theme="dark"] .theme-toggle {
  background: var(--primary-color);
  border-color: var(--primary-dark);
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .theme-toggle:hover,
[data-theme="dark"] .theme-toggle:hover {
  background: var(--primary-light);
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .theme-toggle .icon,
[data-bs-theme="dark"] .theme-toggle .bi,
[data-bs-theme="dark"] .theme-toggle #theme-text,
[data-theme="dark"] .theme-toggle .icon,
[data-theme="dark"] .theme-toggle .bi,
[data-theme="dark"] .theme-toggle #theme-text {
  color: var(--text-primary) !important;
}

/* Special styling for theme toggle in navbar */
.navbar .theme-toggle {
  margin-left: 1rem;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
}

/* Navigation Theming */
.navbar {
  background-color: var(--card-background) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
}

.navbar-brand {
  color: var(--primary-color) !important;
  font-weight: 600;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.navbar-brand:hover {
  color: var(--primary-dark) !important;
}

/* Navbar logo styling */
.navbar-logo {
  border-radius: 4px;
  transition: opacity 0.3s ease;
  object-fit: contain;
}

.navbar-brand:hover .navbar-logo {
  opacity: 0.9;
}

/* Navigation links - ensure proper contrast in both themes */
.nav-link {
  color: var(--text-primary) !important;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--link-color) !important;
}

/* Ensure SVG icons in navbar are properly colored */
.navbar .icon {
  color: var(--text-primary) !important;
  fill: var(--text-primary) !important;
}

/* Ensure Bootstrap icons in navbar are properly colored */
.navbar .bi {
  color: var(--text-primary) !important;
}

/* Dark mode specific navbar fixes */
[data-bs-theme="dark"] .navbar,
[data-theme="dark"] .navbar {
  background-color: var(--card-background) !important;
}

[data-bs-theme="dark"] .navbar-brand,
[data-theme="dark"] .navbar-brand {
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .nav-link,
[data-theme="dark"] .nav-link {
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .navbar .icon,
[data-theme="dark"] .navbar .icon {
  color: var(--text-primary) !important;
  fill: var(--text-primary) !important;
}

[data-bs-theme="dark"] .navbar .bi,
[data-theme="dark"] .navbar .bi {
  color: var(--text-primary) !important;
}

/* Dark theme adjustments */
[data-theme="dark"] .admin-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

/* Dark mode comprehensive navbar overrides */
[data-bs-theme="dark"] .navbar-brand,
[data-bs-theme="dark"] .navbar-brand,
body[data-bs-theme="dark"] .navbar-brand,
body[data-theme="dark"] .navbar-brand {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .nav-link,
[data-bs-theme="dark"] .nav-link,
body[data-bs-theme="dark"] .nav-link,
body[data-theme="dark"] .nav-link {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .navbar .icon,
[data-bs-theme="dark"] .navbar .icon,
body[data-bs-theme="dark"] .navbar .icon,
body[data-theme="dark"] .navbar .icon {
    color: #ffffff !important;
    fill: #ffffff !important;
}

[data-bs-theme="dark"] .navbar .bi,
[data-bs-theme="dark"] .navbar .bi,
body[data-xs-theme="dark"] .navbar .bi,
body[data-theme="dark"] .navbar .bi {
    color: #ffffff !important;
}

/* Strong tag in nav links for admin */
[data-bs-theme="dark"] .nav-link strong,
[data-theme="dark"] .nav-link strong,
body[data-bs-theme="dark"] .nav-link strong,
body[data-theme="dark"] .nav-link strong {
    color: #ffffff !important;
}

/* Ensure theme toggle text is visible */
[data-bs-theme="dark"] .theme-toggle,
[data-theme="dark"] .theme-toggle,
body[data-bs-theme="dark"] .theme-toggle,
body[data-theme="dark"] .theme-toggle {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .theme-toggle #theme-text,
[data-theme="dark"] .theme-toggle #theme-text,
body[data-bs-theme="dark"] .theme-toggle #theme-text,
body[data-theme="dark"] .theme-toggle #theme-text {
    color: #ffffff !important;
}

/* Force white text in navbar for dark mode - but preserve sizing */
[data-bs-theme="dark"] .navbar .navbar-brand,
[data-bs-theme="dark"] .navbar .nav-link,
[data-bs-theme="dark"] .navbar .navbar-text,
[data-bs-theme="dark"] .navbar span,
[data-bs-theme="dark"] .navbar strong,
[data-theme="dark"] .navbar .navbar-brand,
[data-theme="dark"] .navbar .nav-link,
[data-theme="dark"] .navbar .navbar-text,
[data-theme="dark"] .navbar span,
[data-theme="dark"] .navbar strong {
    color: #ffffff !important;
}

/* Exclude form elements and buttons from the text color rules */
[data-bs-theme="dark"] .navbar input,
[data-bs-theme="dark"] .navbar button,
[data-bs-theme="dark"] .navbar select,
[data-bs-theme="dark"] .navbar textarea,
[data-theme="dark"] .navbar input,
[data-theme="dark"] .navbar button,
[data-theme="dark"] .navbar select,
[data-theme="dark"] .navbar textarea {
    color: var(--text-primary) !important;
}

/* SVG icons and Bootstrap icons in navbar - only color, not size */
[data-bs-theme="dark"] .navbar svg,
[data-bs-theme="dark"] .navbar .icon,
[data-theme="dark"] .navbar svg,
[data-theme="dark"] .navbar .icon {
    color: #ffffff !important;
    fill: #ffffff !important;
    /* Preserve original sizes */
    width: inherit;
    height: inherit;
    font-size: inherit;
}

/* Bootstrap icons specific - only color, preserve font-size */
[data-bs-theme="dark"] .navbar .bi,
[data-theme="dark"] .navbar .bi {
    color: #ffffff !important;
    /* Do not override size properties */
    width: auto !important;
    height: auto !important;
    font-size: inherit !important;
}

/* Cart price and count */
[data-bs-theme="dark"] .navbar .cart-price,
[data-theme="dark"] .navbar .cart-price {
    color: #ffffff !important;
}

/* Bootstrap navbar specific classes */
[data-bs-theme="dark"] .navbar-light .navbar-brand,
[data-bs-theme="dark"] .navbar-light .navbar-nav .nav-link,
[data-theme="dark"] .navbar-light .navbar-brand,
[data-theme="dark"] .navbar-light .navbar-nav .nav-link {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .navbar-light .navbar-brand:hover,
[data-bs-theme="dark"] .navbar-light .navbar-nav .nav-link:hover,
[data-theme="dark"] .navbar-light .navbar-brand:hover,
[data-theme="dark"] .navbar-light .navbar-nav .nav-link:hover {
    color: #e0e0e0 !important;
}

/* Bootstrap Icons Default Sizing and Reset - High Priority */
.bi {
    width: auto !important;
    height: auto !important;
    fill: none !important;
    font-size: 1rem !important; /* Default reasonable size */
    line-height: 1 !important;
    vertical-align: -.125em !important;
}

/* Prevent SVG icon styles from affecting Bootstrap Icons */
.bi::before {
    font-family: "bootstrap-icons" !important;
    font-style: normal !important;
    font-weight: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1 !important;
    vertical-align: -.125em !important;
}

/* Ensure navbar Bootstrap icons stay reasonable size */
.navbar .bi {
    font-size: 1rem !important;
    width: auto !important;
    height: auto !important;
}

/* Hero section icons - explicit sizing */
.hero-section .bi-flower1 {
    font-size: 4rem !important;
    width: auto !important;
    height: auto !important;
}

.hero-section .bi-calendar-event {
    font-size: 1.5rem !important;
    width: auto !important;
    height: auto !important;
}

/* Icon System - SVG Icons with Theme Support - Exclude Bootstrap Icons */
.icon:not(.bi) {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
    transition: all 0.3s ease;
}

/* Icon sizes - only apply to SVG icons, not Bootstrap icons */
.icon-xs:not(.bi) { width: 0.75em; height: 0.75em; }
.icon-sm:not(.bi) { width: 0.875em; height: 0.875em; }
.icon-lg:not(.bi) { width: 1.25em; height: 1.25em; }
.icon-xl:not(.bi) { width: 1.5em; height: 1.5em; }
.icon-2x:not(.bi) { width: 2em; height: 2em; }
.icon-3x:not(.bi) { width: 3em; height: 3em; }
.icon-4x:not(.bi) { width: 4em; height: 4em; }
.icon-5x:not(.bi) { width: 5em; height: 5em; }

/* Navbar SVG icon sizing - very specific to avoid affecting admin pages */
nav.navbar .navbar-nav .nav-link svg.icon,
nav.navbar .theme-toggle svg.icon,
nav.navbar .nav-link svg.icon {
    width: 1rem !important;
    height: 1rem !important;
}

/* Footer SVG icon sizing */
footer.footer svg.icon {
    width: 1rem !important;
    height: 1rem !important;
}

/* COMPREHENSIVE DARK MODE FIX - GLOBAL OVERRIDE */
[data-bs-theme="dark"],
[data-theme="dark"],
html[data-bs-theme="dark"],
html[data-theme="dark"],
body[data-bs-theme="dark"],
body[data-theme="dark"] {
    --text-primary: #ffffff !important;
    --text-secondary: #adb5bd !important;
    --text-muted: #6c757d !important;
    --background-color: #1a1a1a !important;
    --surface-color: #2d2d2d !important;
    --card-background: #333333 !important;
    --border-color: #495057 !important;
}

/* Force dark mode text colors globally */
[data-bs-theme="dark"] * {
    color: #ffffff !important;
}

[data-theme="dark"] * {
    color: #ffffff !important;
}

/* Exclude form elements, buttons, and special elements from global white text */
[data-bs-theme="dark"] input,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] .btn,
[data-bs-theme="dark"] .badge,
[data-bs-theme="dark"] .alert,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .btn,
[data-theme="dark"] .badge,
[data-theme="dark"] .alert {
    color: var(--text-primary) !important;
}

/* Dark mode backgrounds */
[data-bs-theme="dark"] body,
[data-theme="dark"] body {
    background-color: var(--background-color) !important;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .navbar,
[data-theme="dark"] .card,
[data-theme="dark"] .table,
[data-theme="dark"] .navbar {
    background-color: var(--card-background) !important;
}

/* Navbar specific dark mode fixes */
[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] .navbar * {
    color: #ffffff !important;
    background-color: var(--card-background) !important;
}

/* Admin pages specific fixes */
[data-bs-theme="dark"] .admin-header,
[data-theme="dark"] .admin-header {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .user-email-cell,
[data-bs-theme="dark"] .user-email-cell *,
[data-theme="dark"] .user-email-cell,
[data-theme="dark"] .user-email-cell * {
    color: #ffffff !important;
}

/* Table fixes for dark mode */
[data-bs-theme="dark"] .table tbody tr td,
[data-bs-theme="dark"] .table thead tr th,
[data-theme="dark"] .table tbody tr td,
[data-theme="dark"] .table thead tr th {
    color: #ffffff !important;
    background-color: var(--card-background) !important;
}

[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd) td,
[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) td {
    background-color: var(--surface-color) !important;
    color: #ffffff !important;
}

/* Form controls in dark mode */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--card-background) !important;
    color: #ffffff !important;
    border-color: var(--border-color) !important;
}

/* Breadcrumb in dark mode */
[data-bs-theme="dark"] .breadcrumb,
[data-theme="dark"] .breadcrumb {
    background-color: var(--surface-color) !important;
}

[data-bs-theme="dark"] .breadcrumb-item,
[data-bs-theme="dark"] .breadcrumb-item a,
[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .breadcrumb-item a {
    color: #ffffff !important;
}

/* List group fixes for dark mode */
[data-bs-theme="dark"] .list-group,
[data-theme="dark"] .list-group {
    background-color: var(--card-background) !important;
}

[data-bs-theme="dark"] .list-group-item,
[data-theme="dark"] .list-group-item {
    background-color: var(--card-background) !important;
    color: #ffffff !important;
    border-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .list-group-item-action,
[data-theme="dark"] .list-group-item-action {
    background-color: var(--card-background) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .list-group-item-action:hover,
[data-bs-theme="dark"] .list-group-item-action:focus,
[data-theme="dark"] .list-group-item-action:hover,
[data-theme="dark"] .list-group-item-action:focus {
    background-color: var(--surface-color) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .list-group-flush .list-group-item,
[data-theme="dark"] .list-group-flush .list-group-item {
    background-color: var(--card-background) !important;
    color: #ffffff !important;
    border-color: var(--border-color) !important;
}

/* List group text content */
[data-bs-theme="dark"] .list-group-item .fw-medium,
[data-bs-theme="dark"] .list-group-item small,
[data-bs-theme="dark"] .list-group-item .text-muted,
[data-theme="dark"] .list-group-item .fw-medium,
[data-theme="dark"] .list-group-item small,
[data-theme="dark"] .list-group-item .text-muted {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .list-group-item .text-muted,
[data-theme="dark"] .list-group-item .text-muted {
    color: #adb5bd !important;
}

/* TARGETED DARK MODE FIX - ONLY Admin/Files dropdowns - NO OTHER CHANGES */

/* File Type dropdown select - ONLY this specific element */
[data-bs-theme="dark"] .form-select,
[data-theme="dark"] .form-select {
    background-color: #333333 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    border-color: #495057 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .form-select option,
[data-theme="dark"] .form-select option {
    background-color: #333333 !important;
    color: #ffffff !important;
}

/* Dropdown menus - ONLY the actual dropdown menus */
[data-bs-theme="dark"] .dropdown-menu,
[data-theme="dark"] .dropdown-menu {
    background-color: #333333 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .dropdown-item,
[data-theme="dark"] .dropdown-item {
    color: #ffffff !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus,
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .dropdown-divider,
[data-theme="dark"] .dropdown-divider {
    border-color: #495057 !important;
}

/* ALERT MESSAGE FIXES - Make error messages readable in dark mode */
[data-bs-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-danger {
    background-color: #8B0000 !important; /* Dark red background */
    color: #ffffff !important; /* White text */
    border-color: #DC143C !important; /* Slightly lighter red border */
}

[data-bs-theme="dark"] .alert-success,
[data-theme="dark"] .alert-success {
    background-color: #006400 !important; /* Dark green background */
    color: #ffffff !important; /* White text */
    border-color: #228B22 !important; /* Slightly lighter green border */
}

[data-bs-theme="dark"] .alert-warning,
[data-theme="dark"] .alert-warning {
    background-color: #FF8C00 !important; /* Dark orange background */
    color: #000000 !important; /* Black text for contrast */
    border-color: #FFA500 !important; /* Orange border */
}

[data-bs-theme="dark"] .alert-info,
[data-theme="dark"] .alert-info {
    background-color: #4682B4 !important; /* Steel blue background */
    color: #ffffff !important; /* White text */
    border-color: #87CEEB !important; /* Sky blue border */
}}