/* ==========================================================
   1. ESTRUCTURA GLOBAL Y COMPONENTES BASE (Helix / Joomla)
   ========================================================== */
/* Estilos limpios de encabezado y logo Helix */
.sp-page-title {
    padding: 100px 0!important;
}

#sp-right .sp-module .direccion {
    margin-top: 20px !important;
}

.sp-page-title .sp-page-title-heading {
    font-size: 2.5em!important;
    line-height: 1!important;
    text-shadow: 2px 2px 0px #000!important; /* Sintaxis corregida */
}

@media (max-width: 992px) {
    .logo-image-phone {
        height: 58px !important;
    }
}

@media (max-width: 575px) {
    
    .sp-page-title {
    padding: 60px 0!important;
}

.sp-page-title .sp-page-title-heading {
    font-size: 2em!important;
    line-height: 1!important;
}

    .logo-image-phone {
        height: 50px !important;
    }
    .quienes-somos .sp-page-title {
        background-position: 40% top !important;
    }
    #sp-header {
        height: 60px!important;
        justify-content: center!important;
        align-items: center!important;
    }
}



#sp-main-body {
    padding: 50px 0px !important;
}

.home-magna #sp-main-body {
    padding-top: 0px !important;
}

#sp-bottom {
    padding: 40px 0 10px;
}

.breadcrumb {
    font-size: 0.9em;
    background: none !important;
    padding-left: 0;
}

.float-start {
    margin-right: 5px !important;
}

a:hover, a:focus, a:active {
    color: #e96100;
}

h1 { 
    font-size: 1.5em;
}

.horizontal-separator {
    margin: 30px 0;
}

.hidden {
    visibility: hidden;
}

.formError {
    position: relative !important;
    top: 0px !important;
}

/* Encabezados / Banner Titulo */
.encabezado-abajo .sp-page-title, 
.encabezado-abajo2 .sp-page-title { 
    background-position: center bottom;
}
.encabezado-abajo2 .sp-page-title {
    background-position: 45% bottom !important;
}
.encabezado-arriba .sp-page-title { 
    background-position: right top;
}

/* Buscador Header */
.servicios .sp-dropdown {
    width: 270px !important;
}
.buscar input[type="text"]:not(.form-control) {
    margin-left: 20px; 
    font-size: 0.85em; 
    width: 120%; 
    border-radius: 0; 
    color: #222;
    padding: 0.4rem 0.4rem !important;
}
.buscar input[type="text"]:not(.form-control):hover {
    border: 1px solid #008f2f;
}

/* Offcanvas Menu (Móvil) */
.offcanvas-menu {
    background-color: #008f2f;
    color: #ffffff;
    width: 350px;
}
body.ltr.offcanvs-position-right .offcanvas-menu {
    right: -350px;
}
.offcanvas-menu a {
    color: #fff !important;
}
.offcanvas-menu .offcanvas-inner ul.menu>li>a {
    font-size: 1.2em;
}
.offcanvas-active .burger-icon>span, 
#modal-menu-toggler.active .burger-icon>span {
    background-color: #fff;
}
.offcanvas-menu .offcanvas-inner ul.menu>li.menu-parent>a>.menu-toggler, 
.offcanvas-menu .offcanvas-inner ul.menu>li.menu-parent>.menu-separator>.menu-toggler {
    color: #ffffff;
}
.offcanvas-menu .offcanvas-inner ul.menu>li>ul li a {
    font-size: 1.1em; 
    line-height: 1.2em;
}

/* Módulos Lateral (Sidebar) */
#sp-left .sp-module, 
#sp-right .sp-module {
    border: none; 
    background-color: rgba(153,190,25,0.15);
}
#sp-left .sp-module .sp-module-title, 
#sp-right .sp-module .sp-module-title {
    border-bottom: 1px dashed #008f2f;
}
#sp-left .sp-module ul>li, 
#sp-right .sp-module ul>li {
    display: block;
    border-bottom: 1px dotted #008f2f;
}
.VMmenu li {
    list-style-type: none;
    background-image: none;
    padding: 6px 2px;
}
.VMmenu ul {
    margin-left: 10px !important;
}
.VmArrowdown {
    background: top right no-repeat url(../images/vm/arrow_down.png);
    cursor: pointer;
    float: right;
    width: 16px;
    height: 16px;
    padding: 0 12px;
}

