/* =========================================
   MODO OSCURO - ESTILOS PERSONALIZADOS
   ========================================= */

/* Switch del modo oscuro */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    transition: transform 0.2s ease;
    color: inherit;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

/* Ajustes para modo oscuro */
[data-bs-theme="dark"] {
    /* Colores de fondo personalizados */
    --bs-body-bg: #121212;
    --bs-body-color: #ffffff;
    --bs-border-color: #404040;
}

/* Header personalizado en modo oscuro */
[data-bs-theme="dark"] .bg-primary {
    background-color: #1a1a1a !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #1e1e1e !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #b0b0b0 !important;
}

/* Cards y elementos */
[data-bs-theme="dark"] .card {
    background-color: #2a2a2a;
    border-color: #404040;
}

[data-bs-theme="dark"] .card-header {
    background-color: #333333;
    border-color: #404040;
}

/* Formularios */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2a2a2a;
    border-color: #404040;
    color: #ffffff;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #2a2a2a;
    border-color: #0d6efd;
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Dropdowns */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2a2a2a;
    border-color: #404040;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #ffffff;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #404040;
    color: #ffffff;
}

/* Badges y elementos destacados */
[data-bs-theme="dark"] .badge.bg-light {
    background-color: #404040 !important;
    color: #ffffff !important;
}

/* Tablas */
[data-bs-theme="dark"] .table {
    color: #ffffff;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #2a2a2a;
}

/* Alertas */
[data-bs-theme="dark"] .alert-info {
    background-color: #1e3a5f;
    border-color: #2e5984;
    color: #b8daff;
}

[data-bs-theme="dark"] .alert-success {
    background-color: #1e3a1e;
    border-color: #2e5a2e;
    color: #b8e6b8;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: #5f1e1e;
    border-color: #842e2e;
    color: #ffb8b8;
}

/* Paginación */
[data-bs-theme="dark"] .page-link {
    background-color: #2a2a2a;
    border-color: #404040;
    color: #ffffff;
}

[data-bs-theme="dark"] .page-link:hover {
    background-color: #404040;
    border-color: #505050;
    color: #ffffff;
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Elementos específicos del sitio */
[data-bs-theme="dark"] .producto-card {
    background-color: #2a2a2a;
    border-color: #404040;
}

[data-bs-theme="dark"] .contacto-box {
    background-color: #2a2a2a !important;
}

/* Headers de catálogo */
[data-bs-theme="dark"] .header-catalogo {
    /* Los colores personalizados del catálogo se mantienen */
}

/* Ajustes para texto en fondo oscuro */
[data-bs-theme="dark"] .text-white {
    color: #ffffff !important;
}

/* Sombras adaptadas */
[data-bs-theme="dark"] .shadow,
[data-bs-theme="dark"] .shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(255, 255, 255, 0.075) !important;
}

/* Bordes */
[data-bs-theme="dark"] hr {
    border-color: #404040;
}

/* Elementos específicos para el modo oscuro en el index */
[data-bs-theme="dark"] .user-links a {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .user-links a:hover {
    color: #b0b0b0 !important;
}