/* ==============================
   ESTILOS BASE
============================== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    color: #fff;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
    overflow: hidden; /* Evita scroll global */
}

body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}

/* ==============================
   NAVBAR
============================== */
nav.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: #111 !important; /* fondo oscuro adaptado */
    color: #ccc;
    z-index: 1100;
}

.navbar .dropdown-menu {
    z-index: 1100 !important; /* mayor que los filtros sticky */
}

.nav-link {
    font-weight: 500;
    color: #ccc !important;
    padding: 0.5rem 0;
}
.nav-link:hover {
    color: #6C5CE7 !important; /* violeta del logo */
    text-decoration: underline;
}

.navbar-brand .brand-name{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 1.2rem;
  background: linear-gradient(90deg,#6C5CE7,#00D2FF); /* degradado logo */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.navbar-brand img{
  display:inline-block;
  border-radius: 12px;
}

/* ==============================
   LAYOUT PRINCIPAL
============================== */
.d-flex.flex-column.min-vh-100.bg-dark.text-white {
    padding-top: 70px;  /* espacio navbar */
    padding-bottom: 60px; /* espacio footer */
    height: 100vh;
    display: flex;
    flex-direction: row; /* aside + main */
    box-sizing: border-box;
    overflow: hidden;
}

.bg-estrella {
    background-color: #ffc107 !important; /* amarillo acento */
    color: white !important;
}

.bg-violeta {
    background-color: #6C5CE7 !important; /* violeta principal */
    color: #fff !important;
}

/* ==============================
   SIDEBAR
============================== */
aside {
    background-color: #111 !important;
}

.sidebar {
    width: 250px;
    height: 100%;
    overflow-y: auto;
    background-color: #000;
    color: #fff;
}

.bg-sidebar {
    background: linear-gradient(180deg, #212121, #1c1c1c);
    border-right: 1px solid #333;
}

/* Contenedor circular para el logo */
.logo-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #6C5CE7;
    margin: 0 auto;
    padding: 5px;
    background-color: #000;
    box-shadow: 0 0 15px rgba(108,92,231,0.4);
}

.logo-sidebar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.25);
}

/* Links de la barra */
.link-sidebar {
    color: #ccc;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s, color 0.2s;
}

.link-sidebar:hover,
.link-sidebar.active {
    background-color: #343a40;
    color: #fff;
}

.link-sidebar i {
    font-size: 1.1rem;
}

/* Botón logout */
.sidebar .btn-outline-danger {
    border-color: #c0392b;
    color: #c0392b;
}
.sidebar .btn-outline-danger:hover {
    background-color: #c0392b;
    color: #fff;
}

/* ==============================
   FOOTER
============================== */
footer.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px; /* más bajo */
    background-color: #111 !important;
    border-top: 1px solid #fff;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
}

/* Contenedor scroll */
.marquee {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    height: 100%;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    display: flex;
    justify-content: center; /* ✅ centrado horizontal */
    align-items: center;     /* ✅ centrado vertical */
}

/* Logos */
.marquee-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px; /* ✅ más separados */
    padding: 0 40px;
}

.logo-item {
    flex: 0 0 auto;
    cursor: pointer;
    transition: transform 0.2s;
}

.logo-item:hover {
    transform: scale(1.1);
}

.logo-item img {
    max-height: 55px; /* un poco más chico */
    width: auto;
    display: block;
}

/* Flechas */
.scroll-btn {
    display: none; /* por defecto ocultas */
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    z-index: 25;
    transition: background 0.2s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* ✅ flechas centradas verticalmente */
}

.scroll-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.scroll-btn.left {
    left: 10px;
}

.scroll-btn.right {
    right: 10px;
}

/* ==============================
   MAIN CONTENT
============================== */
main.flex-grow-1.p-4 {
    height: 100%;
    overflow-y: auto;
    flex-grow: 1;
}

/* ==============================
   FORMULARIOS & INPUTS
============================== */
.form-control,
.form-select {
    background-color: #222 !important;
    color: #fff !important;
    border-color: #444;
}
.form-control:focus,
.form-select:focus {
    border-color: #6C5CE7;
    box-shadow: none;
}

