@charset "UTF-8";

/* ========================================================== */
/* 1. VARIABLES & CONFIGURACIÓN BASE                          */
/* ========================================================== */
:root {
    --rojo: #bb0000;
    --gris-fondo: #cccccc;
    --gris-claro: #eeeeee;
    --gris-oscuro: #666666;
    --negro: #000000;
    --blanco: #ffffff;
    --azul-link: #0033CC;
    --container-width: 90%;
    --font-primary: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:focus { outline: 0; }

body {
    background: var(--blanco);
    font-family: var(--font-primary);
    color: var(--negro);
    /* Ajuste para cabecera fija */
    padding-top: 70px;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
}

ul { list-style: none; }

a {
    text-decoration: none;
    color: var(--negro);
}

.link {
    text-decoration: underline;
    color: var(--azul-link);
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-primary); }
h1 { padding-top: 5px; font-size: 1.8em; margin: 10px 0; }
h2 { font-size: 1.5em; margin: 10px 0; }

.cabecera { 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--blanco);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.container { width: var(--container-width); margin: 0 auto; }
.row { float: left; padding-bottom: 15px; }
.div_centrat { clear: both; text-align: center; }
.blanc { width: 100%; float: left; line-height: 60px; }

/* ========================================================== */
/* 2. NAVBAR FLEX (Cabecera Principal)                        */
/* ========================================================== */
.navbar {
    height: auto; 
    padding-bottom: 5px;
}

.header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.header-top .logo {
    flex: 0 0 auto;
    margin-top: 5px;
}

.header-top .logo img {
    height: 60px;
    width: auto;
    display: block;
}

.header-top .search-box {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto; /* Centrado */
}

.search-container .busqueda {
    width: 100%;
    padding: 6px 40px 6px 15px;
    border: 2px solid var(--gris-fondo);
    border-radius: 30px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
    height: 40px;
}
.search-container .busqueda:focus { border-color: #999; }

.search-container .btn_busqueda {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    height: 26px;
    width: 26px;
    border: none;
    cursor: pointer;
    background: url(/imagenes/img/iconos.png) 260px -90px;
    background-color: transparent;
}

.info-contacto {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.90em;
    color: var(--gris-oscuro);
}

.info-contacto .ico-telefono {
    width: 38px;
    height: 38px;
    background: url(/imagenes/img/iconos.png) 230px -22px;
    background-size: auto;
    flex-shrink: 0;
}

.info-contacto .datos-contacto { line-height: 1.2em; }
.info-contacto .telefono-num {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--negro);
}

.carrito-wrapper { flex: 0 0 auto; }

.navbar .ico_carrito {
    position: relative;
    background: url(/imagenes/img/iconos.png) 190px -20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

#qty {
    position: absolute;
    top: 2px;
    right: 6px;
    background: var(--rojo);
    color: var(--blanco);
    width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 50%;
    font-size: 12px;
    text-align: center;
    font-weight: bold;
    margin: 0;
}

.navbar nav.main-nav {
    position: relative;
    width: 100%;
    margin: 5px 0 0 0;
    clear: both;
    border-top: 1px solid #eee;
    padding-top: 5px;
}

.navbar nav.main-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
}

.navbar nav.main-nav ul > li {
    position: relative;
    display: block;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.navbar nav.main-nav ul > li > a {
    display: block;
    padding: 6px 12px;
    font-size: 1em;
    font-weight: 500;
}

.navbar nav.main-nav ul > li:hover { background: var(--rojo); }
.navbar nav.main-nav ul > li:hover > a { color: var(--blanco); }

.caret { font-size: 0.7em; margin-left: 4px; }

.navbar nav ul li .children {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--blanco);
    border: 1px solid #eee;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 8px;
    padding: 5px 0;
    flex-direction: column;
}

.navbar nav ul li:hover .children { display: flex; }

.navbar nav ul li .children li {
    display: block;
    width: 100%;
    text-align: left;
    margin: 0;
    border-radius: 0;
    background: transparent;
}

