  /* Professional CSV-Driven Catalog Styles with Enhanced Navigation */
/* ================================================================= */

/* CSS Custom Properties (Variables) */
:root {
  /* Light Color Palette */
  --color-white: #ffffff;
  --color-light-gray: #f8f9fa;
  --color-soft-gray: #f1f3f4;
  --color-medium-gray: #e8eaed;
  --color-border-light: #dadce0;
  --color-text-primary: #202124;
  --color-text-secondary: #5f6368;
  --color-text-muted: #9aa0a6;
  
  /* Dynamic Brand Colors (updated from CSV) */
--color-primary: #6366f1;
--color-accent: #8b5cf6;
--color-success: #10b981;
--color-warning: #f59e0b;
--color-error: #ef4444;

/* Ensure minimum contrast ratios for accessibility */
--color-primary-light: color-mix(in srgb, var(--color-primary) 80%, white);
--color-primary-dark: color-mix(in srgb, var(--color-primary) 60%, black);
--color-text-on-primary: white;
  
  /* Semantic Colors */
  --color-bg: var(--color-white);
  --color-surface: var(--color-light-gray);
  --color-surface-elevated: var(--color-white);
  --color-border: var(--color-border-light);
  --color-shadow: rgba(0, 0, 0, 0.1);
  --color-shadow-light: rgba(0, 0, 0, 0.05);
  --color-overlay: rgba(0, 0, 0, 0.4);
  
  /* Typography */
  --font-primary: 'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', serif;
  --font-heading: 'Poppins', sans-serif;
  
  /* Spacing Scale */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
/* ================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  padding-top: 60px; /* FIXED: Standardized desktop padding */
  font-family: var(--font-primary);
  color: var(--color-text-primary);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container System */
/* ================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
}

/* ADDED: Desktop header height specification */
@media (min-width: 769px) {
  .header-content {
    height: 60px;
  }
}

@media (min-width: 1200px) {
  .container {
    padding: 0 var(--space-8);
  }
}

/* Header Styles */
/* ============= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}
/* Collapsed state - hide entire header */
.header.collapsed {
  transform: translateY(-100%);
}
/* FIXED: Header content spacing */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px; /* FIXED: Updated base height */
  gap: var(--space-4);
  padding: 0 var(--space-4);
  max-width: 1200px;
  margin: 0 auto;
}

/* FIXED: Mobile responsive adjustments */
@media (max-width: 768px) {
  body {
    padding-top: 75px; /* FIXED: Increased mobile body padding */
  }
  
  .header-content {
    height: 70px; /* FIXED: Increased mobile header height */
  }
  
  .hero {
    padding: 120px var(--space-4) var(--space-6) var(--space-4); /* FIXED: Reduced top padding from 160px to 120px */
  }
  
  .hero-title {
    font-size: 2.2rem; /* Slightly smaller on mobile */
  }
  
  .breadcrumb-nav {
    margin-top: var(--space-1);
    margin-bottom: var(--space-3);
    font-size: 0.8rem;
    padding: var(--space-2) var(--space-4);
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 90px; /* FIXED: Increased from 85px to 90px */
  }
  
  .header-content {
    height: auto; /* FIXED: Changed to auto */
    min-height: 80px; /* FIXED: Added min-height */
  }
  
  .hero {
    padding: 100px var(--space-3) var(--space-4) var(--space-3); /* FIXED: Reduced top padding from 170px to 100px */
  }
  
  .hero-title {
    font-size: 1.9rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: var(--space-6); /* Reduced spacing */
  }
  
  .breadcrumb-nav {
    font-size: 0.75rem;
    margin-top: 0;
    margin-bottom: var(--space-2);
  }
}



/* Brand Section */
/* ============= */

.brand-section {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: white;
  cursor: pointer;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-md);
  filter: contrast(1.2) saturate(1.3);
}

.brand-logo:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: contrast(1.3) saturate(1.4);
}

.brand-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.2;
  cursor: pointer;
}

.brand-tagline {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-top: var(--space-1);
}

/* Search Section */
/* ============== */

.search-section {
  flex: 1;
  max-width: 400px;
  margin-left: var(--space-4);
}

