/**
 * Estilos globales del Sistema de Menú Digital
 */

/* Variables CSS */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Reset y Base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utilidades */
.shadow-hover {
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.shadow-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Header */
.site-header {
    width: 100%;
    z-index: 1030;
    backdrop-filter: blur(10px);
}

.site-logo {
    transition: transform var(--transition-normal);
}

.site-logo:hover {
    transform: scale(1.05);
}

/* Footer */
.site-footer {
    background-color: #fafafa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    text-align: center;
}

.footer-link {
    color: #444;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--primary-color);
    transition: width var(--transition-normal);
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-link:hover::after {
    width: 100%;
}

/* Botones personalizados */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    color: white;
}

/* Cards */
.card-modern {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: none;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slideUp {
    animation: slideUp 0.6s ease forwards;
}

/* Tema oscuro */
[data-bs-theme="dark"] {
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .site-footer {
    background-color: #1a1d21;
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .card-modern {
    background: #2b3035;
}

[data-bs-theme="dark"] .footer-link {
    color: #adb5bd;
}

/* Responsive */
@media (max-width: 768px) {
    .site-logo {
        max-height: 45px;
    }

    .site-title {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 576px) {
    .site-header {
        padding: 0.75rem 0;
    }

    .site-logo {
        max-height: 40px;
    }
}

.producto-item {
    transition: none;
}

.producto-item:hover {
    transform: none;
}

.producto-imagen-fondo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    z-index: 0;
    transition: none;
}

#listView .producto-imagen-fondo {
    width: 160px;
    height: 160px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

#listView .producto-imagen {
    width: 220px;
    height: 220px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    transform: none;
    transition: none;
}

#listView .producto-list-view {
    position: relative;
    display: flex;
    align-items: center;
}

#listView .producto-imagen-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

#listView .position-relative:hover .producto-imagen {
    transform: none;
}

#listView .neon-figura,
#gridView .neon-figura {
    z-index: 0;
    pointer-events: none;
}

.caracteristicas {
    display: flex;
    gap: 0.5rem;
}

.precio {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--bs-primary);
}

/* Efectos neón */
.neon-effect {
    transition: all 0.3s ease;
}

.neon-figura {
    box-shadow: 0 0 5px var(--neon-color),
        0 0 10px var(--neon-color),
        0 0 15px var(--neon-color),
        0 0 20px var(--neon-color);
    z-index: 1;
}

.neon-titulo {
    text-shadow: 0 0 5px var(--neon-color),
        0 0 10px var(--neon-color),
        0 0 15px var(--neon-color),
        0 0 20px var(--neon-color);
}

.neon-lineaMenu {
    position: relative;
    border-bottom: 2px solid;
}

.neon-lineaMenu::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    box-shadow: 0 0 5px var(--neon-color),
        0 0 10px var(--neon-color),
        0 0 15px var(--neon-color);
}

.neon-icono {
    text-shadow: 0 0 5px var(--neon-color),
        0 0 10px var(--neon-color),
        0 0 15px var(--neon-color),
        0 0 20px var(--neon-color);
    color: var(--neon-color) !important;
    opacity: 1 !important;
}

/* Estilos para el select de filtro */
#filtroCategoria {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    transition: all 0.2s ease-in-out;
}

#filtroCategoria:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
    border-color: var(--bs-primary);
}

@media (max-width: 768px) {
    #filtroCategoria {
        width: 100%;
        font-size: 16px;
        /* Previene zoom en iOS */
        padding: 12px 16px;
        height: auto;
    }
}

/* Ajustes responsivos para vista lista */
#listView .producto-imagen-fondo {
    width: 160px;
    height: 160px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

#listView .producto-imagen {
    width: 220px;
    height: 220px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    transform: none;
    transition: none;
}

