/**
 * ============================================================================
 * CHILECHOCADOS - LAYOUT STYLES
 * ============================================================================
 * Estilos de estructura y layout principal
 */

/* Prevenir scroll horizontal globalmente */
* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

/* Skip link para accesibilidad */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--cc-primary);
  color: var(--cc-white);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ============================================================================
 * HEADER
 * ============================================================================ */
.site-header {
  background: var(--cc-bg-surface);
  border-bottom: 1px solid var(--cc-border-default);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 100vw;
  overflow: visible;
  margin: 0;
  padding: 0;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

/* Logo */
.header-logo {
  flex-shrink: 0;
  max-width: fit-content;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--cc-text-primary);
  white-space: nowrap;
}

.logo-icon {
  display: flex;
  align-items: center;
  color: var(--cc-primary);
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-primary {
  color: var(--cc-text-primary);
}

.logo-accent {
  color: var(--cc-primary);
}

/* Buscador */
.header-search {
  flex: 1;
  max-width: 600px;
  min-width: 0;
  overflow: hidden;
}

.mobile-search {
  display: none;
  height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.search-form {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--cc-white);
  border: 2px solid var(--cc-border-light);
  border-radius: 12px;
  padding: 0 12px;
  transition: all 0.2s ease;
  height: 44px;
  overflow: hidden;
  box-sizing: border-box;
}

.search-input-group:focus-within {
  background: var(--cc-white);
  border-color: var(--cc-primary);
  outline: 3px solid rgba(230, 51, 42, 0.1);
  outline-offset: 0;
}

.search-icon {
  color: var(--cc-text-tertiary);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0 8px;
  font-size: 14px;
  color: var(--cc-text-primary);
  outline: none;
  height: 100%;
  line-height: normal;
}

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

.search-filter-btn {
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--cc-text-tertiary);
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.search-filter-btn:hover {
  background: var(--cc-gray-200);
  color: var(--cc-text-primary);
}

/* Acciones del header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
  max-width: fit-content;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
  background: transparent;
}

.header-btn.btn-primary {
  background: var(--cc-primary);
  color: var(--cc-white);
  border-color: var(--cc-primary);
  box-shadow: 0 2px 8px rgba(230, 51, 42, 0.2);
}

.header-btn.btn-primary:hover {
  background: var(--cc-primary-dark);
  border-color: var(--cc-primary-dark);
  box-shadow: 0 4px 12px rgba(230, 51, 42, 0.3);
  transform: translateY(-1px);
}

.header-btn.btn-secondary {
  border-color: var(--cc-border-default);
  color: var(--cc-text-primary);
  background: var(--cc-white);
}

.header-btn.btn-secondary:hover {
  background: var(--cc-bg-muted);
  border-color: var(--cc-border-strong);
  transform: translateY(-1px);
}

.header-btn.btn-icon {
  padding: 10px;
  border-color: var(--cc-border-light);
}

.header-btn.btn-icon:hover {
  background: var(--cc-bg-muted);
  border-color: var(--cc-border-default);
}

.theme-toggle {
  background: var(--cc-white);
  border: 2px solid var(--cc-border-light);
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--cc-text-secondary);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
  background: var(--cc-bg-muted);
  border-color: var(--cc-border-default);
  color: var(--cc-text-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
 * NAVEGACIÓN PRINCIPAL
 * ============================================================================ */
.main-nav {
  background: var(--cc-bg-surface);
  border-bottom: 1px solid var(--cc-border-light);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

/* Ocultar menú mobile por defecto */
.mobile-nav {
  display: none;
}

.nav-item {
  position: relative;
  height: auto;
}

.nav-item.has-dropdown {
  position: relative;
  z-index: 200;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cc-text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}

.nav-link:hover {
  background: var(--cc-bg-muted);
  color: var(--cc-text-primary);
}

.nav-link.active {
  color: var(--cc-primary);
  background: var(--cc-primary-pale);
}

.chevron-icon {
  transition: transform 0.2s ease;
}

.nav-link[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}

/* Dropdown */
.has-dropdown {
  position: relative;
  z-index: 200;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--cc-white);
  border: 1px solid var(--cc-border-default);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 280px;
  padding: 12px;
  display: none;
  z-index: 9999;
  margin-top: 4px;
}

.has-dropdown:hover .nav-dropdown,
.nav-link[aria-expanded="true"] + .nav-dropdown,
.nav-item.dropdown-open .nav-dropdown {
  display: block;
}

.nav-dropdown-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-dropdown-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-dropdown-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cc-text-tertiary);
  letter-spacing: 0.5px;
  margin: 0;
}