.search-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 40px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0 var(--space-4) 0 40px;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  outline: none;
  transition: all var(--transition-base);
}

.search-input:focus {
  border-color: var(--color-primary);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

/* Hero Section */
/* ============ */

.hero {
  background: linear-gradient(135deg, 
    var(--color-light-gray) 0%, 
    rgba(99, 102, 241, 0.05) 50%,
    var(--color-soft-gray) 100%);
  padding: var(--space-16) 0 var(--space-8) 0; /* Added top padding to account for header */
  text-align: center;
  margin-top: 0; /* Reset any margins */
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-6);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-10);
  line-height: 1.6;
}
/* Reduce spacing between hero and first section */
.hero + #dynamicSections .content-section:first-child {
  padding-top: var(--space-5);
}

/* Remove section header from category pages */
.content-section .section-header {
  margin-bottom: var(--space-8);
}

/* Hide section headers on category pages */
body[data-page-type="category"] .section-header {
  display: none;
}
/* Breadcrumb Navigation - FIXED */
/* ============================== */

.breadcrumb-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.9rem;
  color: var(--color-text-primary);
  padding: var(--space-3) var(--space-6);
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  max-width: 600px;
  margin: var(--space-4) auto var(--space-6) auto;
}

.breadcrumb-nav a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.breadcrumb-nav a:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.breadcrumb-nav a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.breadcrumb-nav span {
  color: var(--color-text-secondary);
  user-select: none;
}

.breadcrumb-nav span:not([style*="font-weight"]) {
  /* Separator styling */
  opacity: 1;
  color: var(--color-text-muted);
}

.breadcrumb-nav span[style*="font-weight"] {
  /* Current page styling */
  color: var(--color-text-primary);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  background: rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-sm);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .hero {
    margin-top: 60px; /* Match mobile header height */
    padding: var(--space-12) var(--space-4) var(--space-8);
  }
}

@media (max-width: 480px) {
  .hero {
    margin-top: 55px; /* Match smallest mobile header height */
    padding: var(--space-8) var(--space-3) var(--space-6);
  }
}

/* ALSO ADD: Ensure search section doesn't overlap */
.search-section {
  padding: var(--space-3) var(--space-4); /* FIXED: Reduced from space-8 to space-4 */
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  /* Add top margin if search is positioned near header */
  position: relative;
  z-index: 10;
}

/* Breadcrumb navigation styling fix */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.9rem;
  color: var(--color-text-primary); /* FIXED: Ensure text is visible */
  padding: var(--space-3) var(--space-6);
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  max-width: 600px;
  margin: var(--space-4) auto var(--space-6) auto;
}

.breadcrumb-nav a {
  color: var(--color-primary); /* FIXED: Changed from white to primary color */
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.breadcrumb-nav a:hover {
  background: rgba(99, 102, 241, 0.1); /* FIXED: Changed to primary color background */
  color: var(--color-primary);
  transform: translateY(-1px);
}


/* Content Sections */
/* ================ */

.content-section {
  padding: var(--space-12) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.section-description {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}
/* Alternating Section Colors */
/* ========================== */

/* Alternating Section Colors - More specific selector */
#dynamicSections .content-section:nth-child(odd) {
  background: var(--color-light-gray);
}

#dynamicSections .content-section:nth-child(even) {
  background: var(--color-white);
}

/* Ensure hero doesn't get alternating colors */
.hero {
  background: linear-gradient(135deg, 
    var(--color-light-gray) 0%, 
    rgba(99, 102, 241, 0.05) 50%,
    var(--color-soft-gray) 100%) !important;
}
/* Smart Mathematical Grid System */
/* =============================== */

.cards-grid {
  display: grid;
  gap: var(--space-6);
}

/* Fixed layouts for small counts */
.cards-grid.grid-1 { 
  grid-template-columns: 1fr; 
  max-width: 400px; 
  margin: 0 auto; 
}

.cards-grid.grid-2 { 
  grid-template-columns: repeat(2, 1fr); 
}

.cards-grid.grid-3 { 
  grid-template-columns: repeat(3, 1fr); 
}

/* Smart grid for 4-12 items using mathematical centering */
.cards-grid.grid-smart {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  align-items: start;
}