/* Labels */
.form-label { color: #ccc; }

/* Placeholder blanco */
input::placeholder { color: white; opacity: 1; }

/* File input */
input[type="file"]::file-selector-button {
    background-color: #333;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
}
input[type="file"]::file-selector-button:hover {
    background-color: #444;
}

/* Checkboxes y radios */
.form-check-input,
.form-check-label { cursor: pointer; }

.form-select {
    cursor: pointer;
}

/* ==============================
   CARDS
============================== */
.card {
    background-color: #111 !important;
    color: #fff;
    border: 1px solid #333;
}

/* ==============================
   MODALS
============================== */
.modal-content {
    background-color: #111 !important;
    color: #fff !important;
    border: 1px solid #333;
}
.modal-header,
.modal-footer {
    background-color: #111 !important;
    border-color: #222;
}
.modal-header .btn-close { filter: invert(1); }

/* ==============================
   TABLAS (Dark Mode)
============================= */
.table-responsive { overflow-x: hidden; }

.table-container {
    flex: 1 1 auto;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
}

.table-container thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #212529;
}

.table td, .table th { vertical-align: middle; }

/* ==============================
   PAGINACIÓN
============================= */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info { color: #ccc; }

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #fff !important;
    border-radius: 0.3rem;
    padding: 0.2rem 0.6rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #6C5CE7 !important;
    color: #fff !important;
    border: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #5b4bcf !important;
    color: #fff !important;
}

.dataTables_wrapper { display: flex; flex-direction: column; height: calc(100vh - 300px); }

.dataTables_wrapper .dataTables_scrollBody { overflow-x: hidden !important; }

.pagination .page-link {
    font-size: 0.8rem;
    color: white;
    background-color: transparent;
    border: 1px solid white;
    padding: 0.25rem 0.5rem;
    min-width: 30px;
}
.pagination .page-link:hover {
    background-color: rgba(255,255,255,0.2);
    color: white;
}
.pagination .page-item.disabled .page-link {
    color: rgba(255,255,255,0.5);
    border-color: rgba(255,255,255,0.5);
}

/* ==============================
   ALERTAS
============================== */
.alert-success {
    background-color: #14532d !important;
    color: #d1fae5 !important;
    border-color: #166534;
}
.alert-danger {
    background-color: #7f1d1d !important;
    color: #fee2e2 !important;
    border-color: #991b1b;
}
.alert-warning {
    background-color: #78350f !important;
    color: #fef3c7 !important;
    border-color: #92400e;
}

.info-box {
    background-color: #c3def7; /* azul claro */
    border: 1px solid #b8daff;
    color: #0c5460;
}

.warning-box {
    background-color: #78350f;
    color: #fef3c7;
    border-color: #92400e;
}

/* ==============================
   LINKS
============================== */
a { color: #6C5CE7; }
a:hover { text-decoration: underline; }

/* ==============================
   BOTONES
============================== */
.btn-primary {
    background-color: #6C5CE7;
    border-color: #6C5CE7;
}
.btn-primary:hover {
    background-color: #5b4bcf;
    border-color: #5b4bcf;
}
.btn-success {
    background-color: #20c997;
    border-color: #20c997;
}
.btn-success:hover {
    background-color: #28a285;
    border-color: #28a285;
}
.btn-danger {
    background-color: #c0392b;
    border-color: #c0392b;
}
.btn-danger:hover {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.btn-outline-violet {
    color: #6C5CE7;
    border-color: #6C5CE7;
}
.btn-outline-violet:hover {
    background-color: #6C5CE7;
    color: #fff;
}

/* ==============================
   NOTIFICACIONES DROPDOWN
============================== */
#dropdownNotificaciones {
    background-color: #000;
    border-radius: 0.5rem;
    color: #fff;
    border: 1px solid #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
#dropdownNotificaciones .dropdown-item {
    background-color: transparent;
    color: #fff;
    padding: 12px;
}
#dropdownNotificaciones .dropdown-item.text-center {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff !important;
}
#dropdownNotificaciones .dropdown-item:hover,
#dropdownNotificaciones .noti-item:hover {
    background-color: #1a1a1a;
    color: #fff;
}

