/* Paleta Muncisa (azules del logo). --theme-color es el acento (botones,
   enlaces); --brand-navy el fondo de cabecera y pie; --theme-color-light el
   acento para texto sobre fondos oscuros, donde el azul normal no contrasta. */
:root {
    --brand-navy: #183c6c;
    --brand-blue: #306c9c;
    --theme-color: #0078b4;
    --theme-color-hover: #005c8a;
    --theme-color-light: #6cb4e4;
}
a {
    color: var(--theme-color);
    text-decoration: none;
}
.bg-brand {
    background-color: var(--brand-navy) !important;
}
/* Fuentes Futura anteriores - comentadas para poder volver si es necesario
@font-face {
    font-family: FuturaStd-Light;
    src: url(../fonts/FuturaStd-Light.otf);
}
@font-face {
    font-family: FuturaStd-Medium;
    src: url(../fonts/FuturaStd-Medium.otf);
}
@font-face {
    font-family: FuturaStd-Bold;
    src: url(../fonts/FuturaStd-Bold.otf);
}
body {
    font-family: FuturaStd-Light, sans-serif;
    color: #666666;
}
*/

/* Figtree - Nueva fuente principal del sitio */
@font-face {
    font-family: 'Figtree-Light';
    src: local('Figtree Light'), local('Figtree-Light');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'Figtree-Medium';
    src: local('Figtree Medium'), local('Figtree-Medium');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Figtree-Bold';
    src: local('Figtree Bold'), local('Figtree-Bold');
    font-weight: 700;
    font-style: normal;
}
body {
    font-family: 'Figtree', sans-serif;
    font-weight: 300;
    color: #666666;
}

/* Quickcart offcanvas a 100% del ancho del viewport en movil
   para que no genere scroll horizontal residual al cerrarse. */
@media (max-width: 576px) {
    #quick-cart-box.offcanvas-end {
        width: 100%;
        max-width: 100%;
    }
}
.text-theme {
    color: var(--theme-color);
    text-decoration: none;
}
a.text-theme:hover {
    color: var(--theme-color-hover);
    text-decoration: underline;
}
.bg-theme {
    background-color: var(--theme-color);
}
/* Cabeceras de página (`bg-theme text-body`): sobre el azul, texto en blanco. El
   `text-body` de Bootstrap lleva !important, de ahí el !important aquí. */
.bg-theme,
.bg-theme.text-body,
.bg-theme h1, .bg-theme h2, .bg-theme h3, .bg-theme h4, .bg-theme h5, .bg-theme h6,
.bg-theme a:not(.btn) {
    color: #fff !important;
}
.bg-theme .btn-outline-dark,
.bg-theme .btn-outline-primary {
    color: #fff;
    border-color: #fff;
}
.bg-theme .btn-outline-dark:hover,
.bg-theme .btn-outline-primary:hover {
    color: var(--theme-color);
    background-color: #fff;
    border-color: #fff;
}
.btn-theme {
    color: #fff;
    background-color: var(--theme-color);
    border-color: var(--theme-color);
}
.btn-theme:hover {
    color: #fff;
    background-color: var(--theme-color-hover);
    border-color: var(--theme-color-hover);
}
.toastify.success {
    background: #198754 !important;
}
.toastify.error {
    background: #dc3545 !important;
}
.toastify.warning {
    color: #000 !important;
    background: #ffc107 !important;
}
.toastify.info {
    background: #0d6efd !important;
}
/* Botón de cerrar del toast (Toastify): anclado arriba a la derecha,
   no debajo del texto. La .toastify ya es position:fixed, así que sirve
   de contexto para posicionar la X en absoluto. */
.toastify {
    padding-right: 38px;
}
.toastify .toast-close {
    position: absolute;
    top: 6px;
    right: 8px;
    padding: 0;
    margin: 0;
    line-height: 1;
    font-size: 1.15rem;
    opacity: 0.7;
}
.toastify .toast-close:hover {
    opacity: 1;
}
.header {
    position: relative;
    padding: 15px 0;
    z-index: 10;
}
.header * {
    position: relative;
    z-index: 2;
}
.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
}
.dark-4 {
    background: rgba(0, 0, 0, 0.4);
}