/* Botones, Forms e Inputs */
input[type=text]:not(.form-control), 
input[type=email]:not(.form-control), 
input[type=url]:not(.form-control), 
input[type=date]:not(.form-control), 
input[type=password]:not(.form-control), 
input[type=search]:not(.form-control), 
input[type=tel]:not(.form-control), 
input[type=number]:not(.form-control), 
select:not(.form-select):not(.form-control) {
    border-radius: 0;
}

input.highlight-button {
    background: #99be19 !important;
    color: #fff;
    font-size: 0.8em;
    border: 1px solid #008f2f;
    border-radius: 0;
    cursor: pointer;
    text-align: center;
    letter-spacing: 1px;
    display: inline-block;
    text-decoration: none;
    padding: 4px 8px 4px !important;
}
input.highlight-button:hover {
    background: #008f2f !important;
}

div.vm-details-button a {
    color: #fff;
    padding: 5px 10px;
    border: 1px solid gray;
    font-size: 0.9em;
    font-weight: 400;
    max-width: 85%;
    width: auto;
    border-radius: 0;
    background: #99be19;
}
div.vm-details-button a:hover {
    background: #43ad6b;
    color: #fff; 
}

a.product-details {
    background: #99be19;
    font-size: 0.8rem;
    border: solid #43ad6b 1px;
    border-radius: 0;
    color: #fff;
    text-decoration: none;
    padding: 5px 7px;
}
a.product-details:hover {
    background: #008f2f !important;
    color: #fff;
}