/* Smart centering classes applied by JavaScript */
.cards-grid.grid-smart .content-card.center-item {
  grid-column: 2 / 3;
  justify-self: center;
}

.cards-grid.grid-smart .content-card.partial-row-left {
  justify-self: end;
  margin-right: 12%;
}

.cards-grid.grid-smart .content-card.partial-row-right {
  justify-self: start;  
  margin-left: 12%;
}

/* Responsive auto-fit for many items (13+) */
.cards-grid.grid-many {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  justify-items: stretch;
}

/* Mobile: All grids become single column */
@media (max-width: 768px) {
  .cards-grid.grid-2,
  .cards-grid.grid-3,
  .cards-grid.grid-smart,
  .cards-grid.grid-many {
    grid-template-columns: 1fr !important;
  }
  
  .cards-grid .content-card {
    grid-column: auto !important;
    justify-self: stretch !important;
    margin: 0 !important;
  }
}

/* Tablet: 2 columns for medium screens */
@media (min-width: 769px) and (max-width: 1024px) {
  .cards-grid.grid-smart {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cards-grid.grid-smart .content-card.center-item {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 350px;
  }
  
  .cards-grid.grid-smart .content-card.partial-row-left {
    justify-self: center;
    margin: 0;
  }
  
  .cards-grid.grid-smart .content-card.partial-row-right {
    justify-self: center;
    margin: 0;
  }
}

/* Large screens: Enhanced spacing */
@media (min-width: 1200px) {
  .cards-grid {
    gap: var(--space-8);
  }
  
  .cards-grid.grid-smart .content-card.partial-row-left {
    margin-right: 15%;
  }
  
  .cards-grid.grid-smart .content-card.partial-row-right {
    margin-left: 15%;
  }
}
/* Card Styles */
/* =========== */

.content-card {
  background: var(--color-surface-elevated);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  position: relative;
}

.content-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary);
}

.content-card[data-is-product="true"] {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.02), var(--color-surface-elevated));
}

.content-card[data-is-product="true"]:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), var(--color-surface-elevated));
  border-color: var(--color-primary);
}

.content-card[data-is-product="true"] .card-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
}

.content-card[data-is-product="true"] .card-arrow {
  color: var(--color-primary);
}

.content-card[data-is-product="true"] .card-title {
  color: var(--color-primary-dark, var(--color-primary));
  font-weight: 600;
}

.content-card[data-is-product="true"]:hover {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, 
    rgba(var(--color-primary-rgb, 99, 102, 241), 0.05), 
    var(--color-surface-elevated)
  );
}

.content-card[data-is-product="true"] .card-badge {
  background: rgba(var(--color-primary-rgb, 99, 102, 241), 0.15);
  color: var(--color-primary-dark, var(--color-primary));
  font-weight: 600;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  /* FIXED: Changed to pure white to match website body */
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
  /* Add border to better define the image area */
  border: 1px solid var(--color-border-light, #f1f3f4);
}

/* FIXED: Ensure ALL images in cards have proper sizing with higher specificity */
.card-image img,
.card-image .card-image-enhanced,
.content-card .card-image img,
.content-card .card-image .card-image-enhanced {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important; /* Force cover as default */
  object-position: center center !important; /* Force center as default */
}
/* Ensure card images have proper dimensions for object-fit */
.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #ffffff !important; /* FIXED: Pure white background */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border-light, #f1f3f4);
}
.card-image:not(:has(img)) {
  background: #ffffff !important;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Default */
}

.card-image-enhanced {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}
.content-card:hover .card-image img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.7));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.content-card:hover .card-overlay {
  opacity: 1;
}

.card-content {
  padding: var(--space-6);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.card-description {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-4);
}

.card-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.content-card[data-is-product="true"] .card-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.card-arrow {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  transition: transform var(--transition-base);
}

.content-card[data-is-product="true"] .card-arrow {
  color: var(--color-success);
}

.content-card:hover .card-arrow {
  transform: translateX(4px);
}
/* Ensure products use brand colors */
.content-card[data-is-product="true"] .card-title {
  color: var(--color-primary);
}

.content-card[data-is-product="true"]:hover {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, 
    rgba(var(--color-primary-rgb, 99, 102, 241), 0.02), 
    var(--color-surface-elevated)
  );
}
/* ADD this section to public/style.css after existing card styles: */

