h1, h2, h3, .btn, .card {
    font-family: 'Raleway', sans-serif;
}
.modo-oscuro {
    color: white;
    isolation: isolate;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    color: #fff;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 4px 0 15px rgba(0,0,0,0.3);
    border-right: 1px solid rgba(255,255,255,0.1);
    z-index: 1200;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}
.sidebar.open {
    left: 0;
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
}
.sidebar-header h4 {
    margin: 0;
    color: #fff;
}
.close-sidebar-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    transition: color 0.2s;
}
.close-sidebar-btn:hover {
    color: #ccc;
}
.sidebar-categorias {
    margin-top: 10px;
    margin-bottom: 80px;
}
.grupo-sidebar {
    margin-bottom: 12px;
}
.grupo-titulo {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 8px;
    font-weight: bold;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    transition: background 0.2s;
}
.grupo-titulo:hover {
    background: rgba(255,255,255,0.1);
}
.toggle-subgrupo, .toggle-subsub {
    font-size: 12px;
    transition: transform 0.2s;
}
.subgrupo-lista, .subsub-lista {
    display: none;
}
.subgrupo-lista.open, .subsub-lista.open {
    display: block;
}
.subgrupo-lista {
    margin-left: 16px;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.2);
}
.subgrupo-titulo-secundario {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px 6px 12px;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.subgrupo-titulo-secundario:hover {
    background: rgba(255,255,255,0.08);
}
.subsub-lista {
    margin-left: 20px;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.15);
}
.subsub-item, .subgrupo-item {
    padding: 4px 0 4px 24px;
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.subsub-item:hover, .subgrupo-item:hover {
    background: rgba(255,255,255,0.08);
}
#vendedoresHeader, #serviciosHeader {
    cursor: pointer;
    width: 300px;
}
.vendedores-header-clickable, .servicios-header-clickable {
    cursor: pointer;
    transition: color 0.2s;
}
.vendedores-header-clickable:hover, .servicios-header-clickable:hover {
    color: #ffc107;
}
.sidebar-filtro-provincia {
    margin-top: 15px;
    padding: 0 10px;
}
.sidebar-filtro-provincia label {
    font-size: 0.8rem;
    margin-bottom: 5px;
    display: block;
}

/* Overlay del sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1199;
}
.sidebar-overlay.active {
    display: block;
}

/* ========== MODAL DE IMÁGENES ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.modal-hidden {
    display: none !important;
}
.modal-visible {
    display: flex;
}
.modal-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}
#imgModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
    opacity: 0;
}
#imgModal.show {
    display: flex;
    opacity: 1;
}
#imgModal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}
#modal-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* ========== TOAST ========== */
.toast-notificacion {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
    transform: translateX(400px);
}
@media (max-width: 480px) {
    .toast-message {
        font-size: 1rem;
        padding: 10px 18px;
    }
}
.toast-message {
    white-space: nowrap;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 20px;
    font-family: 'Raleway', sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    box-shadow: 0 0 30px rgba(255,255,255,0.7), 0 0 60px rgba(139,92,246,0.5);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}
.toast-message-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* ========== BOTÓN VOLVER ARRIBA ========== */
.btn-volver-arriba {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background-color: white;
    color: black;
    border: none;
    border-radius: 50%;
    width: 40px;
    display: none;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn-volver-arriba:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}
#volverArriba.btn-visible {
    display: block;
}
#volverArriba.btn-hidden {
    display: none;
}

/* ========== LOGIN FLOTANTE ========== */
.admin-toggle-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 997;
    display: none;
    background: rgba(0,0,0,0.8);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
}
.login-floating-form {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: rgba(0,0,0,0.9);
    padding: 15px;
    border-radius: 10px;
    width: 250px;
}
.login-floating-form button {
    background: rgba(0,0,0,0.8);
    color: white;
    border: 1px solid white;
    padding: 9px 15px;
    border-radius: 20px;
    font-size: 14px;
}

/* ========== SPINNER ========== */
@keyframes spinner-border {
    to { transform: rotate(360deg); }
}
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}
.spinner-border.text-light {
    color: #f8f9fa !important;
}
.text-center .spinner-border {
    margin: 0 auto;
}

/* ========== UTILIDADES DE VISIBILIDAD ========== */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block; }
.btn-visible { display: block; }
.btn-hidden { display: none; }
.paso-oculto { display: none !important; }
.paso-visible { display: block !important; }

/* ========== BOTONES GENERALES ========== */
.btn {
    contain: content;
}
.btn-grupo {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: white;
    box-shadow: 0 0 6px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-grupo:hover {
    background: #fff;
    color: #333;
    transform: scale(1.05);
}
.btn-nav {
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 600;
    margin: 6px;
    padding: 1px 6px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: white;
    box-shadow: 0 0 6px rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-nav:hover {
    background: #fff;
    color: #333;
    transform: scale(1.05);
}
.btn-cargar-mas {
    display: block;
    width: fit-content;
    margin: 20px auto 80px auto;
    height: 40px;
    text-align: center;
}

/* ========== MISCELÁNEA ========== */
.whatsapp-icono {
    width: 20px;
    height: 20px;
}
.btn-whatsapp-personalizado {
    background: #0c6909 !important;
    color: white !important;
}
.costo-envio-texto {
    font-size: 0.9rem;
}
.preservar-saltos {
    white-space: pre-line;
    word-wrap: break-word;
}
.ml-10 {
    margin-left: 10px;
}
.mt-10 {
    margin-top: 10px;
}