/* Ajustes responsivos para vista lista */
@media (max-width: 768px) {
    #listView .list-group-item {
        padding: 0.5rem;
        min-height: 100px;
        max-height: 140px;
        display: flex;
        align-items: center;
    }

    #listView .producto-imagen-fondo {
        width: 80px;
        height: 80px;
    }

    #listView .producto-imagen {
        width: 120px;
        height: 120px;
        margin: 0;
        top: 10px;
    }

    #listView .col-3 {
        width: auto;
        flex: 0 0 120px;
    }

    #listView .col-9 {
        width: auto;
        flex: 1;
        padding-left: 0.5rem;
    }

    #listView .d-flex.justify-content-between {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    #listView h5 {
        font-size: 1rem;
        line-height: 1.2;
        margin-right: 10px;
        width: calc(100% - 80px);
    }

    #listView .precio {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        padding: 0;
        font-size: 1rem;
        white-space: nowrap;
        min-width: 70px;
        text-align: right;
    }

    #listView .col-9.col-md-10 {
        padding-right: 85px;
        /* Espacio para el precio */
    }

    #listView p {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        width: 100%;
    }

    #listView .caracteristicas {
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-top: 0.25rem;
        width: 100%;
    }

    #listView .badge {
        font-size: 0.75rem;
        padding: 0.15em 0.4em;
    }

    #listView .precio {
        font-size: 1rem;
        white-space: nowrap;
    }
}

/* Ajustes para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    #listView .producto-imagen-fondo {
        width: 130px;
        height: 130px;
    }

    #listView .producto-imagen {
        width: 180px;
        height: 180px;
    }

    #listView .col-md-2 {
        width: auto;
        flex: 0 0 160px;
    }

    #listView .col-md-10 {
        flex: 1;
    }
}

/* Ajustes para productos sin imagen */
#gridView .producto-item[data-has-image="false"] .position-relative,
#listView .producto-item[data-has-image="false"] .position-relative {
    display: none !important;
}

#gridView .producto-item[data-has-image="false"] .producto-imagen-fondo,
#listView .producto-item[data-has-image="false"] .producto-imagen-fondo {
    display: none !important;
}

/* Asegurar que el contenido se muestre correctamente cuando no hay imagen */
#gridView .producto-item[data-has-image="false"] .card-body,
#listView .producto-item[data-has-image="false"] .card-body {
    padding-top: 1rem;
}

/* Ajustar el layout cuando no hay imagen */
#listView .producto-item[data-has-image="false"] .col-9,
#listView .producto-item[data-has-image="false"] .col-md-10 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 1rem;
}

#gridView .card-body {
    color: var(--bs-card-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Estilos para el dashboard */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.qr-preview {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .qr-preview {
        margin-bottom: 0;
    }
}

.qr-controls {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card {
    border: none;
    transition: none;
}

.card:hover {
    transform: none;
}

.precio-variable {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.precio-variable:last-child {
    margin-bottom: 0;
}

.precio-descripcion {
    font-size: 0.9em;
    color: var(--bs-secondary);
}

.precio-monto {
    font-weight: bold;
    padding-left: 20px;
}

#listView .precio-variable {
    display: inline-block;
    margin-right: 1rem;
}

#listView .precio-descripcion {
    margin-right: 0.5rem;
}

#listView .precios-variables-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

@media (max-width: 768px) {
    #listView .precios-variables-list {
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    #listView .precio-variable {
        margin-right: 0;
        background: var(--bs-light);
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        font-size: 0.875rem;
    }
}

/* Estilos para los botones de categoría */
.categoria-buttons {
    padding: 0.5rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.categoria-btn {
    border: 2px solid var(--categoria-color);
    color: var(--categoria-color);
    background-color: transparent;
    border-radius: 25px;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 150px;
    text-align: center;
}

.categoria-btn:hover {
    background-color: var(--categoria-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.categoria-btn.active {
    background-color: var(--categoria-color);
    color: white;
}

/* Ajustes responsivos para los botones de categoría */
@media (max-width: 768px) {
    .categoria-buttons {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .categoria-btn {
        width: 100%;
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
        min-width: unset;
    }

    .categoria-btn i {
        font-size: 1.1rem;
    }
}

/* Estilos para el slider de promociones */
/* Bloque de estilos conflictivos eliminado para permitir que index.css controle el diseño */