/* Complete Background-Image Method Support */
/* ======================================== */

.card-image-background {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  
  /* Ensure it behaves like an image */
  display: block;
  
  /* Smooth transitions */
  transition: all var(--transition-smooth);
  
  /* Prevent any unwanted scaling initially */
  transform: scale(1);
  
  /* Ensure high-quality rendering */
  background-attachment: scroll;
}

/* Hover effects for background-image cards */
.content-card:hover .card-image-background {
  /* Slight zoom effect while preserving positioning */
  transform: scale(1.05);
}

/* Ensure background-image cards have proper container setup */
.card-image-container:has(.card-image-background) {
  overflow: hidden;
  position: relative;
  background: #ffffff;
}

/* Loading/error states for background-image method */
.card-image-background:not([style*="background-image: url"]) {
  background: linear-gradient(135deg, var(--color-soft-gray), var(--color-medium-gray));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-image-background:not([style*="background-image: url"]):before {
  content: '🖼️';
}

/* Debug helper - shows which method is being used */
.card-image-enhanced[data-method="img-tag"]::after {
  content: 'IMG';
  position: absolute;
  top: 2px;
  left: 2px;
  background: rgba(0, 255, 0, 0.7);
  color: white;
  font-size: 8px;
  padding: 2px 4px;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.card-image-background[data-method="background"]::after {
  content: 'BG';
  position: absolute;
  top: 2px;
  left: 2px;
  background: rgba(0, 0, 255, 0.7);
  color: white;
  font-size: 8px;
  padding: 2px 4px;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Show debug labels on hover (for development) */
.content-card:hover .card-image-enhanced::after,
.content-card:hover .card-image-background::after {
  opacity: 1;
}

/* High DPI support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .card-image-background {
    /* Ensure crisp rendering on retina displays */
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .content-card:hover .card-image-background {
    /* Reduced hover effect on mobile */
    transform: scale(1.02);
  }
  
  /* Hide debug labels on mobile */
  .card-image-enhanced::after,
  .card-image-background::after {
    display: none !important;
  }
}
/* Enhanced Image Rendering System - FIXED VERSION */
/* ================================================ */

/* Enhanced Image Rendering CSS - ADD to style.css */
/* ================================================= */

/* Enhanced Card Image Container */
.card-image-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #ffffff; /* FIXED: Pure white background */
  border: 1px solid var(--color-border-light, #f1f3f4);
}

.card-image-enhanced {
  width: 100% !important;
  height: 100% !important;
  display: block;
  transition: all var(--transition-smooth);
  
  /* FIXED: Force default object-fit values */
  object-fit: cover !important;
  object-position: center center !important;
  
  /* FIXED: Pure white background for any empty spaces */
  background: #ffffff !important;
  
  /* Ensure image quality */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: optimizeQuality;
  
  /* Prevent image dragging */
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  
  /* Smooth scaling and positioning */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* Hover effects for enhanced images */
.content-card:hover .card-image-enhanced {
  transform: scale(1.05) var(--card-image-transform, scale(1));
}

/* Ensure transformed images don't overflow */
.card-image-container {
  transform: translateZ(0);
  will-change: transform;
}

/* Responsive image scaling adjustments */
@media (max-width: 768px) {
  .card-image-enhanced {
    /* Reduce aggressive scaling on mobile */
    max-width: none;
    max-height: none;
  }
  
  .content-card:hover .card-image-enhanced {
    /* Less dramatic hover effect on mobile */
    transform: scale(1.02) var(--card-image-transform, scale(1));
  }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .card-image-enhanced {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Fallback for browsers that don't support modern CSS */
@supports not (object-fit: cover) {
  .card-image-enhanced {
    /* Fallback for older browsers */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
}

/* Loading state for images */
.card-image-enhanced[src=""] {
  background: #ffffff !important; /* Pure white instead of gradient */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* Error state styling */
.card-image-enhanced:not([src]),
.card-image-enhanced[src=""]:after {
  content: '🖼️';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--color-soft-gray);
  font-size: 3rem;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .card-image-enhanced,
  .card-image-standard {
    max-width: none;
    max-height: none;
  }
  
  .content-card:hover .card-image-enhanced,
  .content-card:hover .card-image-standard {
    /* Less dramatic hover effect on mobile */
    transform: scale(1.02);
  }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .card-image-enhanced,
  .card-image-standard {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Fallback for browsers that don't support modern CSS */
@supports not (object-fit: cover) {
  .card-image-enhanced {
    /* Fallback for older browsers */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
}

/* Loading state for images */
.card-image-enhanced[src=""] {
  background: linear-gradient(135deg, var(--color-soft-gray), var(--color-medium-gray));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* Error state styling */
.card-image-enhanced:not([src]),
.card-image-enhanced[src=""]:after {
  content: '🖼️';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #ffffff !important; /* Pure white background */
  font-size: 3rem;
}
/* Taxonomy Section */
/* ================ */

/* Review Slideshow Section */
/* ======================== */

.slideshow-section {
  background: var(--color-white);
  padding: var(--space-12) 0 var(--space-8);
  border-bottom: 1px solid var(--color-border);
}

.slideshow-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-text-primary);
  margin-bottom: var(--space-8);
}

.slideshow-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  aspect-ratio: 9/16;
  background: #000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.slideshow-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  transition: opacity 0.3s ease;
}

.slideshow-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.slideshow-viewport.loading .slideshow-loading {
  opacity: 1;
}

.slideshow-viewport.loading .slideshow-image {
  opacity: 0.3;
}

.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 3rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  font-weight: 300;
  z-index: 10;
  line-height: 1;
}

.slideshow-nav:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.slideshow-nav.prev {
  left: 10px;
}

.slideshow-nav.next {
  right: 10px;
}

.slideshow-counter {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.7);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  font-weight: 500;
}

.slideshow-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.7);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .slideshow-container {
    max-width: 100%;
    aspect-ratio: 9/16;
  }
  
  .slideshow-nav {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }
  
  .slideshow-nav.prev {
    left: 5px;
  }
  
  .slideshow-nav.next {
    right: 5px;
  }
}

/* Browse All Brands Section */
/* ========================= */

.brands-section {
  background: var(--color-light-gray);
  padding: var(--space-16) 0;
}

.brands-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-text-primary);
  margin-bottom: var(--space-12);
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-3);
}