.card-default
{
    border-bottom: 5px solid #DDDDDD !important;
    border-radius: 6px !important;
    border-color: #DDDDDD;
}
.card-default > .card-header {
    color: #468847;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
.card-success
{
    border-bottom: 5px solid green !important;
    border-radius: 6px !important;
    border-color: #d6e9c6;
}
.card-success > .card-header {
    color: #468847;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
.card-warning
{
    border-bottom: 5px solid orange !important;
    border-radius: 6px !important;
}
.card-warning > .card-header {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}
.img-background {
    background: #FFF url(/storage/images/bg-1.png) repeat-x bottom;
}
.mh-162 {
    min-height: 162px !important;
}
.table.especificaciones th img {
    width: 30px;
}
div.heading-title {
    position: relative;
    margin-bottom: 40px;
}
div.heading-title.heading-dotted {
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKAQMAAAC3/F3+AAAABlBMVEX///+QkJApn3LQAAAAAnRSTlMAgJsrThgAAAAOSURBVHheYwCCUAdcJAAnnALqo5TBzAAAAABJRU5ErkJggg==) repeat-x center;
}
div.heading-title.text-center h1, 
div.heading-title.text-center h2, 
div.heading-title.text-center h3, 
div.heading-title.text-center h4, 
div.heading-title.text-center h5, 
div.heading-title.text-center h6 {
    padding-left: 15px;
    padding-right: 15px;
}

div.heading-title h1, 
div.heading-title h2, 
div.heading-title h3, 
div.heading-title h4, 
div.heading-title h5, 
div.heading-title h6 {
    margin: 0;
    padding: 0;
    background-color: #fff;
    position: relative;
    display: inline-block;
    padding-left: 0;
    padding-right: 15px;
}
h1 > span, 
h2 > span, 
h3 > span, 
h4 > span, 
h5 > span, 
h6 > span{
    color: var(--theme-color);
}
.offcanvas-bottom {
    height: 50vh !important;
}
/* Panel del buscador predictivo: arranca en el borde inferior del bloque superior
   (avisos + cabecera; --site-top-h lo mide el layout) en vez de a 70px fijos, que con
   un aviso de soporte tapaba el idioma, el usuario y la cesta. Por encima de la
   pestaña «Profesional premium», que cuelga en la misma zona. */
.md-search-result {
    background-color: #fff;
    position: fixed;
    top: var(--site-top-h, 70px);
    border-top: solid 1px #666;
    width: 100%;
    left: 0;
    /* Alto según los resultados, con tope: debajo queda a la vista la página
       oscurecida, que es donde se pulsa para cerrar. */
    max-height: calc(100vh - var(--site-top-h, 70px) - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
    border-radius: 0 0 6px 6px;
    z-index: 5;
}
.md-search-backdrop {
    position: fixed;
    top: var(--site-top-h, 70px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 4;
    cursor: pointer;
}
.quick-search-wrapper {
    padding: 10px;
}
/* La X se queda a la vista aunque se haga scroll en los resultados. */
.quick-search-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 2;
    margin-left: .5rem;
}

/* Avisos del bloque superior (sesión de soporte, modo demo). */
.site-aviso {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 10px 20px;
    font-family: inherit;
}
@media (max-width: 575.98px) {
    .site-aviso {
        padding: 6px 12px;
        font-size: .85rem;
    }
}
.quick-cart .card-body{
    flex: 1 1 auto;
    padding: 1rem 1rem;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
}
p.title {
    font-size: 1.5rem;
    margin-bottom: 0px;
    font-weight: bolder;
}
div.image-overlay{
    background-color: rgb(0, 0, 0, 0.5);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================ */
/* Tooltip personalizado para validación de filtros */
/* ============================================ */

/* Estilo para selects con error de validación */
.form-select.is-invalid,
.form-control.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Tooltip personalizado sin dependencia de Bootstrap/Popper */
.custom-filter-tooltip {
    /* position es controlado por JavaScript (fixed o absolute) */
    background-color: #dc3545;
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    max-width: 300px;
    min-width: 200px;
    width: max-content;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
}

.custom-filter-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: #dc3545;
}

/* Flecha hacia arriba cuando el tooltip está debajo del elemento */
.custom-filter-tooltip[data-placement="bottom"]::before {
    right: auto;
    left: 20px;
    top: -8px;
    transform: none;
    border: 8px solid transparent;
    border-bottom-color: #dc3545;
    border-right-color: transparent;
}

/* Estilos específicos cuando el tooltip está en el sidebar */
.offcanvas-body .custom-filter-tooltip,
#sidebar-filtros-content .custom-filter-tooltip {
    max-width: 100%;
    font-size: 12px;
}
/* ========== MENÚ LATERAL DE USUARIO ========== */
#md-user-box .nav-item a.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--theme-color-light) !important;
}
#md-user-box .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}
#md-user-box .form-control:focus {
    background-color: #1a1a2e;
    color: #fff;
    border-color: var(--theme-color-light);
    box-shadow: 0 0 0 0.2rem rgba(108, 180, 228, 0.15);
}

