* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 30px;
}

[id] {
    scroll-margin-top: 30px;
}

@media (min-width: 901px) {
    .header-container, #header-container, .desktop-hide-header {
        display: none !important;
    }
}

body {
    font-family: 'DM Sans', sans-serif, Arial, Helvetica, sans-serif;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    /* Fix horizontal scroll X */
    width: 100%;
    min-height: 100vh;
}

@font-face {
    font-family: 'Cooper Regular';
    src: url('/fonts/cooperb.ttf') format('truetype');
    /* ruta donde subas el archivo */
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Cooper Medium';
    src: url('/fonts/cooperm.ttf') format('truetype');
    /* ruta donde subas el archivo */
    font-weight: normal;
    font-style: normal;
}

.edit-header h1,
.edit-header h2,
.edit-header-comercio {
    margin: 0;
    font-family: 'DM Sans', sans-serif, Arial, Helvetica, sans-serif;
}

h1, h2, h3, .pillars-title, .pillar-header h3, .bv-banner-content h2 {
    font-family: 'Cooper Medium', 'Cooper Regular', 'Domaine Display', Georgia, serif;
}


textarea,
button,
input {
    font-family: 'DM Sans', sans-serif, Arial, Helvetica, sans-serif;
}

main {
    display: flex;
    flex-direction: column;
    /* Production (Safari/PWA) safe area */
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
    padding-bottom: 20px;
    overflow: visible;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    transition: margin 0.3s ease, width 0.3s ease;
}

/* Prevent double padding when Capacitor App applies padding to body */
body.is-app main {
    padding-top: 20px;
}

/* Width Utility Classes */
.layout-full {
    max-width: none !important;
}

.layout-large {
    max-width: 1200px !important;
}

.layout-narrow {
    max-width: 800px !important;
    margin: 0 auto;
}

@media only screen and (min-width: 1025px) {

    /* Narrow layout (default main) - Centered in remaining space */
    main.layout-narrow {
        margin-left: calc(180px + (100% - 180px - 800px) / 2) !important;
        margin-right: auto !important;
        width: 800px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box;
    }

    /* Large layout (Marketplace, Events, etc.) - Centered with max-width */
    main.layout-large {
        margin-left: calc(180px + max(0px, (100% - 180px - 1400px) / 2)) !important;
        margin-right: auto !important;
        width: 1400px !important;
        max-width: calc(100% - 180px) !important;
        padding-left: 40px !important;
        padding-right: 40px !important;
        box-sizing: border-box;
    }

    /* Full layout (Map) - Full width, no padding */
    main.layout-full {
        margin-left: 180px !important;
        width: calc(100% - 180px) !important;
        max-width: none !important;
        padding: 0 !important;
    }
}

@media only screen and (max-width: 1024px) {
    body {
        overflow-y: auto;
    }

    main {
        padding-bottom: 65px;
        padding-left: 0;
        padding-right: 0;
    }

    body.is-app main {
        padding-bottom: calc(65px + env(safe-area-inset-bottom, 0px));
    }

    /* Marketplace, Events, etc. need some side padding on mobile */
    /* Standard gutters for most pages on mobile */
    main.layout-large,
    main.layout-narrow {
        padding-left: 7px;
        padding-right: 7px;
    }

    /* Map (layout-full) should not have side padding */
    main.layout-full {
        padding-left: 0;
        padding-right: 0;
    }
}

.edit-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 5px;
}

@media (max-width: 1024px) {
    .edit-header {
        margin-top: -15px !important;
        padding-right: 0;
        padding-left: 0;
    }

    /* In Capacitor, body.is-app padding already handles the safe area offset.
       The negative margin must not eat into that offset or the back button
       ends up inside the status bar. */
    body.is-app .edit-header {
        margin-top: -15px !important;
    }
}


.edit-header p {
    margin: 0;
}

.edit-header .icon {
    position: absolute;
    left: 10px;
    top: 50%;
    /* centrar verticalmente */
    transform: translateY(-50%);
    /* ✔ centra de verdad */
    font-size: 23px !important;
    cursor: pointer;
}

.edit-header h2 {
    margin: 0;
    width: 100%;
    text-align: center;
    /* texto centrado */
    display: flex;
    justify-content: center;
    align-items: center;
    /* ✔ centra verticalmente el texto */
    height: 100%;
}