.brand-item {
  background: var(--color-white);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.brand-item:hover {
  border-color: var(--color-primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  background: rgba(99, 102, 241, 0.02);
}

.brand-logo-small {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-light);
}

.brand-logo-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.brand-logo-fallback {
  font-size: 2rem;
  display: none;
}

.brand-info {
  flex: 1;
  text-align: left;
}

.brand-name-display {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
  font-size: 1.1rem;
}

.brand-count {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}
.brand-image {
  width: 100%;
  height: 150px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
}

.brand-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}


/* Brand Category Cards - Contain Fit Override */
/* =========================================== */

.brand-category-card .card-image-brand-logo {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #ffffff !important;
  padding: var(--space-4) !important;
}

/* Ensure contain is used for brand category cards */
.brand-category-card .card-image {
  background: #ffffff !important;
  padding: var(--space-3);
}

/* Override any conflicting global styles for brand logos */
.card-image-brand-logo {
  object-fit: contain !important;
  object-position: center !important;
}


@media (max-width: 768px) {
  .brands-grid {
    grid-template-columns: 1fr;
  }
  
  .brand-item {
    padding: var(--space-3);
  }
  
  .brand-logo-small {
    width: 50px;
    height: 50px;
  }

}



.taxonomy-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-text-primary);
  margin-bottom: var(--space-12);
}

.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-4);
}