.btngreen { 
    background: #43ad6b; 
    font-size: 0.9rem;
    border: 0; 
    padding: 5px 7px;
}
.btngreen a { color: #fff; }
.btngreen:hover { background: #309356 !important; color: #fff; }
.btngreen a:hover { color: #fff; }

a.ask-a-question {
    font-size: 0.9em;
    background: #99be19 !important;
    color: #fff;
    font-weight: 400;
    padding: 5px 7px !important;
    margin: 2px 2px 30px 2px;
    text-align: center !important;
    border-radius: 0 !important;
    border: 1px solid #777;
    display: inline-block;
}
a.ask-a-question:hover {
    background: #008f2f !important;
    color: #fff;
}

.btn-mini { 
    font-size: 0.7rem; 
    border: 1px solid #888; 
    padding: 2px;  
    border-radius: 0; 
    margin: 2px;
    background: linear-gradient(0deg, rgba(241,241,241,1) 0%, rgba(255,255,255,1) 99%, rgba(255,255,255,1) 100%);
}
.btn-mini:hover {  
    border: 1px solid #666; 
    background: linear-gradient(0deg, rgba(255,255,255,1) 53%, rgba(241,241,241,1) 99%, rgba(255,255,255,1) 100%);
}

/* Footer / Cookies / Alerts / Error Page */
.jb-cookie-decline { margin-bottom: 20px; }

html.error-page .error-message {
    font-size: 1.4em !important;
    margin-bottom: 1rem !important;
}
html.error-page .error-code {
    font-size: 4em !important;
    color: #2ba84a;
}
joomla-alert[type=danger] { display: none; }


/* ==========================================================
   2. VIRTUEMART - VISTA GENERAL Y CATEGORÍAS (Escritorio)
   ========================================================== */
.category a { color: #666; font-size: 1.5em; }
.category a:hover { color: #43ad6b; }

.category-view .spacer { padding: 5px 5px 30px !important; }

/* 1. Cada producto en su propia fila vertical */
.category-view .product {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-bottom: 30px !important;
    clear: both !important;
    border-bottom: 1px solid #f0f0f0; /* Separador sutil entre productos */
    padding-bottom: 20px !important;
}

/* 2. Contenedor de producto como Flexbox alineado horizontalmente */
.category-view .product .spacer,
.category-view .product-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important; /* Centra verticalmente texto e imagen */
    justify-content: flex-start !important;
    width: 100% !important;
    gap: 5px !important;
}

/* 3. Columna de Imagen (Izquierda - ~35-40%) */
.category-view .vm-product-media-container {
    flex: 0 0 35% !important;
    max-width: 35% !important;
    float: none !important;
    margin: 0 !important;
    text-align: center !important;
}

.category-view .vm-product-media-container img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* 4. Columna de Descripción y Botón (Derecha - ~60%) */
.category-view .vm-product-descr-container-1 {
    flex: 0 0 60% !important;
    max-width: 60% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important; /* Libera cualquier altura fija previa */
    
    /* Forzamos flujo vertical interno para que nada se monte */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important; 
}

.category-view .vm-product-descr-container-1 h2,
.category-view .vm-product-descr-container-1 h3 {
    margin: 0 0 10px 0 !important;
    font-size: 1.4em !important;
    text-align: center !important;
    width: 100% !important;
}

.category-view p.product_s_desc {
    margin: 0 0 15px 0 !important;
    text-align: left !important;
    font-size: 0.95em !important;
    height: auto !important; /* Asegura que la descripción expanda el alto necesario */
    width: 100% !important;
}

.category-view .vm-details-button {
    text-align: center !important;
    margin-top: 5px !important;
    width: 100% !important;
    clear: both !important;
}
/* ==========================================================
   3. VIRTUEMART - PRODUCTOS RELACIONADOS (Grid 3 Col)
   ========================================================== */
.product-fields-title-wrapper { padding: 20px 0 0; }
.product-fields-title { font-size: 1.15rem; font-weight: normal; }

.product-related-products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    align-items: start !important;
    width: 100% !important;
}
.product-related-products .product-fields-title-wrapper {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}
.product-related-products .product-field-type-R {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
}
.product-related-products .product-field-display,
.product-related-products .product-container {
    width: 100% !important;
    float: none !important;
}
.product-related-products div.clear { display: none !important; }

.product-related-products .vm-product-media-container {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
}
.product-related-products .vm-product-media-container img {
    width: 100% !important;
    max-width: 160px !important;
    height: 160px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 auto 8px auto !important;
}


/* ==========================================================
   4. VIRTUEMART - VISTA DETALLE DE PRODUCTO (Flexbox 2 Col)
   ========================================================== */
.productdetails-view .product-description, 
.product-fields {
    font-size: 0.95rem;
}

.productdetails .vm-product-container {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
    gap: 30px !important;
}
.productdetails .vm-product-media-container {
    flex: 0 0 45% !important;
    max-width: 45% !important;
    float: none !important;
    margin: 0 !important;
    text-align: center !important;
}
.productdetails .vm-product-media-container img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}
.productdetails .vm-product-details-container {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    float: none !important;
    margin: 0 !important;
}

    .product-neighbours a.next-page {
    background: url(../images/vm/next_16x16.png) no-repeat right!important;
}
.product-neighbours a.previous-page {
    background: url(../images/vm/previous_16x16.png) no-repeat left!important;

}

    .VmArrowdown{background:top right no-repeat url(../../images/vm/arrow_down.png);cursor:pointer;float:right;width:16px;height:16px;padding:0 12px;}

/* ==========================================================
   5. MEDIA QUERIES (Ordenados de Mayor a Menor)
   ========================================================== */

/* --- TABLETS Y PANTALLAS MEDIANAS (< 992px) --- */
@media screen and (max-width: 991px) {
    /* Detalle de Producto a 1 Columna en Tablets/Móviles */
    .productdetails .vm-product-container {
        flex-direction: column !important;
        gap: 20px !important;
    }
    .productdetails .vm-product-media-container,
    .productdetails .vm-product-details-container {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* --- MÓVILES (< 768px) --- */
@media screen and (max-width: 767px) {
    /* Productos Relacionados en Móvil */
    .product-related-products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px 6px !important;
    }
    .product-related-products .vm-product-media-container img {
        max-width: 85px !important;
        height: 85px !important;
        margin-bottom: 0 !important;
    }
    .product-related-products .vm-product-media-container a {
        display: block !important;
        margin-top: 10px !important;
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        padding: 0 2px !important;
        word-break: break-word !important;
    }

    /* Vista de Categoría en Móvil */
    .category-view .product {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin-bottom: 25px !important;
    }
    .category-view .vm-product-media-container {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        margin: 0 auto 15px auto !important;
    }
    .category-view .vm-product-media-container img {
        max-width: 220px !important;
        height: auto !important;
        margin: 0 auto !important;
    }
    .category-view .vm-product-descr-container-1 {
        float: none !important;
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0 10px !important;
        text-align: center !important;
    }
    .category-view .vm-product-descr-container-1 h3 {
        margin-top: 10px !important;
    }
    .category-view p.product_s_desc {
        width: 100% !important;
        height: auto !important;
        text-align: left !important;
    }
    .category-view .vm-details-button {
        text-align: center !important;
        margin-top: 15px !important;
    }
}

/* --- MÓVILES PEQUEÑOS (< 575px) --- */
@media (max-width: 575px) {
    #sp-main-body { padding: 30px 0px !important; }
    .buscar input[type="text"]:not(.form-control) {
        margin-left: 10px !important;
        font-size: 0.75em;
        width: 95%;
        padding: 0.4rem 0.4rem !important;
        margin-right: 20px;
    }
    .product-container h1 { font-size: 1.2em; margin-top: 25px; }
    h3 { font-size: 1.5em !important; }
    .main-image img { max-width: 85%; }
    .sp-page-title .sp-page-title-heading { font-size: 1.6em !important; }

    .category-view .row>* {
        flex-shrink: 0;
        width: 33% !important; 
        max-width: 100%;
    }
    .category-view h2 a { font-size: 1.2em !important; }
    .category-view .row .product .spacer { padding: 5px 5px 20px !important; }

    .encabezado-abajo .sp-page-title { background-position: 25% 75% !important; }
    .encabezado-arriba .sp-page-title { background-position: 0 60% !important; }
    


    
}

/* --- MÓVILES MUY PEQUEÑOS (< 480px) --- */
@media (max-width: 480px) {
    div.product {
        float: left;
        margin: auto;
        width: 100%;
        margin-top: 20px;
    }
    .vm-product-descr-container-1 h3 { font-size: 1.2em !important; margin-top: 0 !important; }
    p.product_s_desc { font-size: 0.95em; }
}

/* --- AJUSTES LOGO EN PANTALLAS EXTREMADAMENTE ESTRECHAS --- */
@media (max-width: 400px) {
    .logo-image { height: 25px !important; }
}
@media (max-width: 350px) {
    .logo-image { height: 20px !important; }
}

/* --- categorías en tel peq  ----*/

@media (max-width: 500px) {
.category-view
.row>* {
    flex-shrink: 0;
    width: 50%!important;
    max-width: 100%;
    padding:10px!important;
}

.category-view .vm-product-descr-container-1 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
}
}

/* JB Cookies */
/* Texto legible dentro del modal */
.jb-privacy .modal-content {
    background: #ffffff;
    color: #1b2a5c;
}

.jb-privacy .jb-privacy-title {
    color: #1b2a5c;
}

.jb-privacy .jb-privacy-text {
    color: #333333;
}

/* Enlace "MÃ¡s informaciÃ³n" */
.jb-privacy .jb-policy,
.jb-privacy .jb-policy a {
    color: #1b2a5c !important;
    text-decoration: underline;
}

/* Botones con los colores de tu marca */
.jb-privacy .modal-footer .btn,
.jb-privacy .modal-body .btn {
    border-radius: 0;
}

.jb-privacy .btn-primary {
    background-color:#008f2f;
     border-color: #008f2f;
    color: #fff;
    font-weight: 600;
}

.jb-privacy .btn-primary:hover {
    background-color: #666 ;
    border-color: #666;
}

.jb-privacy .btn-outline-secondary,
.jb-privacy .btn-secondary {
    background: transparent;
    border: 1px solid #1b2a5c;
    color: #1b2a5c;
}

.modal-dialog-scrollable .modal-body h6, .modal-dialog-scrollable .modal-body li  {color: #1b2a5c!important;}


/* Aviso inicial como barra inferior compacta */
.jb-privacy .modal-dialog {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.jb-privacy .modal-content {
    background-color: rgba(0, 0, 0, 0.8);
    border: 0;
    border-radius: 0;
}

.jb-privacy .modal-body {
    padding: 12px 20px 4px;
    text-align: center;
}

.jb-privacy .modal-footer {
    padding: 0 20px 12px;
    border-top: 0;
    justify-content: center;
    gap: 10px;
}

/* Textos en blanco */
.jb-privacy .jb-privacy-title,
.jb-privacy .jb-privacy-text,
.jb-privacy .jb-policy,
.jb-privacy .jb-policy a {
    color: #ffffff !important;
}

.jb-privacy .jb-privacy-title {
    display: none;
}

.jb-privacy .jb-privacy-text {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.jb-policy {
    padding: 4px;
    font-size: 13px;
}

/* Botones */
.jb-privacy .btn {
    width: auto !important;
    flex: 0 0 auto !important;
    padding: 6px 28px;
    font-weight: 600;
}

.jb-privacy .btn-outline-secondary,
.jb-privacy .btn-secondary {
    color: #ffffff;
    border-color: #ffffff;
}

/* Entrada deslizÃ¡ndose desde abajo */
.jb-privacy.fade .modal-dialog {
    transform: translateY(100%);
}

.jb-privacy.show .modal-dialog {
    transform: none;
}

.jb-privacy .modal-dialog {
    min-height: 0 !important;
    align-items: flex-end;
}

.jb-privacy .modal-footer {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    width: 100%;
}

/* Por si los botones van dentro de un contenedor intermedio */
.jb-privacy .modal-footer > div,
.jb-privacy .modal-body > div:has(.btn) {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
}