:root {
    --color-principal: #ffffff;
    --fuente-principal: 'Arial', sans-serif;
    --color-header: #6025a0;
    --color-header-dark: #4a1c82;
    --color-button-bg: rgba(255, 255, 255, 0.1);
    --color-button-hover: rgba(255, 255, 255, 0.25);
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body {
    background-color: var(--color-principal);
    font-family: var(--fuente-principal);
    margin: 0;
    padding-top: 120px;
}

#static_header {
    background-color: var(--color-header);
    height: 60px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1040;
    transition: top 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#static_header .logo-header {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

#dynamic_header {
    background: linear-gradient(to right, var(--color-header), var(--color-header-dark));
    height: 60px;
    position: fixed;
    top: 60px;
    width: 100%;
    z-index: 1030;
    transition: top 0.3s ease;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

#dynamic_header a {
    color: white;
    font-weight: bold;
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 50px; /* estilo bubble */
    background-color: var(--color-button-bg);
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#dynamic_header a:hover {
    background-color: var(--color-button-hover);
    transform: translateY(-2px);
}

img {
  aspect-ratio: attr(width) / attr(height); /* experimental: no todos los navegadores */
  height: auto;
}

/* Sub Paginas */
#home,
#info,
#productos,
#about,
#contact,
#faq,
#privacy,
#terms {
    min-height: 100vh;
    scroll-margin-top: 120px;
    height: auto !important;
}

#home {
    padding-bottom: 3rem;
}

#home .imagen-home {
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0 1rem;
}

.img-clean-45 {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16; 
    border-radius: 16px;
    background: none;
    border: none;
    box-shadow: none;
    display: block;
}

.frase-rotativa {
    font-size: 2.2rem;
    color: var(--color-header-dark);
    min-height: 60px;
    display: inline-block;
    white-space: nowrap;
    position: relative;
}

.frase-rotativa::after {
    content: "\00a0"; /* espacio no-break invisible */
    visibility: hidden;
}  

.frase-rotativa.mostrar {
    opacity: 1;
}

#icono-accion {
    transition: transform 0.3s ease, color 0.3s ease;
    position: absolute;
    top: 5px;
    left: 0;
    font-size: 1.2rem;
    color:var(--color-header-dark);
}

.lapiz {
    color: var(--color-header-dark);
    transform: rotate(0deg);
}

.goma {
    color:var(--color-header-dark);
    transform: rotate(-20deg);
}

#info {
    background-color: black;
    scroll-margin-top: 60px;
    position: relative;
}

#info::before {
    content: "";
    display: block;
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, white, black, black, black);
    pointer-events: none;
}

#productos {
    background-color: black;
    scroll-margin-top: 60px;
    position: relative;
}

#productos::before {
    content: "";
    display: block;
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, black, white, white, white);
    pointer-events: none;
}

/* ======================================================================== */
/* =============================== FOOTER ================================= */
/* ======================================================================== */

footer{
    background-color: var(--color-header-dark);
    position: relative;
}

footer::before {
    content: "";
    display: block;
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, white, var(--color-header-dark), var(--color-header-dark), var(--color-header-dark));
    pointer-events: none;
}

ul.footer-links li a {
  display: inline-block;
  padding: 8px 0;
  min-height: 44px;
}

/* ======================================================================== */
/* ============================== PRODUCTOS =============================== */
/* ======================================================================== */

.img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: transparent;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-img:hover {
    transform: scale(1.02);
}

/* ======================================================================== */
/* ================================ LOGIN ================================= */
/* ======================================================================== */

.login-page {
    background-color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Tarjeta con glassmorphism */
.login-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    animation: fadeSlideUp 0.6s ease;
}