#md-user-box .nav-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}

#md-user-box,
#md-user-box *:not(i):not([class*="fa"]):not([class*="bx"]) {
    font-family: 'Nunito', sans-serif !important;
}

/* ──────────────────────────────────────────────────────────────────
   Masonry para grupos de familias (1 / 2 / 3 columnas)
   Configuración del catálogo: /cuenta/configuracion/(precios|familias).
   Evita que las cards de una misma fila se estiren a la altura del
   bloque más largo. Las cards fluyen por columna (top-to-bottom). */
.familias-masonry {
    column-gap: 1rem;
}
@media (min-width: 1200px) {
    .familias-masonry { column-count: 3; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    .familias-masonry { column-count: 2; }
}
@media (max-width: 767.98px) {
    .familias-masonry { column-count: 1; }
}
.familias-masonry > .card {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: 1rem;
}

/* Cabecera del storefront: en móvil los iconos (buscar, idioma, usuario,
   cesta) no caben a tamaño fa-2x en media fila y la .navbar los partía en
   dos líneas, montándose unos sobre otros. Se impide el salto de línea y
   se compactan logo e iconos por debajo de 576px. */
.header-logo {
    max-height: 54px;
}
@media (max-width: 575.98px) {
    .header-logo {
        max-height: 40px;
    }
    #sidepanel_btn .fa-2x,
    .header-icons .fa-2x {
        font-size: 1.5em;
    }
    .header-icons .lang-bubble {
        width: 40px;
        height: 34px;
    }
    .header-icons .lang-bubble-text {
        font-size: 12px;
    }
    .header-icons .language-switcher .dropdown-toggle::after {
        margin-left: 0.15rem;
    }
}

/* Selector de cantidad −/+ sobre un input-group de Bootstrap. En móvil el
   input number no muestra flechas: sin estos botones solo se puede teclear.
   Uso: <div class="input-group qty-stepper"> [data-step="-1"] input [data-step="1"] </div>
   (el comportamiento lo pone el JS de cada pantalla). */
.qty-stepper {
    width: auto;
    flex-wrap: nowrap;
}
.qty-stepper .btn {
    min-width: 40px;
    font-weight: 600;
}
.qty-stepper .form-control {
    flex: 0 0 auto;
    width: 64px;
    text-align: center;
    -moz-appearance: textfield;
}
.qty-stepper .form-control::-webkit-outer-spin-button,
.qty-stepper .form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-stepper.input-group-sm .btn {
    min-width: 32px;
}
.qty-stepper.input-group-sm .form-control {
    width: 46px;
}

/* ──────────────────────────────────────────────────────────────────
   Profesional premium (partials/profesional-premium.blade.php)
   ──────────────────────────────────────────────────────────────────
   Dossier de Marketing (oct. 2026): azul #264366, ámbar #FFA800, textos
   en blanco sobre el azul. Mismo galardón en todas las ubicaciones, sin
   recolorear ni deformar. La tipografía es la de la plataforma. */
:root {
    --premium-azul: #264366;
    --premium-ambar: #FFA800;
    --premium-texto-suave: #D6DEE9;
    --dp-granate: #900000;
    --dp-texto-suave: #F3D9D9;
}

/* Barra superior: filete de 3 px en la base y pestaña colgando a la
   derecha. Se posicionan contra el <header> (sticky-top). No es un botón:
   no reacciona al ratón ni tapa los clics del contenido de debajo. */
.premium-filete {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--premium-azul);
    pointer-events: none;
}
.premium-pestana {
    position: absolute;
    top: 100%;
    right: 1.5rem;
    width: 250px;
    height: 34px;
    align-items: center;
    padding-left: 70px;
    background: var(--premium-azul);
    border-radius: 0 0 6px 6px;
    pointer-events: none;
}
/* 45 × 60: la tuerca (centro a 22/64 del alto) queda sobre el borde de la
   barra y las caídas sobre la pestaña. */