.navbar nav ul li .children li a {
    padding: 6px 15px;
    line-height: 1.3;
    font-size: 0.9em;
    color: var(--negro) !important;
}

.navbar nav ul li .children li:hover { background: var(--gris-claro); }
.navbar nav ul li .children li:hover a { color: var(--rojo) !important; }
.navbar .menu_bar { display: none; }
.whatsapp-float {
    position: fixed;
    width: 40px;
    height: 40px;
    top: 10px;
    right: 10px;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.whatsapp-float img {
    width: 35px;
    height: 35px;
}
.search { display: none; }
.noticia {
    padding: 5px;
    width: 100%; background-color: #FF0; color: #600;
    font-size: 15px; font-weight: 600; text-align: center;
    line-height: 30px; border: solid 1px #e6e600;
}

.breadcrumb { margin-left: 5%; }
.breadcrumb ol { padding-top: 5px; font-size: 0.95em; }
.breadcrumb li { display: inline; }

.presentacio {
    width: 97%; background-color: #ff0; 
    margin-top: 5px; padding: 10px;
    min-height: 100px; text-align: center;
}
.presentacio img {
    float: left; height: 100px;
    margin-left: 25px; margin-right: 35px;
}
.presentacio p {
    font-style: italic; vertical-align: top; padding-top: 15px;
    width: 95%; font-size: 1.5em;
}

/* ========================================================== */
/* 3. GRID UNIFICADO (Thumbnails Master)                      */
/* ========================================================== */
.indice, .items, .talleres {
    width: 100%;
    background-color: var(--gris-fondo);
}

/* Configuración Flexbox principal */
.thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0;
    width: 100%;
}

.thumbnails li {
    width: 47.5%;
    padding: 4px;
    background-color: var(--blanco);
    margin: 0 4px 15px 4px;
    box-sizing: border-box;
    /* Reset de floats antiguos */
    float: none;
    text-align: center;
    position: relative;
}

.thumbnails li img {
    width: 100%;
    height: auto;
    display: block;
}

.indice .thumbnails p { text-align: left; margin-left: 2px; line-height: 2em; }
.indice .thumbnails li .mini-titol { margin-left: 2px; line-height: 1.2em; font-weight: 600;}
.indice .thumbnails li .mini-preu { margin-left: 2px; font-size: 0.9em; line-height: 1.2em; }
.items .thumbnails .btn { width: 95%; padding: 6px 6px; font-size: 0.95em; }
.thumbnails li .descripcio_blog { text-align: left; min-height: 110px; }