.taxonomy-item {
  background: var(--color-white);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.taxonomy-item:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.taxonomy-name {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.taxonomy-count {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* Footer */
/* ====== */

.footer {
  background: var(--color-text-primary);
  color: white;
  padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
  text-align: left;
}

.footer-content .footer-section:first-child {
  padding-right: var(--space-4);
}

.footer-content .footer-section:first-child p {
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 90%;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    text-align: center;
  }
  
  .footer-content .footer-section:first-child {
    padding-right: 0;
  }
  
  .footer-content .footer-section:first-child p {
    max-width: 100%;
  }
}

.footer-section h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  line-height: 1.6;
  margin-bottom: var(--space-2);
  display: block;
}

.footer-section a:hover {
  color: white;
}

/* Fix for Footer Copyright Single Line */
/* ================================== */

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  
  /* FORCE single line on all devices */
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.footer-bottom p {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

.footer-bottom * {
  display: inline !important;
  white-space: nowrap !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* Ensure single line on all screen sizes */
@media (max-width: 768px) {
  .footer-bottom {
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 480px) {
  .footer-bottom {
    font-size: 0.75rem !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 360px) {
  .footer-bottom {
    font-size: 0.7rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}
/* Separated Floating Action Buttons */
/* ================================== */

/* WhatsApp FAB (Solo) */
.whatsapp-fab-solo {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
  z-index: 999;
  transition: all var(--transition-smooth);
}

.whatsapp-fab-solo:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-fab-solo svg {
  width: 30px;
  height: 30px;
}

/* Updated FAB CSS - Replace the existing FAB section in your style.css */

/* 3-Dot Menu Container */
.three-dot-menu {
  position: fixed;
  bottom: 110px; /* Above WhatsApp */
  right: 30px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.three-dot-items {
  display: none;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-smooth);
  pointer-events: none;
}

/* Show menu items when expanded */
.three-dot-menu.expanded .three-dot-items {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Circular Toggle Button Like WhatsApp */
.three-dot-toggle {
  display: none !important; /* Hide the toggle button */
  width: 70px;
  height: 70px;
  border-radius: 50%; /* Perfect circle */
  border: none;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-smooth);
  position: relative;
  padding: 8px;
}

.three-dot-toggle:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.toggle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.toggle-icon {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.toggle-icon-placeholder {
  font-size: 22px;
  line-height: 1;
}

.toggle-label {
  font-size: 8px;
  font-weight: 600;
  line-height: 1.1;
  white-space: pre-line;
  max-width: 60px;
  text-align: center;
  word-spacing: -1px;
  letter-spacing: -0.2px;
}

/* Individual Menu Items - Also Circular */
.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.menu-button {
  width: 55px;
  height: 55px;
  border-radius: 50%; /* Perfect circle */
  border: 2px solid white;
  background: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-base);
  position: relative;
  padding: 0;
  /* Enhanced contrast for better visibility */
  filter: contrast(1.2) saturate(1.3) brightness(0.9);
}

.menu-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: var(--color-accent);
  filter: contrast(1.3) saturate(1.4) brightness(0.85);
}

.menu-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.icon-placeholder {
  font-size: 20px;
  color: white;
  line-height: 1;
}

.menu-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: center;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Menu Item Hover Effects */
.menu-item:hover .menu-label {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .three-dot-menu {
    bottom: 95px;
    right: 25px;
  }
  
  .three-dot-toggle {
    width: 60px;
    height: 60px;
    padding: 6px;
  }
  
  .toggle-icon {
    width: 18px;
    height: 18px;
  }
  
  .toggle-icon-placeholder {
    font-size: 18px;
  }
  
  .toggle-label {
    font-size: 7px;
    line-height: 1.0;
    max-width: 50px;
    word-spacing: -1px;
    letter-spacing: -0.3px;
  }
  
  .menu-button {
    width: 50px;
    height: 50px;
  }
  
  .menu-icon {
    width: 20px;
    height: 20px;
  }
  
  .menu-label {
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .three-dot-toggle {
    width: 55px;
    height: 55px;
  }
  
  .toggle-icon {
    width: 16px;
    height: 16px;
  }
  
  .toggle-icon-placeholder {
    font-size: 16px;
  }
  
  .toggle-label {
    font-size: 6px;
    line-height: 1.0;
    max-width: 45px;
  }
  
  .menu-button {
    width: 45px;
    height: 45px;
  }
  
  .menu-icon {
    width: 18px;
    height: 18px;
  }
  
  .menu-label {
    font-size: 8px;
  }
}

/* Force 3-dot menu to start collapsed */
.three-dot-menu:not(.expanded) .three-dot-items {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.three-dot-menu.expanded .three-dot-items {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: all !important;
}

/* Individual Menu Item */
.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.menu-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid white;
  background: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-base);
  position: relative;
  padding: 0;
}

.menu-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: var(--color-accent);
}

.menu-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Make icons white */
}

.icon-placeholder {
  font-size: 20px;
  color: white;
  line-height: 1;
}

.menu-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: center;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* Menu Item Hover Effects */
.menu-item:hover .menu-label {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

/* Image Viewer Modal (unchanged) */
.image-viewer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
}

.image-viewer-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.viewer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.viewer-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.viewer-close {
  position: absolute;
  top: -60px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.viewer-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 40px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.viewer-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.viewer-nav.prev {
  left: -80px;
}

.viewer-nav.next {
  right: -80px;
}

.viewer-counter {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: 500;
}

.viewer-title {
  position: absolute;
  top: -60px;
  left: 0;
  color: white;
  font-size: 18px;
  font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .whatsapp-fab-solo {
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
  }
  
  .whatsapp-fab-solo svg {
    width: 26px;
    height: 26px;
  }
  
  .three-dot-menu {
    bottom: 95px;
    right: 25px;
  }
  
  .three-dot-toggle {
    width: 55px;
    height: 55px;
  }
  
  .menu-button {
    width: 45px;
    height: 45px;
  }
  
  .menu-icon {
    width: 20px;
    height: 20px;
  }
  
  .menu-label {
    font-size: 10px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.viewer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.viewer-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.viewer-close {
  position: absolute;
  top: -60px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.viewer-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 40px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.viewer-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.viewer-nav.prev {
  left: -80px;
}

.viewer-nav.next {
  right: -80px;
}

.viewer-counter {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: 500;
}

.viewer-title {
  position: absolute;
  top: -60px;
  left: 0;
  color: white;
  font-size: 18px;
  font-weight: 600;
}

/* Enhanced Floating Action Buttons - Larger and Mobile Optimized */
/* ============================================================== */

.fab-container {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-4);
}

.fab-toggle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-smooth);
  position: relative;
}

.fab-toggle:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.fab-toggle:active {
  transform: scale(0.95);
}

.fab-close {
  display: none;
  font-size: 2.5rem;
  font-weight: 300;
}

.fab-container.expanded .fab-dots {
  display: none;
}

.fab-container.expanded .fab-close {
  display: block;
}

.fab-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-smooth);
  pointer-events: none;
}

.fab-container.expanded .fab-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.fab-action {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: white;
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  position: relative;
  text-decoration: none;
  overflow: hidden;
}

.fab-action:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
  width: auto;
  padding: 0 var(--space-5);
  border-radius: var(--radius-full);
  min-width: 60px;
}

.fab-action:active {
  transform: scale(0.95);
}

.fab-action svg {
  width: 28px;
  height: 28px;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.fab-text {
  margin-left: var(--space-3);
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition-base);
  font-size: 1rem;
}

.fab-action:hover .fab-text {
  opacity: 1;
  transform: translateX(0);
}

.fab-action:hover svg {
  margin-right: var(--space-2);
}

/* WhatsApp specific styling */
.whatsapp-fab {
  background: linear-gradient(135deg, #25D366, #128C7E) !important;
  color: white !important;
}

/* Image Viewer Modal - Enhanced */
/* ============================= */

.image-viewer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
}

.image-viewer-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.viewer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.viewer-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.viewer-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.viewer-image:active {
  transform: scale(0.98);
}

.viewer-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  font-weight: 300;
  z-index: 10001;
  line-height: 1;
}