.edit-header .account-title {
    font-size: 21px;
    color: black;
    vertical-align: middle;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Botón Volver a Inicio para móviles y tablets */
.back-button-inicio {
    display: none;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #000;
    text-decoration: none;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.back-button-inicio i {
    font-size: 28px;
    /* Un poco más grande para facilitar el toque */
}

@media (max-width: 1024px) {
    .back-button-inicio {
        display: flex;
    }

    /* Asegurar que el título no se pise con el botón en móviles pequeños */
    .edit-header h2 {
        padding: 0 40px;
    }
}

* {
    -webkit-tap-highlight-color: transparent;
}



.material-icons {
    -webkit-tap-highlight-color: transparent;
    translate: no;
    -webkit-touch-callout: none;
    /* iOS Safari */
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* estándar */
    color: black;
    font-size: 30px;
}

.material-icons:hover {
    background-color: transparent;
    /* Remove background color on hover */
    cursor: pointer;
}

.bottom-button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 10px;
    background-color: #A844A8;
    color: white;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.2s, background-color 0.2s;
    z-index: 1000;
    width: 250px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    font-weight: bold;
    border: none;
}

.bottom-button-map {
    position: fixed;
    bottom: -30px;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 10px;
    background-color: white;
    color: #A844A8;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.2s, background-color 0.2s;
    z-index: 1000;
    width: 300px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    font-weight: bold;
}

.bottom-button-map i {
    color: #A844A8;
    /* Hace el icono blanco */
}


.bottom-button i {
    color: white;
    /* Hace el icono blanco */
}

/* Para dispositivos móviles */
@media (max-width: 1024px) {

    .bottom-button {
        bottom: 65px;
    }

    body.is-app .bottom-button {
        bottom: 80px;
    }
}

/* In-app top padding — fixed offset for iOS status bar/notch in Capacitor (App-WebView UA) */
body.is-app {
    padding-top: env(safe-area-inset-top, 50px) !important;
}

/* 
// Do not drop: Previous safe area fix that covered the header UI
body.is-app::before {
    content: "";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: env(safe-area-inset-top, 50px);
    background-color: inherit;
    z-index: 99998;
}
*/

.profile-menu {
    display: flex;
    width: 100%;
    border-bottom: 2px solid #d3d3d3;
    /* Línea divisoria gris */
}

.profile-menu-selected,
.profile-menu-unselected {
    width: 50%;
    text-align: center;
    cursor: pointer;
    padding-top: 12px;
    font-size: 16.5px;
    font-weight: 500;
    margin-bottom: -2px;
    /* Texto con un poco más de peso */
}

/* Estilo para la opción seleccionada */
.profile-menu-selected {
    color: purple;
    /* Texto en púrpura */
    border-bottom: 4px solid purple;
    /* Subrayado más grueso y en púrpura */
}

/* Estilo para la opción no seleccionada */
.profile-menu-unselected {
    color: black;
    /* Texto en negro */
    border-bottom: 4px solid transparent;
    /* Sin subrayado */
}

/* Header scrollable (no fijo) */
.fixed-header {
    position: relative;
    background-color: #faf5fc;
    width: 100%;
    box-sizing: border-box;
    padding-top: 20px;
}

#page-loader {
    display: none;
    /* estado inicial oculto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.spinner-sidebar {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #92419f;
    /* tu color corporativo */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 0.8s linear infinite;
}

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

.rotate {
    display: inline-block;
    animation: spin 1s linear infinite;
    transition: all 0.3s ease;
}

/* Chat bubble with image refinement */
.message.message-image-container {
    padding: 0 !important;
    background: transparent !important;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.loading-btn {
    transform: scale(0.96);
    opacity: 0.8;
}


.info-box {
    background-color: #f3e5f5;
    /* Lila claro */
    border: 1px solid #d1c4e9;
    /* Borde lila más oscuro */
    border-radius: 8px;
    padding: 15px;
    align-items: center;
    text-align: center;
    margin-top: 10px;
    display: block !important;
}


.info-box .material-icons {
    color: #6a1b9a;
    /* Color lila oscuro */
    font-size: 24px;
}

.info-box p {
    margin: 0;
    font-size: 16px;
}

.info-box a {
    color: #4a148c;
    /* Color lila más oscuro para el enlace */
    text-decoration: underline;
}

/* Asegurar el mismo ancho para info-box y plan-gratuito */
.info-box,
.plan-gratuito {
    cursor: pointer;
}

.zone-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    width: 100%;
}

.zone-header {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    color: black;
}

.products-count {
    font-size: 18px;
    font-weight: normal;
    color: black;
}

.general-btn {
    background-color: #A844A8;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s, transform 0.2s;
    width: 100%;
    max-width: 300px;
    display: inline-flex;
    /* contenido centrado horizontal y vertical */

}

.general-btn i {
    font-size: 20px !important;
    color: white !important;
}



.progress-bar {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}


/* Estilo para todos los checkboxes */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 3px solid #A844A8;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    background-color: transparent;
    transition: background-color 0.2s, border-color 0.2s;
}

/* Estado checked: fondo morado y check blanco */
input[type="checkbox"]:checked {
    background-color: #A844A8;
    border-color: #A844A8;
}

/* Opcional: agregar un check interno con ::after */
input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.contenido-ajustado {
    margin-right: 10px;
    margin-left: 10px;
    padding-bottom: 10px
}

/* Image rounding utilities for Safari/iOS compatibility */
.rounded-frame-36 {
    display: inline-block;
    position: fixed;
    border-radius: 36px;
    overflow: hidden;
    transform: translateZ(0);
    mask-image: -webkit-radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    backface-visibility: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 100%;
}

.rounded-frame-26 {
    display: inline-block;
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    transform: translateZ(0);
    mask-image: -webkit-radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    backface-visibility: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.rounded-frame-16 {
    display: inline-block;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    transform: translateZ(0);
    mask-image: -webkit-radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    backface-visibility: hidden;
    max-width: 100%;
}

.rounded-frame-36 img,
.rounded-frame-26 img,
.rounded-frame-16 img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: 0 !important;
}

/* --- Header Global Logo Switching Logic --- */
.desktop-logo {
    display: none;
    /* Hidden by default on mobile/tablet */
}

.mobile-logo {
    display: block;
    /* Visible by default */
}

@media (min-width: 1200px) {
    .desktop-logo {
        display: block;
    }

    .mobile-logo {
        display: none;
    }

    /* El logo grande puede tener su propia altura si es necesario */
    .header-image.desktop-logo {
        height: 50px;
        width: auto;
    }
}

/* Common Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    overflow: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 600px;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
}

@media screen and (max-width: 868px) {
    .modal-content {
        width: 92%;
        padding: 20px;
    }
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #2b0c33;
}

.modal-content p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}