/* --- CONFIGURACIÓN GENERAL Y ESTILOS --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat Alternates', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

button, a {
    outline: none !important;
}

body {
    background-color: #ffffff;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- ESTILOS DE LA PANTALLA DE CARGA --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0071dc;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotateSpinner 2s linear infinite;
}

.spinner-path {
    stroke: #ffc220;
    stroke-linecap: round;
    animation: dashSpinner 1.5s ease-in-out infinite;
}

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

@keyframes dashSpinner {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.store-icon-center {
    color: #ffc220;
    font-size: 2.5rem;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- RESTO DE DISEÑOS DE LA APP --- */
.top-image-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.bleed-img {
    width: 100%;
    height: auto;
    display: block;
    border: none;
    outline: none;
}

.top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 440px;
    margin: 20px 0;
    padding: 0 15px;
}

.pill-btn-small {
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 10px 15px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.1s ease;
    flex: 1;
    max-width: 130px;
    text-align: center;
    white-space: nowrap;
}

.pill-btn-small:active {
    transform: scale(0.96);
}

.whatsapp-clean-link {
    color: #25D366;
    font-size: 2.2rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    transition: transform 0.1s ease;
}

.whatsapp-clean-link:active {
    transform: scale(0.92);
}

.main-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 440px;
    padding: 0 15px;
    margin-bottom: 25px;
}

.main-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 18px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transition: transform 0.1s ease;
    width: 100%;
}

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

.main-btn i {
    font-size: 1.8rem;
}

.blue-btn {
    background-color: #0084ff;
    color: #ffffff;
}

.yellow-btn {
    background-color: #ffb300;
    color: #ffffff;
}

/* --- FOOTER Y LOGOTIPO FLOTANTE --- */
.footer-section {
    width: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.logo-overlay-btn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: -55px;
    z-index: 2;
    transition: transform 0.2s ease;
}

.logo-overlay-btn:active {
    transform: scale(0.95);
}

.header-logo-img {
    width: 75px;
    height: auto;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.bottom-image-container {
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.footer-text {
    width: 100%;
    background-color: #11161d;
    text-align: center;
    padding: 14px;
    font-size: 0.85rem;
    color: #a0aec0;
}

.footer-text strong {
    color: #ecc94b;
}

/* --- MODAL PERSONALIZADO DE INSTALACIÓN --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

.modal-card {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 30px 22px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    border: 3px solid #0071dc;
}

.modal-icon-header {
    background-color: #0071dc;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px auto;
    color: #ffc220;
    font-size: 1.8rem;
    box-shadow: 0 4px 10px rgba(0,113,220,0.3);
}

.modal-card h3 {
    color: #0071dc;
    font-size: 1.35rem;
    margin-bottom: 12px;
    font-weight: 800;
}

.modal-card p {
    color: #333333;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-btn-accept {
    background-color: #ffb300;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255,179,0,0.4);
}

.modal-btn-cancel {
    background-color: #edf2f7;
    color: #4a5568;
    border: none;
    padding: 12px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

/* --- MODALES DESLIZANTES (BOTTOM SHEETS) --- */
.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 20000;
}

.sheet-container {
    background-color: #ffffff;
    width: 100%;
    max-width: 480px;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 22px 20px 35px 20px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease-out;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Solo el modal de PRODUCTOS se extiende hasta la línea roja */
#productos-modal .sheet-container {
    max-height: 93vh;
    height: 93vh;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.sheet-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a202c;
}

.sheet-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sheet-whatsapp-btn {
    background-color: #25d366;
    color: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(37, 211, 102, 0.3);
}

.sheet-close-btn {
    background-color: #e53e3e;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(229, 62, 62, 0.3);
}

/* --- BARRA DE HERRAMIENTAS VISUALES --- */
.visual-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 5px 0 15px 0;
    border-bottom: 1px solid #edf2f7;
    margin-bottom: 15px;
}

.v-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e0;
    color: #2d3748;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.2s ease;
}

.v-btn:active {
    transform: scale(0.92);
    background: #e2e8f0;
}

/* --- ESTILOS DE MODO OSCURO PARA PRODUCTOS Y ALMACÉN --- */
.sheet-container.dark-mode {
    background-color: #1a202c !important;
    color: #f7fafc !important;
}

.sheet-container.dark-mode .sheet-header {
    border-bottom-color: #2d3748;
}

.sheet-container.dark-mode .sheet-header h2 {
    color: #f7fafc !important;
}

.sheet-container.dark-mode .sheet-section h4,
.sheet-container.dark-mode .sheet-section p,
.sheet-container.dark-mode .product-category-btn {
    color: #e2e8f0 !important;
}

.sheet-container.dark-mode .product-category-btn {
    background-color: #2d3748 !important;
    border-color: #4a5568 !important;
}

.sheet-container.dark-mode .product-category-btn span {
    color: #63b3ed !important;
}

.sheet-container.dark-mode .v-btn {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

.sheet-container.dark-mode .sheet-divider {
    border-top-color: #2d3748;
}

/* --- MODO CONTRASTE (VISTA SIMPLIFICADA) --- */
.sheet-container.contrast-mode .sheet-section p,
.sheet-container.contrast-mode .sheet-section hr {
    display: none !important;
}

/* --- TAMAÑOS DE TEXTO DINÁMICOS --- */
.sheet-container.font-size-sm { font-size: 0.85rem; }
.sheet-container.font-size-sm .product-category-btn { font-size: 0.85rem; padding: 10px 14px; }

.sheet-container.font-size-lg { font-size: 1.1rem; }
.sheet-container.font-size-lg .product-category-btn { font-size: 1.1rem; padding: 16px 20px; }

.sheet-container.font-size-xl { font-size: 1.25rem; }
.sheet-container.font-size-xl .product-category-btn { font-size: 1.25rem; padding: 18px 22px; }

.sheet-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sheet-section h4 {
    font-size: 0.95rem;
    color: #2d3748;
    margin-bottom: 5px;
    font-weight: 800;
}

.sheet-section p {
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.4;
}

.sheet-divider {
    border: none;
    border-top: 1px solid #edf2f7;
    margin: 5px 0;
}

.product-category-btn {
    background-color: #ffffff;
    border: 1.5px solid #e2e8f0;
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.95rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.product-category-btn span {
    color: #0071dc;
    font-weight: 800;
}

.calc-btn:active {
    transform: scale(0.95);
}