.noti-item {
    display: flex;
    align-items: start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #fff !important;
    transition: background-color 0.15s ease;
    color: #fff;
}
.noti-item img,
.noti-item .fallback-logo {
    width: 40px;
    height: 40px;
    border: 1px solid #fff !important;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}
.noti-item .fallback-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.06);
}
.noti-content { flex: 1; font-size: 0.9rem; }
.noti-message { font-weight: 500; }
.noti-date { font-size: 0.75rem; color: #b0b0b0; }

/* ==============================
   CARRITO DROPDOWN
============================== */
#dropdownCarrito {
    background-color: #000;
    border-radius: 0.5rem;
    color: #fff;
    border: 1px solid #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

#dropdownCarrito .dropdown-item,
#cartItems .list-group-item {
    background-color: #000;
    color: #fff;
    border: 1px solid #444; /* borde sutil entre productos */
    padding: 8px 12px;
}

#dropdownCarrito .dropdown-item.text-center {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff !important;
}

#dropdownCarrito .dropdown-item:hover,
#dropdownCarrito .cart-item:hover {
    background-color: #1a1a1a;
    color: #fff;
}

/* Contenedor del item del carrito */
/* Contenedor del item del carrito */
.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #fff !important;
    border-radius: 6px;
    background-color: rgba(0,0,0,0.2);
    transition: background-color 0.15s ease;
    color: #fff;
}

/* Imagen del producto */
.cart-item img,
.cart-item .fallback-logo {
    width: 40px;
    height: 40px;
    border: 1px solid #fff !important;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.cart-item .fallback-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.06);
    font-size: 0.8rem;
    color: #fff;
}

/* Contenedor de texto del producto */
.cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    min-width: 0; /* Importante para que line-clamp funcione dentro de flex */
}