/* ========================================================== */
/* 4. OTROS ESTILOS (Items, Controles, Info, Footer...)       */
/* ========================================================== */
.items .item { position: relative; }
.items .item .agotado, .items .item .new { position: absolute; left: 0; top: 0; }
.items .item .new { left: -6px; top: -6px; }
.items .item .msg { position: absolute; width: 100%; margin-top: -19px; background-color: #FF0; color: var(--negro); }
.items .item .preuTatxat { margin-top: -10px; font-size: 1em; color: #777; position: relative; }
.items .item .preuTatxat:before { position: absolute; content: ""; left: -5px; top: 50%; right: -5px; border-top: 2px solid red; transform: rotate(-10deg); }
.items .item .circle { background: #ff0000; border-radius: 50%; border: 10px double; color: var(--blanco); position: absolute; top: -10px; right: -12px; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; font-size: 1.5em; transform: rotate(20deg); }
.items .item .detalls h3 { margin: 10px 0; font-size: 1.2em; text-align: center; font-family: 'Century Gothic', sans-serif; }
.items .item .detalls { min-height: 105px; }
.items .item .detalls .text, .items .item .quant { text-align: left; }
.items .item .quant { display: inline-block; min-height: 50px; }
.items .item .preu { float: left; font-size: 1.35em; font-weight: 600; margin-left: 25px; }
.items .item .preu .eur { font-weight: normal; font-size: 0.8em; margin-left: -5px; }
.items .item .cantidad { float: left; }
.items .unidades { width: 100%; text-align: center; font-size: 0.9em; height: 45px; }
.items .tejido { font-size: 0.9em; margin-bottom: 8px; color: #555; }
.items .carro { float: left; width: 25px; height: 22px; background: url(/imagenes/img/iconos.png) 230px 0px; }

.separador { float: left; width: 100%; margin-top: 10px; padding: 0 15px 20px 15px; border: outset; background: var(--blanco); text-align: center; }

.seccion { width: 100%; float: left; margin: 10px 0 10px 0; background-color: var(--blanco); }
.seccion h1, .seccion h2 { margin: 0; padding-left: 10px; font-weight: 600; color: var(--blanco); background-color: var(--rojo); }
.seccion h1 { line-height: 2.2em; font-size: 1.8em; text-align: center; }
.seccion h2 { line-height: 1.5em; font-size: 1.2em; }
.seccion p { padding: 10px; }

.btn { display: inline-block; font-size: 1em; background: var(--rojo); color: var(--blanco); padding: 6px 15px; width: 250px; text-align: center; border: none; cursor: pointer; }
.btn-agotado { background-color: var(--negro); cursor: default !important; }
.plus, .minus { height: 25px; width: 25px; line-height: 20px; display: block; text-align: center; font-size: 20px; float: left; border: 1px solid #b8b8b8; background-color: #e0e0e0; cursor: pointer; user-select: none; }
.minus { border-right: none; }
.plus { border-left: none; }
.unds { float: left; display: block; width: 32px; height: 25px; border: 1px solid #b8b8b8; font-size: 16px; text-align: center; }

.magnifier { opacity: 1; position: relative; height: auto; display: block; transition: all 0.3s ease; }
.magnifier:hover { opacity: 0.6; }
.magnifier:after { content: ''; display: block; width: 100%; height: 100%; position: absolute; opacity: 0; left: 0; top: 0; background: url(/imagenes/img/magnifier.png) center center no-repeat var(--negro); transition: all 0.3s ease; }
.magnifier:hover:after { opacity: 0.6; }
@keyframes slidy { 0% { left: 0%; } 15% { left: 0%; } 20% { left: -100%; } 35% { left: -100%; } 40% { left: -200%; } 55% { left: -200%; } 60% { left: -300%; } 75% { left: -300%; } 80% { left: -400%; } 95% { left: -400%; } 100% { left: 0%; } }

/* ========================================= */
/* SLIDER MEJORADO (Centrado Vertical Flex)  */
/* ========================================= */

div#slider {
    overflow: hidden;
    width: 100%;
    height: 250px; 
    margin-top: 65px;
    background-color: #f4f4f4;
    position: relative;
}

div#slider figure {
    display: flex;
    align-items: center; 
    width: 500%; /* 5 fotos x 100% */
    height: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    animation: slidy 25s infinite ease-in-out;
}

div#slider figure a {
    width: 20%; /* 100% dividido entre 5 fotos */
    height: 100%; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

div#slider figure img {
    width: 100%;
    height: 100%; 
    object-fit: cover; 
    float: none;
    margin: 0 !important; /* Forzamos margen 0 para anular cualquier residuo */
    display: block;
}

/* ========================================= */
.info, .blogpost, .tutoriales { background: var(--gris-fondo); padding-bottom: 20px; }
.info .container, .blogpost .container, .tutoriales .container { display: inline-block; width: 94%; margin: 20px 0 0 3%; background: var(--blanco); text-align: center; }
.info h1, .blogpost h1 { margin: 40px 0 20px 0; font-size: 2.5em; text-align: center; }
.blogpost h1 { color: #C03; }
.info .texte, .blogpost .texte { width: 80%; margin: 0 auto 15px auto; text-align: left; }
.info p, .blogpost p { padding: 10px; line-height: 1.5; color: #555; }
.info .texte a, .blogpost .texte a { text-decoration: underline; color: #800; }
.info .container img, .blogpost .texte img { float: left; width: 50%; margin: 10px 15px 10px 0; }
.mapa { width: 50%; height: 300px; margin-bottom: 40px; }
.video-responsive { height: 0; overflow: hidden; padding-bottom: 56.25%; position: relative; }
.video-responsive iframe, .video-responsive object, .video-responsive embed { height: 100%; left: 0; position: absolute; top: 0; width: 100%; }
.taller { float: right; width: var(--container-width); padding: 10px 0 20px 0; border: solid 2px var(--negro); margin: 20px 5% 10px 0; background-color: var(--blanco); }
.taller h2 { line-height: 35px; padding-bottom: 10px; color: var(--rojo); }
.taller .imagen { float: left; width: 25%; margin-top: 10px; padding: 0 10px; font-size: 0.9em; line-height: 22px; text-align: center; }
.taller .texte { width: 70%; padding: 10px 20px 10px 5px; float: right; text-align: left; }
.taller .texte p { line-height: 24px; padding-bottom: 15px; }
.taller .texte img { padding: 10px 10px 10px 0; width: 45%; }
.taller .btn { color: var(--blanco); }

.carrito { width: 100%; }
.carrito h1 { font-weight: 600; margin-top: 5px; }
.window { border: solid var(--rojo); background-color: var(--blanco); margin: 10px 0 20px 20px; }
.carrito .window div { display: inline-block; vertical-align: middle; }
.carrito .window hr { width: 98%; margin: 6px 0 6px 1%; }
.carrito .window .div-buit { margin: 100px 0; width: 100%; text-align: center; }
.carrito .window .div-titol { font-weight: 600; }
.carrito .window .div-titol div { text-align: center; }
.carrito .window .div-titol .div-total { text-align: right; }
.carrito .window .div-foto { width: 19%; margin-left: 10px; }
.carrito .window .div-producto { width: 24%; margin-left: 10px; }
.carrito .window .div-precio { width: 15%; text-align: center; margin-left: -10px; }
.carrito .window .div-cantidad { width: 19%; text-align: center; }
.carrito .window .cantidad { font-size: 16px; display: inline-block; }
.carrito .window .unidades { float: left; margin-left: 6px; margin-top: 3px; }
.carrito .window .div-total { width: 14%; text-align: right; margin-left: -10px; }
.carrito .window .div-quitar { float: right; margin: 15px 10px 0 0; }
.carrito .window .div-quitar a { display: block; width: 25px; height: 25px; background: url(/imagenes/img/iconos.png) 175px 0px; }
.carrito .window .div-resum { width: 91%; text-align: right; margin-top: -10px; }
.carrito .window .div-resum p { margin-right: -23px; line-height: 25px; }
.carrito .window .free { text-align: center; width: 95%; overflow: hidden; margin: 10px 0 20px -10px; font-weight: 600; }

.pago { width: 100%; margin-bottom: 10px; }
.pago .window { width: 80%; border: solid var(--rojo); line-height: 1.5em; padding: 10px 0px 50px 20px; margin: 20px 20% 21px 10%; }
.pago .missatge { margin: 20px 25px; }
#form_pago { padding-left: 10%; }
#form_pago h1 { font-size: 1.5em; text-align: left; color: var(--rojo); margin-bottom: 10px; display: inline-block; }
#form_pago h3 { margin: 5px 0 5px -30px; }
#form_pago hr { margin: 5px 0; width: 100%; }
#form_pago .seleccionables { width: 100%; float: left; margin-top: 20px; }
#form_pago .seleccionables a { text-decoration: underline; color: var(--azul-link); }
#form_pago p { width: 95%; padding-right: 10px; display: inline-block; }
#form_pago input { border-width: 1px; }
#form_pago .camp_form, #form_pago .camp_codigo, #form_pago .camp_telf { width: var(--container-width); font-size: 18px; padding: 3px 0 1px 5px; background-color: #E9E9E9; resize: none; }
#form_pago .camp_codigo { width: 20%; float: left; }
#form_pago .camp_telf { width: 35%; float: left; }
#form_pago .camp_provincia { float: left; width: 70%; padding-left: 20px; font-size: 18px; }
#form_pago .resumen_compra { width: 60%; line-height: 27px; margin-left: 30px; margin-top: 10px; }
#form_pago .opciones_pago, #form_pago .opciones_envio { line-height: 27px; margin-left: 30px; margin-top: 15px; }
#form_pago .resumen_compra .import { float: right; }

.contacto { width: 100%; background-color: var(--gris-fondo); }
.contacto .container { width: 70%; margin-top: 20px; }
.form-contacto { border: none; margin: 20px 0; padding: 20px 0; background-color: var(--blanco); text-align: center; }
.form-contacto p { float: left; width: 30%; padding-top: 10px; }
.form-contacto .camp { width: 60%; padding: 5px 3px 10px 5px; background-color: #fffeee; margin-bottom: 20px; font-size: 1em; border-width: 1px; }
.form-contacto .btn { margin: 20px 0; }
.contacto .respuesta { margin: 5px 0 60px 0; padding: 20px 8px 15px 10px; background-color: var(--blanco); text-align: left; }
.contacto .respuesta p { line-height: 22px; padding-bottom: 10px; }

.infoenvio { width: 27px; height: 27px; background: url(/imagenes/img/iconos.png) -112px 2px; display: inline-block; vertical-align: bottom; }
.taula div { display: flex; flex-direction: column; align-items: center; }
.taula table { width: 98%; border: 2px solid black; border-collapse: collapse; }
.taula th { border: 1px solid black; height: 30px; background-color: #FFC; }
.taula td { height: 25px; border: 1px solid black; text-align: center; }
.taula p { margin: 2px 6px 8px 6px; }

.gestio { min-height: 890px; line-height: 25px; }
.gestio .seccion { width: auto; }
.gestio .texte-seccion { width: 410px; }
.gestio .bloc_centrat { display: flex; flex-direction: column; align-items: center; }
.gestio .bloc_centrat div { padding: 10px; }
.gestio .bloc_centrat ul { background: var(--blanco); margin: 30px 0 10px 0; }
.gestio .bloc_centrat li { margin: 5px 0; }
.gestio .titol { display: inline-block; width: 200px; height: 2.5em; }
.gestio p { padding: 0; margin: 0; }
.gestio .separador { width: 50%; padding: 20px 0; }
.gestio .missatge { width: 50%; border: solid var(--rojo); background-color: var(--blanco); padding: 20px; text-align: center; }
.gestio .boto_gris, .gestio .boto_vermell { display: inline-block; font-size: 1em; line-height: 22px; margin: 2px 0 2px 10px; padding: 3px 10px; text-align: center; cursor: pointer; }
.gestio .boto_vermell { background: #b00; color: var(--blanco); border: 1px outset buttonborder; }
.gestio .boto_gris { margin-top: 20px; background: var(--gris-claro); color: var(--negro); font-size: 1.1em; }
.gestio .thumbnails .detalls { text-align: left; font-size: 1.1em; padding-top: 5px; }
.gestio .camp { box-sizing: content-box; width: 200px; height: 20px; margin-left: 5px; padding: 2px 0; font-size: 17px; background-color: seashell; border-width: 1px; text-align: center; border-radius: 15px; }

/* ========================================================== */
/* 5. FOOTER (Flexbox Moderno)                                */
/* ========================================================== */
footer {
    width: 100%;
    display: block;
    margin-top: 20px;
}
footer .ventajas {
    width: 100%;
    background-color: var(--gris-fondo);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 5px 0;
}
footer .ventajas li {
    width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    box-sizing: border-box;
}
footer .ventajas li p {
    text-align: center;
    font-size: 15px;
    color: #555;
    margin-top: 10px;
    line-height: 1.3;
}
footer .ventajas li [class^="ventaja-"] {
    display: block;
    width: 50px;
    height: 50px;
    background-image: url(/imagenes/img/ventajas.png);

    flex-shrink: 0;
}
footer .ventajas li .ventaja-1 { background-position: 50px 0; }
footer .ventajas li .ventaja-2 { background-position: 100px 0; }
footer .ventajas li .ventaja-3 { background-position: 150px 0; }
footer .ventajas li .ventaja-4 { background-position: 200px 0; }

footer .legal {
    width: 100%;
    background-color: var(--gris-oscuro);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0;
}
footer .legal li { margin: 0 20px; }
footer .legal a {
    color: var(--blanco);
    font-size: 0.95em;
    text-decoration: none;
    transition: opacity 0.3s;
}
footer .legal a:hover { opacity: 0.8; text-decoration: underline; }

footer .social {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 20px 5%;
    gap: 15px;
}
footer .social li { display: flex; align-items: center; }
footer .social a {
    width: 30px;
    height: 30px;
    margin: 0 5px;
    display: inline-block;
    background-image: url(/imagenes/img/iconos.png);
    transition: transform 0.2s;
}
footer .social a:hover { transform: scale(1.1); }
footer .social a.icon-1 { background-position: 30px 0; } 
footer .social a.icon-1:hover { background-position: 30px -30px; }
footer .social a.icon-2 { background-position: 60px 0; } 
footer .social a.icon-2:hover { background-position: 60px -30px; }
footer .social a.icon-3 { background-position: 90px 0; } 
footer .social a.icon-3:hover { background-position: 90px -30px; }
footer .name { color: #666; font-size: 0.9em; }

.resumen { float: left; background-color: var(--blanco); margin-top: 10px; padding: 0 5% 25px 6%; line-height: 1.3; }
.resumen h1 { margin-left: 0; }
.resumen h2 { margin: 30px 0 5px 0; }
.resumen h3 { margin-top: 10px; }
.resumen p { margin: 5px 15px 0 15px; }
.resumen a { color: #800; text-decoration: underline; }
.resumen .video { width: 560px; height: 315px; }

/* Plugins */
#colorbox, #cboxOverlay, #cboxWrapper { position: absolute; top: 0; left: 0; z-index: 9999; overflow: hidden; }
#cboxWrapper { max-width: none; }
#cboxOverlay { position: fixed; width: 100%; height: 100%; background: var(--negro); opacity: 0.8; }
#cboxMiddleLeft, #cboxBottomLeft { clear: left; }
#cboxContent { position: relative; background: var(--blanco); overflow: visible; box-sizing: content-box; }
#cboxLoadedContent { overflow: auto; margin-bottom: 5px; box-sizing: content-box; }
#cboxTitle { margin: 0; }
#cboxLoadingOverlay, #cboxLoadingGraphic { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow { cursor: pointer; }
.cboxPhoto { float: left; margin: auto; border: 0; display: block; max-width: none; }
.cboxIframe { width: 100%; height: 100%; display: block; border: 0; padding: 0; margin: 0; background: var(--blanco); }
#colorbox { outline: 0; box-sizing: content-box; }
#cboxError { padding: 50px; border: 1px solid var(--gris-fondo); }

#galleryOverlay { width: 100%; height: 100%; position: fixed; top: 0; left: 0; opacity: 0; z-index: 100000; background-color: rgba(0,0,0,0.8); overflow: hidden; display: none; transition: opacity 1s ease; }
#galleryOverlay.visible { opacity: 1; }
#gallerySlider { height: 100%; left: 0; top: 0; width: 100%; white-space: nowrap; position: absolute; transition: left 0.5s ease; }
#gallerySlider .placeholder { height: 100%; width: 100%; line-height: 1px; text-align: center; display: inline-block; }
#gallerySlider .placeholder:before { display: block; content: "Pulsa las flechas para ver más fotos"; z-index: 999; color: white; margin-top: 90px; height: 40px; font-size: 1.5em; }
#gallerySlider .placeholder:after { display: block; content: "[X] VOLVER"; z-index: 999; color: white; cursor: pointer; margin-top: 25px; font-size: 1.2em; }
#gallerySlider .placeholder img { display: inline-block; max-height: 100%; max-width: 100%; vertical-align: middle; }
#prevArrow, #nextArrow { border: none; text-decoration: none; background: url('/imagenes/img/arrows.png') no-repeat; opacity: 0.8; cursor: pointer; position: absolute; width: 43px; height: 58px; top: 50%; margin-top: -29px; transition: opacity 0.2s ease; }
#prevArrow:hover, #nextArrow:hover { opacity: 1; }
#prevArrow { background-position: left top; left: 4%; }
#nextArrow { background-position: right top; right: 4%; }

/* ========================================================== */
/* 6. MEDIA QUERIES (Adaptabilidad y Responsive)              */
/* ========================================================== */

@media screen and (max-width: 980px) {
	.whatsapp-float {
        top: auto !important; bottom: 20px; right: 20px;
        width: 50px; height: 50px;
	}
}

/* --- MÓVIL Y TABLET VERTICAL (< 940px) --- */
@media screen and (max-width: 940px) {
    /* Navbar compacta */
    .info-contacto { display: none !important; }
    .header-top .logo img { height: 50px; }
    .header-top { 
        flex-wrap: nowrap; 
        gap: 5px; 
        padding-bottom: 5px; 
        padding-right: 0; 
    }
    .header-top .search-box { flex: 1 1 auto; min-width: 0; }
    .search-container { width: 100%; min-width: 100px; }
    
    .navbar nav.main-nav ul > li { flex: 0 0 auto; }
    .navbar nav.main-nav ul > li > a {
        white-space: nowrap; 
        background-color: #f9f9f9; 
        border-radius: 12px;
        margin-right: 4px;
        padding: 4px 8px;
        font-size: 14px;
        font-weight: 500;
        transition: background-color 0.3s, color 0.3s;
    }
    .navbar nav.main-nav ul > li:hover > a {
        background-color: var(--rojo);
        color: var(--blanco);
    }
}

/* --- ESCRITORIO (REGLAS DE GRID) --- */
@media screen and (min-width: 940px) {
    .presentacio p { font-size: 1.6em; }
    .navbar .ico_carrito { margin-right: 8px; }
    
    .thumbnails li { width: 23%; }
    .indice .thumbnails li .descripcio_blog { min-height: 135px; }
    
	#prevArrow { left: 12%; }
    #nextArrow { right: 12%; }
}

@media screen and (min-width: 1024px) {
    .navbar .telefono .ico-telefono { display: block; }
    .info-contacto .horario-texto { display: block; }
    
    .items .item .preu { margin-left: 20px; font-size: 1.45em; }
    .info .container, .blogpost .container { width: 80%; margin-top: 10px; margin-left: 10%; }
    .carrito .window .cantidad { margin-left: 5px; }
    
    .pago .window { width: 60%; margin: 20px 20% 21px 20%; }
    .form-contacto { width: 95%; margin-left: 60px; padding-top: 60px; }
    .contacto .container { margin-top: 60px; }
    .contacto .respuesta { width: 95%; margin-top: 30px; margin-left: 60px; }
    .tutoriales .thumbnails .component { height: 370px; }
    
    #prevArrow { left: 16%; }
    #nextArrow { right: 16%; }
}

@media screen and (min-width: 1250px) {
    .navbar .logo { margin-top: 5px; }
    .navbar .ico_carrito { margin-right: 10px; }
	.whatsapp-float { right: 25px; top: 10px; bottom: auto; }
    
    .indice .thumbnails li .mini-titol { width: auto; float: left; line-height: 2em; }
    .indice .thumbnails li .mini-preu { width: auto; float: right; font-size: 1em; line-height: 2em; }
    .indice .thumbnails li .descripcio_blog { min-height: 135px; }
    .tutoriales .descripcio_vid { min-height: 80px; }
    .items .item .detalls h3 { margin: 10px 0; font-size: 1.5em; text-align: center; }
    .navbar nav.main-nav ul > li > a { font-size: 1.1em; padding: 8px 15px; }
    
    .window { width: var(--container-width); margin: 10px 0 20px 80px; }
    .pago .window { width: 50%; margin-top: 40px; padding-left: 5%; padding-right: 20px; }
    .form-contacto { width: 80%; margin-left: 80px; }
    .contacto .respuesta { width: 80%; margin-left: 80px; }
    .separador p { font-size: 1.1em; }
    
    #prevArrow { left: 22%; }
    #nextArrow { right: 22%; }
}

/* --- MÓVIL ESTRICTO (< 768px) --- */
@media screen and (max-width: 768px) {
    body { min-width: 280px; padding-top: 60px; }
    .container { width: 98%; }
    
    .header-top {
        justify-content: space-between; 
        padding: 5px 15px 0 15px;
    }

    .navbar .menu_bar {
        display: block; 
        order: 1;
        cursor: pointer;
        z-index: 1000;
        width: 40px;    
        margin-top: 5px;
    }
    .navbar .menu_bar .barres {
        background: url(/imagenes/img/iconos.png) 120px -30px;
        width: 30px;
        height: 30px;
        display: block;
    }
 
    .header-top .logo {
        order: 2; flex-grow: 1; text-align: center; margin-top: 0;
    }
    .header-top .logo a { display: inline-block; }
    .header-top .logo img { height: 45px; }

    .carrito-wrapper {
        order: 3; width: 40px; display: flex; justify-content: flex-end; margin-left: 0;
    }
    
    .header-top .search-box { display: none; }
    

.search { display:block; width:100%; background:#999; text-align:center;}
	
.search .busqueda {
    width: 75%;
	margin: 5px 0;
    padding: 6px 40px 6px 15px;
    border: 2px solid var(--gris-fondo);
    border-radius: 30px;
    font-size: 15px;
    outline: none;
    height: 40px;
}

.search .btn_busqueda {
    position: relative;
    right: 50px;
    height: 26px;
    width: 26px;
    border: none;
    background: url(/imagenes/img/iconos.png) 260px -90px;
}

    .info-contacto { display: none !important; }

    /* Menú móvil */
    .navbar nav.main-nav {
		max-height: 0; /* equival a hidden pero millor */
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.5s ease-in-out, opacity 0.3s ease;
        width: 70%;
        background: var(--blanco);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 2000;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .navbar nav.main-nav.activo { display: block; max-height: 80vh; opacity: 1;}
    .navbar nav.main-nav ul { display: block; padding: 0; margin: 0; }
    .navbar nav.main-nav ul > li { display: block; width: 100%; border-top: 1px solid var(--gris-claro); margin: 0; border-radius: 0; }
    .navbar nav.main-nav ul > li > a { display: block; padding: 12px 30px; font-size: 20px; text-align: left; color: var(--negro); border-radius: 0; }
    
    .navbar nav ul li .children {
        position: static; display: none; width: 100%; border-bottom: 3px; box-shadow: none;
        background-color: #f0f0f0; font-size: 20px; padding-left: 30px; border-radius: 0;
    }
	
	div#slider {
        height: 110px !important; 
        margin-top: 10px;
    }
	
    /* Footer responsive */
    footer .ventajas li { width: 50%; }
    footer .legal { flex-direction: column; padding: 20px 0; }
    footer .legal li { width: 100%; text-align: center; margin: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px; }
    footer .social { flex-direction: column-reverse; text-align: center; }
    footer .social .name { margin-top: 10px; display: block; }
}