/* Animación de entrada para apartados principales */
.sidebar, .main-content, footer {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s cubic-bezier(.4,2,.6,1) forwards;
}
.sidebar { animation-delay: 0.1s; }
.main-content { animation-delay: 0.3s; }
footer { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: none;
    }
}
.menu-icon {
    margin-right: 10px;
    font-size: 1.3em;
    vertical-align: middle;
    transition: transform 0.2s, filter 0.2s;
    filter: drop-shadow(0 0 4px #1e90ff88);
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.sidebar ul li a::after {
    content: "";
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #1e90ff44 0%, transparent 100%);
    transition: left 0.4s cubic-bezier(.4,2,.6,1);
    z-index: 0;
}

.sidebar ul li a:hover .menu-icon,
.sidebar ul li a.active .menu-icon {
    transform: scale(1.25) rotate(-8deg);
    filter: drop-shadow(0 0 8px #1e90ffcc) brightness(1.2);
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    color: #fff;
    background: linear-gradient(90deg, #1e90ff 60%, #0b1a36 100%);
    box-shadow: 0 2px 12px #1e90ff33;
}

.sidebar ul li a:hover::after,
.sidebar ul li a.active::after {
    left: 0;
}
/* Mostrar/ocultar menú hamburguesa en móvil */
@media (max-width: 900px) {
    #sidebarMenu {
        display: none;
        flex-direction: column;
        background: #0b1a36;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100vw;
        z-index: 100;
        box-shadow: 0 4px 16px #0008;
        border-bottom: 1.5px solid #1e2d4d;
    }
    #sidebarMenu.show-menu {
        display: flex;
    }
    .menu-toggle {
        display: block !important;
        background: none;
        border: none;
        cursor: pointer;
        margin: 0 auto 0 0;
        padding: 0;
    }
    .sidebar ul:not(#sidebarMenu) {
        display: none;
    }
}
/* Estilo general futurista */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #eaf2fb;
    min-height: 100vh;
    display: flex;
    /* Fondo azul marino elegante */
    background: linear-gradient(120deg, #0a1a2f 0%, #12244a 100%);
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    pointer-events: none;
    background: repeating-linear-gradient(110deg, transparent 0 90px, #1e90ff22 90px 100px, transparent 100px 200px);
    opacity: 0.3;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #0b1a36;
    height: 100vh;
    padding: 20px;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 2px 0 16px rgba(0,0,0,0.7);
    border-right: 1.5px solid #1e2d4d;
    transition: width 0.3s;
    z-index: 10;
}

.sidebar .profile {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar .profile img {
    width: 80px;
    border-radius: 50%;
    border: 2px solid #1e90ff;
    box-shadow: 0 0 12px #1e90ff44;
}

.sidebar h2 {
    margin: 10px 0 0;
    font-size: 22px;
    color: #1e90ff;
    letter-spacing: 2px;
    font-weight: 600;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 20px 0;
}

.sidebar ul li a {
    text-decoration: none;
    color: #b3c6e0;
    display: block;
    padding: 10px;
    border-radius: 8px;
    transition: 0.3s;
    font-weight: 500;
    letter-spacing: 1px;
}

.sidebar ul li a.active,
.sidebar ul li a:hover {
    background: linear-gradient(90deg, #1e90ff 60%, #0b1a36 100%);
    color: #fff;
    box-shadow: 0 2px 8px #1e90ff33;
}

/* Contenido principal */
.main-content {
    margin-left: 270px;
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    transition: margin-left 0.3s, padding 0.3s;
}
/* Responsive: Móvil */
@media (max-width: 900px) {
    .sidebar {
        width: 70px;
        padding: 10px 0;
    }
    .sidebar .profile img {
        width: 40px;
    }
    .sidebar h2 {
        font-size: 0;
    }
    .sidebar ul li a {
        font-size: 1.3em; /* Mostrar iconos, ocultar texto con span */
        padding: 8px;
    }
    .sidebar ul li a span:not(.menu-icon) {
        display: none;
    }
    .main-content {
        margin-left: 80px;
        padding: 16px;
    }
}
@media (max-width: 600px) {
    .main-content {
        margin-left: 0;
        padding: 8px;
        min-height: unset;
    }
    .sidebar {
        position: static;
        width: 100vw;
        height: auto;
        border-right: none;
        border-bottom: 1.5px solid #1e2d4d;
        box-shadow: 0 2px 16px rgba(0,0,0,0.7);
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px;
    }
    .sidebar .profile {
        margin-bottom: 0;
    }
    .sidebar ul {
        display: flex;
        flex-direction: row;
        gap: 8px;
        margin: 0;
    }
    .sidebar ul li {
        margin: 0;
    }
    .sidebar ul li a {
        font-size: 1.3em;
        padding: 8px;
    }
    .sidebar ul li a span:not(.menu-icon) {
        display: none;
    }
}

.main-content h1 {
    color: #1e90ff;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 16px #1e90ff33;
    margin-bottom: 18px;
}

/* Centrado especial para el texto de bienvenida en index */
.main-content p {
    font-size: 1.25rem;
    color: #b3c6e0;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    text-shadow: 0 1px 8px #1e90ff22;
}

/* Productos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 30px;
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: linear-gradient(135deg, #12244a 70%, #1e2d4d 100%);
    border-radius: 16px;
    padding: 22px 18px 18px 18px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 24px #0b1a3644;
    border: 1.5px solid #1e90ff22;
}

.product-card:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #1e2d4d 60%, #22375a 100%);
    box-shadow: 0 8px 32px #1e90ff33, 0 0 24px #fff2;
    transform: translateY(-8px) scale(1.07);
}

.product-card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 12px #1e90ff22;
}

.product-card h3 {
    color: #1e90ff;
    margin: 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

/* Efecto de fondo animado */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(136,136,136,0.12) 0%, rgba(0,0,0,0.0) 70%),
                linear-gradient(115deg, transparent 60%, #88888822 80%, transparent 100%);
    mix-blend-mode: lighten;
    animation: moveBg 10s linear infinite alternate;
}
@keyframes moveBg {
    0% { filter: brightness(1) blur(0px); }
    100% { filter: brightness(1.1) blur(1.5px); }
}

/* Efecto de brillo en los títulos */
.main-content h1, .product-card h3 {
    position: relative;
    overflow: hidden;
}
.main-content h1::after, .product-card h3::after {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent 0%, #fff8 50%, transparent 100%);
    animation: shine 2.5s infinite;
}
@keyframes shine {
    0% { left: -100%; }
    60% { left: 100%; }
    100% { left: 100%; }
}

/* Botón PC: igual a móvil pero azul degradado */
.pc-btn {
  display: inline-block;
  background: linear-gradient(90deg, #1e90ff 60%, #12244a 100%);
  color: #fff;
  padding: 10px 28px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px #1e90ff33;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  margin-top: 10px;
  text-decoration: none;
}
.pc-btn:hover, .pc-btn:focus {
  background: linear-gradient(90deg, #12244a 0%, #1e90ff 100%);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 16px #1e90ff55;
}
@media (min-width: 901px) {
  .product-grid {
    align-items: stretch;
  }
  .product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 420px;
    height: 100%;
  }
  .product-card img {
    flex-shrink: 0;
    height: 150px;
    object-fit: contain;
    width: 100%;
    margin-bottom: 15px;
    display: block;
  }
  .product-card h3, .product-card p {
    flex-shrink: 0;
  }
  .product-card .pc-btn {
    margin-top: auto;
    margin-bottom: 0;
    align-self: center;
  }
}