/* Nombre limitado a 2 líneas */
.cart-name {
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* Cantidad y precio alineados al final */
.cart-qty {
    font-size: 0.75rem;
    color: #b0b0b0;
    display: flex;
    justify-content: space-between;
    min-width: 0; /* evita que los spans se salgan */
}

/* ==============================
   TARJETAS DE PRODUCTO
============================== */
.product-card {
    background-color: #111;
    border: 1px solid #333;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    height: auto;
    position: relative;
}
.product-card:hover {
    border-color: #6C5CE7;
    box-shadow: 0 8px 20px rgba(108,92,231,0.2);
    transform: translateY(-4px);
}

.product-card img {
    width: 100%;
    height: 50%;
    object-fit: cover;
    border-bottom: 1px solid #333;
}

.product-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.product-description {
    font-size: 0.9rem;
    color: #ccc;
    flex-grow: 1;
    margin-bottom: 0.75rem;
}

.product-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.product-tag {
    background-color: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #6C5CE7;
    margin-bottom: 0.75rem;
}

.product-card .btn-primary {
    width: 100%;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem;
}
.product-card .btn-primary:hover {
    background-color: #5b4bcf;
    border-color: #5b4bcf;
}

@media (min-width: 1200px) {
  .col-lg-5th {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

/* ==============================
   ANIMACIONES Y MICRO-INTERACCIONES
============================== */

/* Hover degradado animado en links principales */
a {
    color: #6C5CE7;
    position: relative;
    transition: color 0.3s ease;
}
a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg,#6C5CE7,#00D2FF);
    transition: width 0.3s ease;
}
a:hover::after { width: 100%; }

/* Botones con degradado dinámico */ 

.btn-primary, 
.btn-outline-violet 
{ 
    background: linear-gradient(90deg, #6C5CE7, #00D2FF); 
    border: none; 
    transition: all 0.3s ease; 
    position: relative; 
    overflow: hidden; 
    font-weight: 500;
} 

.btn-primary::after, 
.btn-outline-violet::after 
{ 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: -100%; 
    width: 100%; 
    height: 100%; 
    background: rgba(255,255,255,0.1); 
    transform: skewX(-20deg); 
    transition: all 0.5s ease; 
} 

.btn-primary:hover::after, 
.btn-outline-violet:hover::after 
{ 
    left: 100%; 
} 

.btn-primary:hover, 
.btn-outline-violet:hover 
{ 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(108,92,231,0.4); 
}

/* Botón secundario con degradado dinámico */
.btn-secondary {
    background: linear-gradient(90deg, #5e6669, #4d5457);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: #2d3436; /* texto gris oscuro */
    font-weight: 500;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.15);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}

.btn-secondary:hover::after {
    left: 100%;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(178, 190, 195, 0.5);
}

/* Botón secundario con degradado dinámico */
.btn-secondary-overflow {
    background: linear-gradient(90deg, #5e6669, #4d5457);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    color: #ffffff; /* texto gris oscuro */
    font-weight: 500;
}

/* ==============================
   BOTONES CON EFECTO GRADIENTE
============================== */

/* Base */
.btn-gradient {
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.btn-gradient::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}
.btn-gradient:hover::after {
    left: 100%;
}
.btn-gradient:hover {
    transform: translateY(-2px);
}

/* Violeta / Celeste */
.btn-violet {
    background: linear-gradient(90deg, #6C5CE7, #00D2FF);
    box-shadow: 0 4px 12px rgba(108,92,231,0.4);
}

/* Rojo */
.btn-red {
    background: linear-gradient(90deg, #FF4B2B, #FF416C);
    box-shadow: 0 4px 12px rgba(255,65,108,0.4);
}

/* Verde */
.btn-green {
    background: linear-gradient(90deg, #11998e, #38ef7d);
    box-shadow: 0 4px 12px rgba(56,239,125,0.4);
}

/* Amarillo / Naranja */
.btn-yellow {
    background: linear-gradient(90deg, #F7971E, #FFD200);
    box-shadow: 0 4px 12px rgba(247,151,30,0.4);
    color: #333; /* más contraste sobre amarillo */
}

/* Azul */
.btn-blue {
    background: linear-gradient(90deg, #1E3C72, #2A5298);
    box-shadow: 0 4px 12px rgba(42,82,152,0.4);
}

/* Naranja fuerte */
.btn-orange {
    background: linear-gradient(90deg, #FF8008, #FFC837);
    box-shadow: 0 4px 12px rgba(255,128,8,0.4);
}

/* Rosa */
.btn-pink {
    background: linear-gradient(90deg, #ff758c, #ff7eb3);
    box-shadow: 0 4px 12px rgba(255,118,179,0.4);
}

/* Hover en cards de producto */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.product-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(108,92,231,0.3);
    border-color: #00D2FF;
}

/* Animación suave para tarjetas de notificaciones */
.noti-item {
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.noti-item:hover {
    background-color: #1a1a1a;
    transform: translateX(3px);
}

/* Inputs y selects con glow sutil al focus */
.form-control:focus,
.form-select:focus {
    border-color: #00D2FF;
    box-shadow: 0 0 8px rgba(0,210,255,0.5);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Sidebar links con transición de fondo y color */
.link-sidebar {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}
.link-sidebar:hover,
.link-sidebar.active {
    transform: translateX(3px);
}

/* Micro-animación footer al hacer hover sobre links */
footer.footer a {
    transition: color 0.3s ease;
}
footer.footer a:hover {
    color: #00D2FF;
}

/* Scrollbars personalizados para dark mode */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e1e1e;
}
::-webkit-scrollbar-thumb {
    background: #6C5CE7;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00D2FF;
}

/* ==============================
   OMITIR ANIMACIONES EN LOGOS
============================== */
.no-hover,
.no-hover:hover,
.no-hover::after {
    color: inherit !important;
    transform: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    width: 0 !important; /* elimina subrayado animado */
    background: none !important;
    transition: none !important;
}