.nav-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-dropdown-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--cc-text-primary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-dropdown-link:hover {
  background: var(--cc-bg-muted);
  color: var(--cc-primary);
}

/* ============================================================================
 * MAIN CONTENT
 * ============================================================================ */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 200px);
}

/* ============================================================================
 * FOOTER
 * ============================================================================ */
.site-footer {
  background: var(--cc-bg-surface);
  border-top: 1px solid var(--cc-border-default);
  margin-top: 48px;
  padding: 32px 24px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================================================
 * RESPONSIVE
 * ============================================================================ */
/* Los estilos responsive están consolidados al final del archivo */


/* ============================================================================
 * MENÚ MÓVIL
 * ============================================================================ */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background: var(--cc-bg-surface);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-user {
  padding: 20px 16px;
  border-bottom: 1px solid var(--cc-border-light);
  background: var(--cc-bg-muted);
}

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-user-avatar,
.mobile-user-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.mobile-user-avatar-placeholder {
  background: var(--cc-primary);
  color: var(--cc-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.mobile-user-name {
  font-weight: 600;
  color: var(--cc-text-primary);
  font-size: 16px;
}

.mobile-user-email {
  font-size: 13px;
  color: var(--cc-text-tertiary);
}

.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--cc-text-primary);
  text-decoration: none;
  transition: background 0.2s ease;
}

.mobile-menu-link:hover {
  background: var(--cc-bg-muted);
}

.mobile-menu-separator {
  padding: 12px 20px 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cc-text-tertiary);
  letter-spacing: 0.5px;
}

/* Ocultar menú móvil en desktop */
@media (min-width: 769px) {
  .mobile-menu {
    display: none !important;
  }
}

/* Mostrar menú móvil solo en mobile */
@media (max-width: 768px) {
  .mobile-menu {
    display: block;
  }
  
  .main-nav {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }
}


/* ============================================================================
 * FOOTER STYLES
 * ============================================================================ */
.site-footer {
  background: var(--cc-gray-900);
  color: var(--cc-gray-300);
  margin-top: 64px;
}

.footer-main {
  padding: 48px 0 32px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 48px;
}

/* Columna de marca */
.footer-col-brand {
  grid-column: span 1;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--cc-white);
}

.footer-logo-icon {
  color: var(--cc-primary);
}

.footer-logo-text {
  font-size: 20px;
  font-weight: 700;
}

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cc-gray-400);
  margin: 16px 0;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--cc-gray-800);
  color: var(--cc-gray-300);
  transition: all 0.2s ease;
  text-decoration: none;
}

.social-link:hover {
  background: var(--cc-primary);
  color: var(--cc-white);
  transform: translateY(-2px);
}

/* Columnas de enlaces */
.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--cc-white);
  margin: 0 0 20px 0;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cc-gray-400);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--cc-primary);
}

/* Contacto */
.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-contact li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.contact-label {
  font-size: 12px;
  color: var(--cc-gray-500);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 14px;
  color: var(--cc-gray-300);
  text-decoration: none;
}

.contact-value:hover {
  color: var(--cc-primary);
}

/* Newsletter */
.footer-newsletter {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--cc-gray-800);
}

.newsletter-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cc-white);
  margin: 0 0 12px 0;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--cc-gray-700);
  border-radius: 8px;
  background: var(--cc-gray-800);
  color: var(--cc-white);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.newsletter-input:focus {
  border-color: var(--cc-primary);
}

.newsletter-input::placeholder {
  color: var(--cc-gray-500);
}

.newsletter-btn {
  padding: 10px 12px;
  background: var(--cc-primary);
  border: none;
  border-radius: 8px;
  color: var(--cc-white);
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
}

.newsletter-btn:hover {
  background: var(--cc-primary-dark);
}

.newsletter-note {
  font-size: 12px;
  color: var(--cc-gray-500);
  margin: 8px 0 0 0;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid var(--cc-gray-800);
  padding: 24px 0;
}