.viewer-close:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.viewer-close:active {
  transform: scale(0.95);
}

/* Mobile close button */
@media (max-width: 768px) {
  .viewer-close {
    width: 50px;
    height: 50px;
    font-size: 2rem;
    top: 15px;
    right: 15px;
  }
}

.viewer-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 3rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  font-weight: 300;
  z-index: 10001;
  line-height: 1;
}

.viewer-nav:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.viewer-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.viewer-nav.prev {
  left: 20px;
}

.viewer-nav.next {
  right: 20px;
}

/* Mobile navigation */
@media (max-width: 768px) {
  .viewer-nav.prev {
    left: 15px;
  }
  
  .viewer-nav.next {
    right: 15px;
  }
  
  .viewer-nav {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }
}

.viewer-counter {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.6);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  font-weight: 500;
}

.viewer-title {
  position: absolute;
  top: -60px;
  left: 0;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .fab-container {
    bottom: var(--space-6);
    right: var(--space-6);
  }
  
  .fab-toggle {
    width: 65px;
    height: 65px;
  }
  
  .fab-action {
    width: 55px;
    height: 55px;
  }
  
  .fab-action svg {
    width: 24px;
    height: 24px;
  }
  
  .viewer-nav.prev {
    left: -50px;
  }
  
  .viewer-nav.next {
    right: -50px;
  }
  
  .viewer-nav {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }
  
  .viewer-close {
  width: 50px;
  height: 50px;
  font-size: 2rem;
  top: 10px;
  right: 10px;
  z-index: 10001;
}
  
  .viewer-content {
    max-width: 95vw;
    max-height: 85vh;
  }
  
  .viewer-image {
    max-height: 85vh;
    cursor: default;
  }
}
/* Loading States */
/* ============== */

