/* 
 * DEFINITIVE PREMIUM STYLES - STABLE & REFINED
 */

:root {
    --bs-primary: #006699;
    --bs-primary-rgb: 0, 102, 153;
    --primary-soft: rgba(0, 102, 153, 0.05);
    --bs-success: #198754;
    --bs-danger: #dc3545;
}

body {
    background-color: #f1f5f9;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    padding-bottom: 100px;
    /* Espacio para que el footer fijo no tape contenido */
}

/* Elegant Action Cards */
.btn-action-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn-action-card:hover {
    transform: translateY(-3px);
    border-color: var(--bs-primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-action-card i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
    font-style: normal;
}

.btn-action-card span {
    font-weight: 800;
    color: var(--bs-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Product Cards Compact */
.product-card {
    background: white;
    border-radius: 16px;
    padding: 0.75rem 0.5rem;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.product-card .icon-box {
    width: 45px;
    height: 45px;
    background: var(--primary-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0.25rem auto;
}

.product-card .name {
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    min-height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Qty Buttons - RESTORED & IMPROVED */
.btn-qty {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    transition: all 0.2s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    outline: none !important;
}

.btn-qty-plus {
    background-color: var(--bs-success) !important;
    color: white !important;
}

.btn-qty-minus {
    background-color: var(--bs-danger) !important;
    color: white !important;
}

.btn-qty:active {
    transform: scale(0.9);
}

/* Profile Card */
.profile-card-body {
    padding: 1rem !important;
}

.btn-profile-view {
    min-width: 90px;
    white-space: nowrap;
    font-size: 0.65rem;
    padding: 0.5rem 0.8rem;
    background-color: var(--bs-primary) !important;
    border: none !important;
}

/* Sticky Footer Fixed */
.footer-fixed {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 550px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    padding: 0.85rem 1rem;
    z-index: 1050;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

/* Badge Corporate */
.badge-corp {
    background-color: var(--primary-soft);
    color: var(--bs-primary);
    font-weight: 800;
    font-size: 0.65rem;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    text-transform: uppercase;
}

/* Photo Modal Large - Refactored 4:5 */
.photo-container-lg {
    width: 100%;
    max-width: 200px;
    /* Ajuste para Tablet/Mobile para reducir altura excesiva */
    aspect-ratio: 4 / 5;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
}

.photo-container-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Global Utilities */
.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: white !important;
}

#global-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

.animate-fade {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Global Footer */
.main-footer {
    flex-shrink: 0;
    padding: 2rem 0;
    text-align: center;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    width: 100%;
}


/* Custom Pagination styles to override standard Bootstrap Blue */
.pagination .page-item .page-link {
    color: var(--bs-primary) !important;
    background-color: transparent;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    font-weight: 600;
}

.pagination .page-item .page-link:hover {
    background-color: var(--primary-soft) !important;
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: white !important;
}

.pagination .page-item.disabled .page-link {
    color: #94a3b8 !important;
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

/*
|--------------------------------------------------------------------------
| ESTILO SWITCH EVENTO
|--------------------------------------------------------------------------
*/

.switch-evento {
    background: #ffffff;
    border: 1px solid #dee2e6;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    max-width: 400px;
    margin: 0 auto;
}

.switch-evento .titulo {
    font-weight: 600;
    font-size: .95rem;
    color: #212529;
    cursor: pointer;
    line-height: 1.1;
}

.switch-evento .desc {
    font-size: .78rem;
    color: #6c757d;
    line-height: 1.1;
    margin-top: 2px;
}

.switch-evento .form-check-input {
    width: 2.8rem;
    height: 1.4rem;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0;
}

.switch-evento .form-check-input:checked {
    background-color: #006699;
    border-color: #006699;
}

.switch-evento .form-check-input:focus {
    border-color: #006699;
    box-shadow: 0 0 0 .25rem #00669920;
}

.text-justify {
    text-align: justify !important;
}

/*
|--------------------------------------------------------------------------
| STEPPER
|--------------------------------------------------------------------------
*/

.stepper-progress {
    display: flex;
    justify-content: space-between;

    position: relative;

    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
}

/* LINEA BASE */

.stepper-progress::before {
    content: "";
    position: absolute;

    top: 15px;
    left: 8%;
    width: 84%;
    height: 4px;

    background: #dee2e6;
    border-radius: 50px;
}

/* LINEA ACTIVA */

.stepper-progress::after {
    content: "";
    position: absolute;

    top: 15px;
    left: 8%;
    width: var(--stepper-progress, 0%);

    height: 4px;

    background: var(--bs-success);
    border-radius: 50px;

    transition: width .35s ease;
}

/* ITEMS */

.stepper-progress li {
    position: relative;
    z-index: 1;

    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;

    cursor: pointer;
}

/* PASOS */

.stepper-progress .step {
    width: 42px;
    height: 32px;

    background: #dee2e6;
    color: #495057;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
    font-size: .9rem;

    border-radius: 0.375rem;
    margin-bottom: 10px;
    padding: 0;

    transition: all .25s ease;
}

/* ESTADOS */

.stepper-progress li.completed .step {
    background: var(--bs-success);
    color: #fff;
}

.stepper-progress li.current .step {
    background: var(--bs-primary);
    color: #fff;

    border: 3px solid #006699;
}

/* LABEL */

.stepper-progress .label {
    font-size: .72rem;
    text-align: center;

    line-height: 1.1;
    font-weight: 600;

    color: #adb5bd;
}

.stepper-progress li.completed .label {
    color: var(--bs-success);
}

.stepper-progress li.current .label {
    color: #212529;
    font-weight: 700;
}

/* RESPONSIVE */

@media(max-width:768px) {

    .stepper-progress::before,
    .stepper-progress::after {
        top: 13px;
    }

    .stepper-progress .step {
        width: 34px;
        height: 28px;

        font-size: .72rem;
        margin-bottom: 8px;
    }

    .stepper-progress .label {
        font-size: .58rem;
    }
}


/*
|--------------------------------------------------------------------------
| BOTÓN PARA QR
|--------------------------------------------------------------------------
*/

.qr-pulse {
    animation: qrpulse 1.6s ease-in-out infinite;
}

@keyframes qrpulse {

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

    50% {
        opacity: .8;
        transform: scale(1.4);
    }
}

.btn-manual-link:hover {
    background-color: var(--bs-secondary-bg-subtle);
    color: var(--bs-secondary-emphasis) !important;
}


/*
|--------------------------------------------------------------------------
| BOTÓN PARA BOTÓN CON FONDO ANIMADO
|--------------------------------------------------------------------------
*/

.btn-gradient-animated {
    background: linear-gradient(270deg, #006699, #0088cc, #006699);
    background-size: 300% 300%;
    animation: gradientMove 5s ease infinite;
    border: none;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.btn-gradient-animated:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 102, 153, 0.4);
}

.btn-gradient-animated:active {
    transform: scale(0.97);
}

/*
|--------------------------------------------------------------------------
| EFECTO VISUAL DE ESCANEO DE CÁMARA (SCANNING LINE & GLOW CORNERS)
|--------------------------------------------------------------------------
*/

.qr-scan-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.qr-scan-overlay {
    position: absolute;
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    box-sizing: border-box;
}

/* Línea de escaneo bidireccional suave con glow */
.qr-scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #a0a0a0, #ffffff, #a0a0a0, transparent);
    box-shadow: 0 0 8px rgba(160, 160, 160, 0.8), 0 0 15px rgba(255, 255, 255, 0.5);
    opacity: 0.8;
    animation: scan-bidirectional 4s ease-in-out infinite;
}

/* Movimiento bidireccional suave con ligeras pausas arriba y abajo */
@keyframes scan-bidirectional {
    0%, 5%, 95%, 100% {
        top: 2%;
    }
    45%, 55% {
        top: 98%;
    }
}

/* Esquinas de enfocado modernas */
.qr-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid transparent;
}

.qr-top-left {
    top: 0;
    left: 0;
    border-top-color: #a0a0a0;
    border-left-color: #a0a0a0;
    border-top-left-radius: 8px;
    box-shadow: -2px -2px 5px rgba(160, 160, 160, 0.3);
}

.qr-top-right {
    top: 0;
    right: 0;
    border-top-color: #a0a0a0;
    border-right-color: #a0a0a0;
    border-top-right-radius: 8px;
    box-shadow: 2px -2px 5px rgba(160, 160, 160, 0.3);
}

.qr-bottom-left {
    bottom: 0;
    left: 0;
    border-bottom-color: #a0a0a0;
    border-left-color: #a0a0a0;
    border-bottom-left-radius: 8px;
    box-shadow: -2px 2px 5px rgba(160, 160, 160, 0.3);
}

.qr-bottom-right {
    bottom: 0;
    right: 0;
    border-bottom-color: #a0a0a0;
    border-right-color: #a0a0a0;
    border-bottom-right-radius: 8px;
    box-shadow: 2px 2px 5px rgba(160, 160, 160, 0.3);
}