/*
Theme Name: Custom Theme
Description: Un tema personalizado para WordPress desarrollado con Docker - Optimized & Organized
Version: 2.0.7
Author: Tu Nombre
*/

/**
 * Main Stylesheet - Optimized & Organized
 * 
 * This is the main stylesheet that imports all organized CSS files.
 * The actual styles are now split into logical, maintainable files.
 * 
 * Structure:
 * - css/base/        - Variables, reset, typography
 * - css/layout/      - Containers, header, navigation
 * - css/woocommerce/ - WooCommerce specific styles
 * - css/components/  - Reusable components
 * - css/pages/       - Page-specific styles
 * - css/responsive/  - Mobile and responsive styles
 * - blocks/          - Block-specific styles (loaded separately)
 * 
 * Note: In WordPress, CSS imports in the main stylesheet are not 
 * recommended for performance. The actual loading is handled by 
 * the theme's PHP files for optimal performance.
 */

/* Fallback styles for critical above-the-fold content */
/* These ensure the site remains functional even if other CSS files fail to load */

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

/* Critical variables */
:root {
  --primary-color: #00145c;
  --white: #ffffff;
  --gray-800: #343a40;
  --gray-100: #f8f9fa;
  --max-width: 1352px;
}

/* Critical typography */
body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-100);
}

/* Critical layout */
.container,
.jcs-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Critical accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Loading indicator for CSS chunks */
.css-loading {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.css-loaded {
  opacity: 1;
}

/* Nubecom header fallbacks for older browsers */
@supports not (display: grid) {
  #nubecom-header .header-content {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }
  
  #nubecom-header .logo-section,
  #nubecom-header .search-section,
  #nubecom-header .cart-section {
    flex: 1;
  }
  
  #nubecom-header .search-section .header-search-form {
    display: flex !important;
  }
  
  #nubecom-header .cart-link {
    display: flex !important;
    align-items: center;
  }
  
  #nubecom-header .mobile-content {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }
}

/* Ensure mobile navigation is properly styled */
#nubecom-header .mobile-navigation {
  padding: 1rem 0;
}

#nubecom-header .mobile-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#nubecom-header .mobile-navigation li {
  margin: 0.5rem 0;
}

#nubecom-header .mobile-navigation a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.5rem 0;
  display: block;
  transition: var(--transition);
}

#nubecom-header .mobile-navigation a:hover {
  color: var(--primary-color);
}

/*
 * Performance Notes:
 * 
 * 1. This main stylesheet is now minimal and focused
 * 2. Organized CSS files are loaded strategically by PHP
 * 3. Conditional loading ensures only needed styles are loaded
 * 4. Block styles are loaded only when blocks are used
 * 5. Page-specific styles load only on relevant pages
 * 6. CSS Grid is used for simplified layout with flexbox fallbacks
 * 7. Icon sizing and colors are unified through CSS variables
 * 
 * Benefits:
 * - Faster initial page load
 * - Better caching strategy
 * - Easier maintenance
 * - Reduced CSS conflicts
 * - Improved debugging
 * - Consistent icon styling
 * - Simplified responsive behavior
 */
