/* Galería y tarjetas del catálogo médico */

.productos {
    align-items: start;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tarjeta {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.galeria-producto {
    padding: 12px;
    background: #f4f7f8;
}

.galeria-producto .imagen-producto {
    display: grid;
    width: 100%;
    min-height: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    place-items: center;
    border-radius: 4px;
    background: white;
}

.galeria-producto .foto-producto {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.miniaturas {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.miniatura {
    width: 100%;
    padding: 2px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 2px solid transparent;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.miniatura:hover,
.miniatura.activa {
    border-color: var(--verde);
}

.miniatura img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.datos-producto {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.datos-producto p {
    margin-top: 0;
}

.sku {
    color: #71818a;
    font-size: 0.78rem;
    white-space: nowrap;
}

.descripcion-producto {
    min-height: 66px;
    color: #526671;
    line-height: 1.45;
}

.precio-consultar {
    color: var(--azul);
}

.por-confirmar {
    color: #9a6a11;
    font-weight: bold;
}

.variantes {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #dce4e7;
}

.variantes p {
    margin: 7px 0 0;
    color: #526671;
}

.acciones-producto {
    margin-top: 20px;
}

.boton-ficha {
    display: block;
    padding: 12px 15px;
    border: 1px solid var(--azul);
    border-radius: 5px;
    color: var(--azul);
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}

.boton-ficha:hover {
    background: var(--azul);
    color: white;
}

@media (max-width: 520px) {
    .productos {
        grid-template-columns: 1fr;
    }

    .miniaturas {
        grid-template-columns: repeat(6, minmax(38px, 1fr));
        overflow-x: auto;
    }

    .descripcion-producto {
        min-height: 0;
    }
}

/* Categorías médicas */

.categorias-medicas {
    grid-template-columns: repeat(4, 1fr);
}

.categorias-medicas .categoria-visual {
    min-height: 240px;
}

.diagnostico {
    background-image:
        url("../img/productos/fs10a/fs10a-blanco-01.webp"),
        linear-gradient(135deg, #d9f1f7, #6aa9bd);
}

.sillas-ruedas {
    background-image:
        url("../img/productos/sp7000/sp7000-azul.webp"),
        linear-gradient(135deg, #dce7f2, #557b9c);
}

.andaderas {
    background-image:
        url("../img/productos/spa8002/spa8002-01.webp"),
        linear-gradient(135deg, #e0ebe7, #658f7e);
}

.todos-medicos {
    background-image:
        url("../img/portada.jpg"),
        linear-gradient(135deg, #48798f, #173f55);
}

@media (max-width: 900px) {
    .categorias-medicas {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .categorias-medicas {
        grid-template-columns: 1fr;
    }
}
/* Mantener tamaño uniforme aunque el filtro muestre pocos productos */

.productos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .productos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .productos {
        grid-template-columns: 1fr;
    }
}

/* Encabezado profesional */

.barra {
    min-height: 88px;
    padding: 12px max(5%, calc((100% - 1200px) / 2));
    border-top: 4px solid var(--azul);
}

.marca-logo {
    width: 72px;
    height: 64px;
}

.marca strong {
    color: var(--azul-oscuro);
    font-size: 1.3rem;
}

.menu a {
    position: relative;
    font-weight: 600;
}

.menu > a:not(.menu-contacto)::after {
    position: absolute;
    right: 0;
    bottom: -7px;
    left: 0;
    height: 2px;
    background: var(--verde);
    content: "";
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.menu > a:not(.menu-contacto):hover::after {
    transform: scaleX(1);
}

.menu .menu-contacto {
    padding: 12px 18px;
    border-radius: 5px;
    background: var(--verde);
    color: #17330b;
    font-weight: bold;
}

.menu .menu-contacto:hover {
    background: #8ad835;
    color: #17330b;
}

@media (max-width: 800px) {
    .menu .menu-contacto {
        width: 100%;
        text-align: center;
    }
}
/* Portada principal */

.hero {
    min-height: 620px;
    padding: 80px max(6%, calc((100% - 1200px) / 2));
    background:
        linear-gradient(
            90deg,
            rgb(5 32 46 / 88%) 0%,
            rgb(5 32 46 / 68%) 48%,
            rgb(5 32 46 / 18%) 100%
        ),
        url("../img/portada.jpg") center / cover no-repeat;
}

.hero-contenido h1 {
    max-width: 760px;
    margin-bottom: 22px;
    font-size: clamp(2.8rem, 6vw, 5rem);
}

.hero-descripcion {
    max-width: 680px;
    margin-bottom: 28px;
    font-size: 1.2rem;
    line-height: 1.65;
}

.hero-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-acciones .boton-principal,
.boton-secundario {
    margin-top: 0;
    padding: 16px 24px;
}

.boton-secundario {
    display: inline-block;
    border: 2px solid white;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    text-decoration: none;
}

.boton-secundario:hover {
    background: white;
    color: var(--azul-oscuro);
}

.hero-beneficios {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 35px;
}

.hero-beneficios span {
    padding: 9px 13px;
    border: 1px solid rgb(255 255 255 / 40%);
    border-radius: 30px;
    background: rgb(255 255 255 / 12%);
    color: white;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

.hero-beneficios span::before {
    margin-right: 7px;
    color: var(--verde);
    content: "✓";
    font-weight: bold;
}

@media (max-width: 620px) {
    .hero {
        min-height: 570px;
        padding-top: 65px;
        padding-bottom: 65px;
        background-position: 58% center;
    }

    .hero-contenido h1 {
        font-size: 2.6rem;
    }

    .hero-acciones {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-acciones a {
        text-align: center;
    }

    .hero-beneficios {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Tipografía más suave y moderna */

body {
    font-family:
        "Segoe UI",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
}

h1,
h2,
h3,
.marca strong,
.boton-principal,
.boton-secundario,
.menu-contacto {
    letter-spacing: -0.02em;
}

p {
    line-height: 1.6;
}
/* Sucursales y contacto */

.contacto-profesional {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 35px 55px;
    padding: 70px max(6%, calc((100% - 1200px) / 2));
    background:
        linear-gradient(135deg, #082f45, #0b506d);
}

.contacto-introduccion {
    max-width: 520px;
}

.contacto-introduccion h2 {
    margin: 8px 0 18px;
}

.contacto-introduccion p:last-child {
    color: #d7e4e9;
}

.sucursales {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.sucursal {
    padding: 24px;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 8px;
    background: rgb(255 255 255 / 9%);
}

.sucursal span {
    color: var(--verde);
    font-size: 0.82rem;
    font-weight: bold;
    text-transform: uppercase;
}

.sucursal h3 {
    margin: 8px 0;
    font-size: 1.25rem;
}

.sucursal p {
    margin-bottom: 0;
    color: #d7e4e9;
}

.contacto-boton {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 0;
}

@media (max-width: 800px) {
    .contacto-profesional {
        grid-template-columns: 1fr;
    }

    .contacto-boton {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .sucursales {
        grid-template-columns: 1fr;
    }

    .contacto-boton {
        width: 100%;
        text-align: center;
    }
}
/* Botón flotante de contacto */

.whatsapp-flotante {
    display: flex;
    width: auto;
    height: 56px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 30px;
    background: #25d366;
    color: #083a1c;
    font-weight: 700;
    white-space: nowrap;
}

.whatsapp-icono {
    font-size: 1.45rem;
    line-height: 1;
}

.whatsapp-texto {
    font-size: 0.95rem;
}

.whatsapp-flotante:hover {
    background: #3be477;
    transform: translateY(-2px);
}

@media (max-width: 520px) {
    .whatsapp-flotante {
        width: 56px;
        padding: 0;
    }

    .whatsapp-texto {
        display: none;
    }
}
/* Aviso exclusivo del modo de vista previa */

.aviso-vista-previa {
    position: relative;
    z-index: 50;
    padding: 11px 20px;
    border-bottom: 2px solid #9a6a11;
    background: #ffd766;
    color: #3f3100;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}