.loading-skeleton {
  background: linear-gradient(90deg, var(--color-soft-gray) 25%, var(--color-medium-gray) 50%, var(--color-soft-gray) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive Design */
/* ================= */

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }

  .header-content {
    height: 70px;
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
  }

  .brand-section {
    justify-content: center;
  }

  .brand-name {
    display: none;
  }

  .search-section {
    max-width: none;
  }

  .hero {
    padding: var(--space-12) 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .breadcrumb-nav {
    font-size: 0.8rem;
    padding: var(--space-2) var(--space-4);
    margin-bottom: var(--space-6);
    max-width: 90%;
  }

  .breadcrumb-nav a,
  .breadcrumb-nav span[style*="font-weight"] {
    padding: var(--space-1);
  }

  .content-section {
    padding: var(--space-12) 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .cards-grid.grid-2,
  .cards-grid.grid-3,
  .cards-grid.grid-4,
  .cards-grid.grid-many {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .taxonomy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .header-content {
    height: auto;
    padding: var(--space-4) 0;
  }

  .stats-grid,
  .taxonomy-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .breadcrumb-nav {
    font-size: 0.75rem;
  }
}

/* Focus States for Accessibility */
/* =============================== */

.content-card:focus,
.taxonomy-item:focus,
.brand-logo:focus,
.search-input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.content-card:focus-visible,
.taxonomy-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Utility Classes */
/* =============== */

.text-center { 
  text-align: center; 
}

.hidden { 
  display: none; 
}

.loading { 
  opacity: 0.7; 
}

/* Performance Optimizations */
/* ========================= */

.card-image img,
.loading-skeleton {
  will-change: transform;
}

/* High Contrast Support */
/* ==================== */

@media (prefers-contrast: high) {
  :root {
    --color-border: #555555;
    --color-text-primary: #000000;
    --color-primary: #0066cc;
  }
}

/* Reduced Motion Support */
/* ===================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .content-card:hover,
  .brand-logo:hover {
    transform: none;
  }
}

/* Print Styles */
/* ============ */

@media print {
  .whatsapp-fab-solo,
  .three-dot-menu {
    display: none !important;
  }
  
  .footer {
    position: relative;
    page-break-inside: avoid;
  }

  
  .content-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .hero {
    background: none;
  }
  /* Force 3-dot menu to start collapsed */
.three-dot-menu:not(.expanded) .three-dot-items {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.three-dot-menu.expanded .three-dot-items {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: all !important;
}
  /* Force footer copyright to single line */
.footer-bottom * {
  display: inline !important;
  white-space: nowrap !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.footer-bottom {
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}
  body {
  padding-top: 70px !important;
}

@media (max-width: 768px) {
  body {
    padding-top: 60px !important;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 55px !important;
  }
  
}
  /* NUCLEAR OPTION: Force cover as default for all card images */
.content-card .card-image img:not([style*="object-fit"]) {
  object-fit: cover !important;
  object-position: center center !important;
}

.content-card .card-image .card-image-enhanced:not([style*="object-fit"]) {
  object-fit: cover !important;
  object-position: center center !important;
}
}