.premium-pestana__galardon {
    position: absolute;
    left: 14px;
    top: -21px;
    width: 45px;
    height: 60px;
}
.premium-pestana__texto {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Con los resultados del buscador abiertos la pestaña se aparta: si no, la
   tuerca asoma sobre el borde del panel. Por id: la cabecera tiene otro
   `.md-search-result` (el viejo #md-search-result-box, oculto con display:none
   y sin d-none) y con la clase la pestaña desaparecía en todas las páginas. */
.site-top:has(#product-results:not(.d-none)) .premium-pestana {
    visibility: hidden;
}

/* Móvil: solo el sello, junto al icono de usuario. */
.premium-sello {
    width: 22px;
    height: 20px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Bloque del menú lateral y de la cesta. */
.premium-bloque {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: var(--premium-azul);
    border: 2px solid var(--premium-ambar);
    border-radius: 4px;
    color: #fff;
    text-transform: none;
}
.premium-bloque__galardon {
    flex-shrink: 0;
}
.premium-bloque--menu {
    margin: 12px 14px;
}
.premium-bloque--menu .premium-bloque__galardon {
    width: 30px;
    height: 40px;
}
.premium-bloque__titulo {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}
.premium-bloque__subtitulo {
    font-size: 12px;
    font-weight: 500;
    color: var(--premium-texto-suave);
}
.premium-bloque--cesta {
    margin-top: 12px;
}
.premium-bloque--cesta .premium-bloque__galardon {
    width: 27px;
    height: 36px;
}
.premium-bloque__texto {
    font-size: 12.5px;
    line-height: 1.35;
}

/* Distribuidor preferente (.es-dp): mismo sistema en granate, con la pestaña algo
   más ancha y el galardón algo más grande (dossier). Galardón WEBP del 27/10/2026:
   el disco tiene el centro al 30,7 % del alto → a 72 px, 22 px por encima del borde. */
.premium-filete.es-dp,
.premium-pestana.es-dp,
.premium-bloque.es-dp {
    background: var(--dp-granate);
}
.premium-pestana.es-dp {
    width: 292px;
    padding-left: 80px;
}
.premium-pestana.es-dp .premium-pestana__galardon {
    width: 52px;
    height: 72px;
    top: -22px;
}
.premium-bloque.es-dp .premium-bloque__subtitulo {
    color: var(--dp-texto-suave);
}
.premium-bloque--menu.es-dp .premium-bloque__galardon {
    width: 36px;
    height: 50px;
}
.premium-bloque--cesta.es-dp .premium-bloque__galardon {
    width: 30px;
    height: 41px;
}

/* Nombre del usuario junto a su icono en la cabecera. */
.user-menu-nombre {
    max-width: 9rem;
    font-size: .9rem;
}