/* Animación suave al cargar */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Título atractivo */
.login-card h2 {
    color: var(--color-header-dark);
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Campo con ícono */
.input-group-text {
    background-color: var(--color-header-dark);
    color: white;
    border: none;
}

/* Input limpio */
.form-control:focus {
    box-shadow: none;
    border-color: var(--color-header);
}

/* Botón con gradiente animado */
.login-btn {
    background: linear-gradient(45deg, var(--color-header), var(--color-header-dark));
    border: none;
    color: white;
    font-weight: bold;
    padding: 10px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ======================================================================== */
/* ============================== DASHBOARD =============================== */
/* ======================================================================== */

.sidebar {
    background-color: var(--color-header);
    color: var(--color-principal);
    min-height: 100vh;
    padding: 20px 10px;
    box-shadow: var(--box-shadow);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}
.sidebar .nav-link {
    color: var(--color-principal);
    font-weight: bold;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background-color 0.3s, transform 0.2s;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background-color: var(--color-header-dark);
    transform: translateX(4px);
}
.sidebar .logout-btn {
    font-size: 1.5rem;
    transition: transform 0.2s, color 0.3s;
}
.sidebar .logout-btn:hover {
    transform: rotate(-15deg) scale(1.1);
    color: #ff4d4d;
}
.sidebar-header {
    width: 100%;
    padding-bottom: 10px;
}
.main-content {
    background: #f9f9f9;
    min-height: 100vh;
    padding: 30px;
    border-radius: 12px;
    overflow-x: auto;
}

/* Tablas */
.custom-table thead th {
    background: linear-gradient(to right, var(--color-header), var(--color-header-dark)) !important;
    color: var(--color-principal) !important;
    border-color: var(--color-header-dark);
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
    font-size: 0.95rem;
}
.custom-table td {
    text-align: center;
    vertical-align: middle;
}

/* Botón violeta personalizado */
.btn-purple {
    background: linear-gradient(45deg, var(--color-header), var(--color-header-dark));
    color: var(--color-principal);
    font-weight: bold;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.3s;
}
.btn-purple:hover {
    background: linear-gradient(45deg, var(--color-header-dark), var(--color-header));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: var(--color-principal);
}

/* Grupo de botones acciones */
.btn-group .btn {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.btn-group .btn i {
    font-size: 1.1rem;
}

.btn-outline-primary:hover {
    background-color: var(--color-header);
    color: var(--color-principal);
    border-color: var(--color-header);
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.table-header-color {
    background-color: var(--color-header-dark);
}

.dashboard-card {
    background: linear-gradient(45deg, var(--color-header), var(--color-header-dark));
    border-radius: 16px;
    color: white;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.dashboard-card .card-title {
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.shadow-text {
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.badge-number {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 12px 24px;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 50px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.2);
    margin-top: 10px;
    color: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(255,255,255,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(255,255,255,0.4); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(255,255,255,0.4); }
}

/* ======================================================================== */
/* ============================ Custom Botones ============================ */
/* ======================================================================== */

.btn-glass {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border-radius: 50px;
    transition: background-color 0.3s, transform 0.2s;
}
.btn-glass:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    color: white;
}

.bg-black {
    background-color: black !important;
}

/* ======================================================================== */
/* ======================== Bootstrap y Tablas ============================ */
/* ======================================================================== */

.bg-purple {
    background-color: var(--color-header) !important;
}

.text-white {
    color: white !important;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-table {
    min-width: 768px;
    font-size: 0.9rem;
}

.custom-table th,
.custom-table td {
    padding: 0.5rem;
    text-align: center;
    vertical-align: middle;
}

/* ======================================================================== */
/* ======================== AJUSTES PARA DESKTOP ========================== */
/* ======================================================================== */
@media (min-width: 768px) {
    #home img {
        max-width: 500px;
    }
}

@media (min-width: 992px) {
    #home .row {
        max-width: 1300px;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }

    #home .col-md-5 {
        max-width: 48%;
    }

    #home .imagen-home img {
        aspect-ratio: 4 / 5; /* asegurar uniformidad */
        max-height: 600px;
    }
}

/* ======================================================================== */
/* ======================== AJUSTES PARA CELULAR ========================== */
/* ======================================================================== */
@media (max-width: 767px) {
    .elfsight-app-938a014e-714a-412c-848e-2d03cc2a4829 {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
}

@media (max-width: 767.98px) {
    #home .row.justify-content-center {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    #home .col-12 {
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
    }

    #home .ratio {
        height: auto !important;
        aspect-ratio: auto !important;
    }
}

/* ======================================================================== */
/* ======================== AJUSTES PARA CELULAR ========================== */
/* ======================================================================== */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
        overflow-x: hidden;
    }

    #static_header,
    #dynamic_header {
        height: 50px;
    }

    #dynamic_header {
        flex-wrap: wrap;
        padding: 4px 6px;
        gap: 4px;
        justify-content: space-around;
        height: auto;
    }

    #dynamic_header a {
        font-size: 0.75rem;
        padding: 6px 10px;
        flex: 1 1 auto;
        text-align: center;
        max-width: 48%;
    }

    .frase-rotativa {
        font-size: 1.2rem;
        min-height: auto;
    }

    #icono-accion {
        font-size: 1rem;
        top: 2px;
    }

    #home .imagen-home img {
        height: auto;
        max-height: none;
    }

    #home .col-12 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #home .ratio {
        aspect-ratio: auto !important;
        height: auto !important;
    }

    .main-content {
        padding: 16px;
    }

    h1,
    h2 {
        font-size: 1.4rem;
    }

    .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .btn-purple {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .custom-table {
        min-width: 768px;
        font-size: 0.85rem;
    }

    .custom-table th,
    .custom-table td {
        padding: 0.5rem;
        text-align: center;
        vertical-align: middle;
    }

    .btn-group {
        justify-content: center;
        display: flex;
        gap: 0.5rem;
    }

    .frase-rotativa {
        font-size: 1.5rem;
        min-height: 40px;
    }

    #info::before,
    #productos::before {
        height: 30px;
    }

    footer::before {
        top: -10px;
        height: 10px;
    }

    footer {
        padding: 1rem;
    }

    footer p.small {
        font-size: 0.8rem;
    }

    footer .fs-5 {
        font-size: 1.2rem !important;
    }

    footer i.bi {
        font-size: 32px !important;
    }

    .img-container {
        height: 180px;
    }

    .product-img {
        object-fit: contain;
    }

    .login-card h2 {
        font-size: 1.4rem;
    }

    .sidebar {
        min-height: auto;
    }

    .sidebar .nav-link {
        font-size: 0.9rem;
        padding: 8px 10px;
    }

    .btn-purple {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .badge-number {
        font-size: 1.4rem;
        padding: 8px 16px;
    }

    .dashboard-card .card-title {
        font-size: 1rem;
    }

    .img-fluid.rounded.shadow-sm {
        max-width: 100%;
        height: auto;
    }

    .text-white.fs-5.me-3 i {
        font-size: 1.5rem !important;
    }

    /* Footer texto */
    footer p.small {
        font-size: 0.8rem;
    }
}