.footer-bottom-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-copyright p {
  margin: 0;
  font-size: 13px;
  color: var(--cc-gray-500);
}

.footer-made-by {
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-made-by a {
  color: var(--cc-primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-made-by a:hover {
  text-decoration: underline;
}

.heart-icon {
  color: var(--cc-primary);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-language {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-selector {
  background: var(--cc-gray-800);
  border: 1px solid var(--cc-gray-700);
  color: var(--cc-gray-300);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.footer-stats {
  display: flex;
  gap: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--cc-gray-500);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--cc-white);
  border-top: 1px solid var(--cc-border-default);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
  padding: 20px;
  z-index: 1000;
}

.cookie-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.cookie-text {
  flex: 1;
}

.cookie-text p {
  margin: 0;
  font-size: 14px;
  color: var(--cc-text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-text a {
  color: var(--cc-primary);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 12px;
}

/* Responsive Footer */
@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  
  .footer-col-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-col-brand {
    grid-column: span 1;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .cookie-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cookie-actions {
    justify-content: stretch;
  }
  
  .cookie-actions button {
    flex: 1;
  }
}

/* ============================================================================
 * USER MENU DROPDOWN
 * ============================================================================ */
.user-menu-wrapper {
  position: relative;
  z-index: 1000;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--cc-border-default);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-menu-trigger:hover {
  background: var(--cc-bg-subtle);
  border-color: var(--cc-border-hover);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cc-primary);
  color: var(--cc-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--cc-bg-surface);
  border: 1px solid var(--cc-border-default);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 9999;
  max-height: 80vh;
  overflow-y: auto;
}

.user-menu-wrapper:hover .user-menu-dropdown,
.user-menu-wrapper:focus-within .user-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-header {
  padding: 16px;
  border-bottom: 1px solid var(--cc-border-default);
}

.user-menu-name {
  font-weight: 600;
  color: var(--cc-text-primary);
  font-size: 14px;
  margin-bottom: 4px;
}

.user-menu-email {
  font-size: 12px;
  color: var(--cc-text-secondary);
  word-break: break-all;
}

.user-menu-divider {
  height: 1px;
  background: var(--cc-border-default);
  margin: 8px 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--cc-text-primary);
  text-decoration: none;
  transition: background 0.2s ease;
  font-size: 14px;
}

.user-menu-item:hover {
  background: var(--cc-bg-subtle);
}

.user-menu-item i {
  color: var(--cc-text-secondary);
  flex-shrink: 0;
}

.user-menu-item.admin-link {
  color: var(--cc-primary);
}

.user-menu-item.admin-link i {
  color: var(--cc-primary);
}

.user-menu-item.logout-link {
  color: var(--cc-error);
}

.user-menu-item.logout-link i {
  color: var(--cc-error);
}

/* Header Actions - Definición consolidada arriba */

.header-action-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--cc-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Asegurar que los iconos dentro del botón mantengan su tamaño */
.header-action-btn i[data-lucide],
.header-action-btn svg {
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0;
}

.header-action-btn:hover {
  background: var(--cc-bg-subtle);
  color: var(--cc-text-primary);
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--cc-error);
  color: var(--cc-white);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Theme Toggle */
.theme-toggle {
  position: relative;
}

.theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-icon-dark {
  display: block;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hamburger-icon span {
  width: 24px;
  height: 2px;
  background: var(--cc-text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  /* Prevenir scroll horizontal global */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  
  /* Header */
  .site-header {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .header-container {
    padding: 10px 12px;
    gap: 6px;
    max-width: 100%;
    overflow: visible;
    justify-content: space-between;
  }
  
  .header-search {
    display: none;
  }
  
  .logo-text {
    font-size: 15px;
  }
  
  .logo-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .header-logo {
    flex-shrink: 0;
    min-width: 0;
  }
  
  .logo-link {
    gap: 6px;
  }
  
  /* Barra de búsqueda móvil */
  .mobile-search {
    display: block;
    padding: 10px 16px;
    background: var(--cc-bg-surface);
    border-bottom: 1px solid var(--cc-border-light);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
  }
  
  .mobile-search .search-form {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  
  .mobile-search .search-input-group {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    height: 40px;
  }
  
  .mobile-search .search-input {
    font-size: 15px;
    padding: 0 8px;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
  }
  
  .mobile-search .search-filter-btn {
    display: none;
  }
  
  /* Header actions */
  .header-actions {
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: nowrap;
  }
  
  .header-actions .btn-text {
    display: none;
  }
  
  /* Ocultar notificaciones en móvil */
  .header-actions .header-action-btn[aria-label="Notificaciones"] {
    display: none;
  }
  
  /* Ocultar mensajes en móvil (accesible desde menú) */
  .header-actions .header-action-btn[aria-label="Mensajes"] {
    display: none;
  }
  
  .header-action-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 0;
  }
  
  /* Mantener tamaño de iconos en móvil */
  .header-action-btn i[data-lucide],
  .header-action-btn svg {
    width: 22px !important;
    height: 22px !important;
  }
  
  .btn {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .btn-primary {
    padding: 6px 12px;
  }
  
  .user-menu-wrapper {
    position: static;
  }
  
  .user-menu-dropdown {
    position: fixed;
    right: 12px;
    top: 60px;
    left: auto;
  }
  
  .user-menu-trigger {
    padding: 4px 8px;
    gap: 4px;
  }
  
  .user-avatar,
  .user-avatar-placeholder {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .theme-toggle {
    width: 32px;
    height: 32px;
    padding: 6px;
  }
  
  /* Navegación */
  .nav-container {
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  .nav-menu {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
  }
  
  /* Contenido principal */
  .main-content {
    padding: 16px;
  }
  
  /* Ocultar texto de botones */
  .header-btn span {
    display: none;
  }
}

/* ============================================================================
 * DARK MODE - HEADER Y LAYOUT
 * ============================================================================ */

/* Header en Dark Mode */
:root[data-theme="dark"] .site-header {
  background-color: #1F2937;
  border-bottom-color: #374151;
}

:root[data-theme="dark"] .header-container {
  background-color: #1F2937;
}

/* Logo en Dark Mode */
:root[data-theme="dark"] .logo-text {
  color: #F3F4F6;
}

/* Botón Publicar en Dark Mode */
:root[data-theme="dark"] .btn-primary {
  background-color: var(--cc-primary) !important;
  color: var(--cc-white) !important;
  border-color: var(--cc-primary) !important;
}

:root[data-theme="dark"] .btn-primary:hover {
  background-color: var(--cc-primary-dark) !important;
  border-color: var(--cc-primary-dark) !important;
}

/* Botón Ghost en Dark Mode */
:root[data-theme="dark"] .btn-ghost {
  background-color: transparent !important;
  color: #F3F4F6 !important;
  border-color: #4B5563 !important;
}

:root[data-theme="dark"] .btn-ghost:hover {
  background-color: #374151 !important;
  border-color: #6B7280 !important;
}

/* Theme Toggle en Dark Mode */
:root[data-theme="dark"] .theme-toggle {
  background-color: #374151 !important;
  border-color: #4B5563 !important;
  color: #F3F4F6 !important;
}

:root[data-theme="dark"] .theme-toggle:hover {
  background-color: #4B5563 !important;
  border-color: #6B7280 !important;
}

/* Header Action Buttons en Dark Mode */
:root[data-theme="dark"] .header-action-btn {
  background-color: #374151;
  border-color: #4B5563;
  color: #F3F4F6;
}

:root[data-theme="dark"] .header-action-btn:hover {
  background-color: #4B5563;
  border-color: #6B7280;
}

/* Search en Dark Mode */
:root[data-theme="dark"] .search-input-group {
  background-color: #374151;
  border-color: #4B5563;
}

:root[data-theme="dark"] .search-input {
  background-color: #374151;
  color: #F3F4F6;
}

:root[data-theme="dark"] .search-input::placeholder {
  color: #9CA3AF;
}

:root[data-theme="dark"] .search-filter-btn {
  background-color: #4B5563;
  color: #F3F4F6;
}

:root[data-theme="dark"] .search-filter-btn:hover {
  background-color: #6B7280;
}

/* User Menu en Dark Mode */
:root[data-theme="dark"] .user-menu-dropdown {
  background-color: #1F2937;
  border-color: #374151;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

:root[data-theme="dark"] .user-menu-header {
  border-bottom-color: #374151;
}

:root[data-theme="dark"] .user-menu-name {
  color: #F3F4F6;
}

:root[data-theme="dark"] .user-menu-email {
  color: #9CA3AF;
}

:root[data-theme="dark"] .user-menu-item {
  color: #D1D5DB;
}

:root[data-theme="dark"] .user-menu-item:hover {
  background-color: #374151;
  color: #F3F4F6;
}

:root[data-theme="dark"] .user-menu-divider {
  background-color: #374151;
}

:root[data-theme="dark"] .user-menu-section-title {
  color: #9CA3AF;
}

/* Navigation en Dark Mode */
:root[data-theme="dark"] .site-nav {
  background-color: #1F2937;
  border-bottom-color: #374151;
}

:root[data-theme="dark"] .nav-link {
  color: #D1D5DB;
}

:root[data-theme="dark"] .nav-link:hover {
  color: #F3F4F6;
  background-color: #1F2937;
}

:root[data-theme="dark"] .nav-link.active {
  color: var(--cc-primary);
  background-color: rgba(230, 51, 42, 0.1);
}

/* Mobile Search en Dark Mode */
:root[data-theme="dark"] .mobile-search {
  background-color: #1F2937;
  border-bottom-color: #374151;
}

/* Hamburger Icon en Dark Mode */
:root[data-theme="dark"] .hamburger-icon span {
  background-color: #F3F4F6;
}

/* Footer en Dark Mode */
:root[data-theme="dark"] .site-footer {
  background-color: #111827;
  border-top-color: #374151;
  color: #D1D5DB;
}

:root[data-theme="dark"] .footer-title {
  color: #F3F4F6;
}

:root[data-theme="dark"] .footer-link {
  color: #9CA3AF;
}

:root[data-theme="dark"] .footer-link:hover {
  color: #F3F4F6;
}

:root[data-theme="dark"] .footer-links a {
  color: #9CA3AF;
}

:root[data-theme="dark"] .footer-links a:hover {
  color: var(--cc-primary);
}

:root[data-theme="dark"] .footer-description {
  color: #9CA3AF;
}

:root[data-theme="dark"] .footer-logo-text .logo-primary {
  color: #F3F4F6;
}

:root[data-theme="dark"] .footer-logo-text .logo-accent {
  color: var(--cc-primary);
}

:root[data-theme="dark"] .social-link {
  background: #1F2937;
  border-color: #374151;
  color: #D1D5DB;
}

:root[data-theme="dark"] .social-link:hover {
  background: #374151;
  border-color: var(--cc-primary);
  color: var(--cc-primary);
}

:root[data-theme="dark"] .footer-contact {
  color: #D1D5DB;
}

:root[data-theme="dark"] .contact-label {
  color: #9CA3AF;
}

:root[data-theme="dark"] .contact-value {
  color: #F3F4F6;
}

:root[data-theme="dark"] .contact-value:hover {
  color: var(--cc-primary);
}

:root[data-theme="dark"] .newsletter-title {
  color: #F3F4F6;
}

:root[data-theme="dark"] .newsletter-input {
  background: #1F2937;
  border-color: #374151;
  color: #F3F4F6;
}

:root[data-theme="dark"] .newsletter-input:focus {
  border-color: var(--cc-primary);
  background: #111827;
}

:root[data-theme="dark"] .newsletter-input::placeholder {
  color: #6B7280;
}

:root[data-theme="dark"] .newsletter-btn {
  background: var(--cc-primary);
  color: white;
}

:root[data-theme="dark"] .newsletter-btn:hover {
  background: #c72a22;
}

:root[data-theme="dark"] .newsletter-note {
  color: #9CA3AF;
}

:root[data-theme="dark"] .footer-bottom {
  border-top-color: #374151;
  color: #9CA3AF;
}

:root[data-theme="dark"] .footer-copyright p {
  color: #9CA3AF;
}

:root[data-theme="dark"] .footer-made-by {
  color: #9CA3AF;
}

:root[data-theme="dark"] .footer-made-by a {
  color: var(--cc-primary);
}

:root[data-theme="dark"] .language-selector {
  background: #1F2937;
  border-color: #374151;
  color: #F3F4F6;
}

:root[data-theme="dark"] .language-selector:focus {
  border-color: var(--cc-primary);
}

:root[data-theme="dark"] .stat-item {
  color: #9CA3AF;
}

:root[data-theme="dark"] .footer-bottom-content svg {
  color: #9CA3AF;
}

:root[data-theme="dark"] .heart-icon {
  color: var(--cc-primary);
}


/* ============================================================================
 * DARK MODE OVERRIDES
 * ============================================================================ */

/* Barra de búsqueda en dark mode */
:root[data-theme="dark"] .search-input-group {
  background: #2E2E2E !important;
  border-color: #4A4A4A !important;
}

:root[data-theme="dark"] .search-input-group:focus-within {
  background: #2E2E2E !important;
  border-color: #F05045 !important;
  outline: 3px solid rgba(240, 80, 69, 0.2) !important;
}

:root[data-theme="dark"] .search-input {
  color: #F5F5F5 !important;
  background: transparent !important;
}

:root[data-theme="dark"] .search-input::placeholder {
  color: #ABABAB !important;
}

:root[data-theme="dark"] .search-icon {
  color: #ABABAB !important;
}

:root[data-theme="dark"] .search-filter-btn {
  color: #ABABAB !important;
}

:root[data-theme="dark"] .search-filter-btn:hover {
  background: #2E2E2E !important;
  color: #F5F5F5 !important;
}

/* Theme toggle en dark mode */
:root[data-theme="dark"] .theme-toggle {
  background: var(--cc-bg-elevated) !important;
  border-color: var(--cc-border-default) !important;
  color: var(--cc-text-secondary) !important;
}

:root[data-theme="dark"] .theme-toggle:hover {
  background: var(--cc-bg-muted) !important;
  border-color: var(--cc-border-strong) !important;
  color: var(--cc-text-primary) !important;
}

/* Header action buttons en dark mode */
:root[data-theme="dark"] .header-action-btn {
  background: var(--cc-bg-elevated) !important;
  border-color: var(--cc-border-default) !important;
  color: var(--cc-text-secondary) !important;
}

:root[data-theme="dark"] .header-action-btn:hover {
  background: var(--cc-bg-muted) !important;
  border-color: var(--cc-border-strong) !important;
  color: var(--cc-text-primary) !important;
}

/* User menu en dark mode */
:root[data-theme="dark"] .user-menu-dropdown {
  background: var(--cc-bg-elevated) !important;
  border-color: var(--cc-border-default) !important;
}

:root[data-theme="dark"] .user-menu-header {
  border-bottom-color: var(--cc-border-default) !important;
}

:root[data-theme="dark"] .user-menu-name {
  color: var(--cc-text-primary) !important;
}

:root[data-theme="dark"] .user-menu-email {
  color: var(--cc-text-tertiary) !important;
}

:root[data-theme="dark"] .user-menu-item {
  color: var(--cc-text-primary) !important;
}

:root[data-theme="dark"] .user-menu-item:hover {
  background: var(--cc-bg-muted) !important;
}

:root[data-theme="dark"] .user-menu-divider {
  background: var(--cc-border-default) !important;
}

/* Nav dropdown en dark mode */
:root[data-theme="dark"] .nav-dropdown {
  background: var(--cc-bg-elevated) !important;
  border-color: var(--cc-border-default) !important;
}

:root[data-theme="dark"] .nav-dropdown-link {
  color: var(--cc-text-primary) !important;
}

:root[data-theme="dark"] .nav-dropdown-link:hover {
  background: var(--cc-bg-muted) !important;
  color: var(--cc-primary) !important;
}

/* Mobile menu en dark mode */
:root[data-theme="dark"] .mobile-menu-content {
  background: var(--cc-bg-surface) !important;
}

:root[data-theme="dark"] .mobile-menu-user {
  background: var(--cc-bg-elevated) !important;
  border-bottom-color: var(--cc-border-default) !important;
}

:root[data-theme="dark"] .mobile-user-name {
  color: var(--cc-text-primary) !important;
}

:root[data-theme="dark"] .mobile-user-email {
  color: var(--cc-text-tertiary) !important;
}

:root[data-theme="dark"] .mobile-menu-link {
  color: var(--cc-text-primary) !important;
}

:root[data-theme="dark"] .mobile-menu-link:hover {
  background: var(--cc-bg-muted) !important;
}

:root[data-theme="dark"] .mobile-menu-separator {
  color: var(--cc-text-tertiary) !important;
}
