/* ============================================================
   Quimilab — tema de marca (azul Quimilab, suave y redondeado)
   Sobre Bootstrap 5
   ============================================================ */
:root {
    --qb-teal:      #1c9fd6;   /* azul de marca Quimilab */
    --qb-teal-dark: #1580b3;
    --qb-teal-700:  #0f6d99;
    --qb-ink:       #12303f;
    --qb-muted:     #5a7684;
    --qb-mint-1:    #d2e9f6;
    --qb-mint-2:    #e8f4fb;
    --qb-card:      #ffffff;
    --qb-radius:    22px;
    --qb-shadow:    0 18px 40px rgba(28, 120, 170, .14);
    --qb-shadow-sm: 0 8px 22px rgba(28, 120, 170, .12);

    --bs-primary: #1c9fd6;
}

* { scroll-behavior: smooth; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
    font-family: "Poppins", "Segoe UI", Tahoma, sans-serif;
    color: var(--qb-ink);
    background: var(--qb-mint-2);
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -.01em; }

a { text-decoration: none; }

/* ---------- Botones ---------- */
.btn { border-radius: 999px; font-weight: 600; padding-inline: 1.4rem; }
.btn-lg { padding: .8rem 1.9rem; }
.btn-primary,
.btn-teal {
    background: var(--qb-teal);
    border-color: var(--qb-teal);
    color: #fff;
}
.btn-primary:hover,
.btn-teal:hover { background: var(--qb-teal-dark); border-color: var(--qb-teal-dark); color: #fff; }
.btn-outline-teal { border: 2px solid var(--qb-teal); color: var(--qb-teal-700); background: transparent; }
.btn-outline-teal:hover { background: var(--qb-teal); color: #fff; }
.btn-warning { background: var(--qb-teal); border-color: var(--qb-teal); color: #fff; }
.btn-warning:hover { background: var(--qb-teal-dark); border-color: var(--qb-teal-dark); color: #fff; }
.btn-outline-primary { border-color: var(--qb-teal); color: var(--qb-teal-700); }
.btn-outline-primary:hover,
.btn-outline-primary.active { background: var(--qb-teal); border-color: var(--qb-teal); color: #fff; }
/* Botones de WhatsApp: verde propio de WhatsApp (acción específica) */
.btn-success { background: #25d366; border-color: #25d366; color: #fff; }
.btn-success:hover { background: #1ebe5a; border-color: #1ebe5a; color: #fff; }

/* ---------- Navbar flotante tipo "pill" ---------- */
.navbar {
    background: transparent !important;
    padding-top: 1.1rem;
    padding-bottom: .4rem;
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 30;
}
body { padding-top: 84px; overflow-x: hidden; }
.navbar .container-lg {
    background: #fff;
    border-radius: 999px;
    padding: .5rem .8rem .5rem 1.4rem;
    box-shadow: var(--qb-shadow-sm);
}
.navbar-brand { color: var(--qb-ink) !important; font-weight: 800; font-size: 1.15rem; }
.navbar-brand .bi { color: var(--qb-teal); }
.navbar-brand .fw-light { color: var(--qb-teal); }
.navbar .nav-link { color: var(--qb-ink) !important; font-weight: 500; font-size: .95rem; padding-inline: .9rem; }
.navbar .nav-link:hover { color: var(--qb-teal) !important; }
.navbar-toggler { border: 0; }
.navbar .badge { font-size: .65rem; }

/* ---------- Hero ---------- */
.hero-section {
    background: linear-gradient(160deg, var(--qb-mint-1) 0%, var(--qb-mint-2) 60%);
    border-radius: 0 0 40px 40px;
    padding: 4rem 0 8rem;
    margin-top: -84px;
    padding-top: 7rem;
}
.hero-copy h1 {
    font-size: clamp(2.3rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.08;
}
.hero-copy p { color: var(--qb-muted); font-size: 1.1rem; max-width: 44ch; }
.hero-art {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--qb-shadow);
    aspect-ratio: 4 / 3;
    background: #cfe7e2;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Barra de búsqueda flotante ---------- */
.search-bar-wrap { margin-top: -5.5rem; position: relative; z-index: 5; }
.search-bar {
    background: #fff;
    border-radius: var(--qb-radius);
    box-shadow: var(--qb-shadow);
    padding: 1.4rem 1.6rem;
}
.search-bar label { font-size: .75rem; font-weight: 600; color: var(--qb-muted); text-transform: uppercase; letter-spacing: .04em; }
.search-bar .form-control,
.search-bar .form-select {
    border: 1px solid #e3efec;
    border-radius: 12px;
    background: #f6faf9;
}
.search-bar .form-control:focus,
.search-bar .form-select:focus { border-color: var(--qb-teal); box-shadow: 0 0 0 .2rem rgba(88,183,168,.2); }

/* ---------- Secciones ---------- */
.section { padding: 4rem 0; }
.section-title { text-align: center; font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 2.5rem; }

/* ---------- Tarjetas de categoría ---------- */
.category-card {
    background: var(--qb-card);
    border-radius: var(--qb-radius);
    box-shadow: var(--qb-shadow-sm);
    padding: 2.2rem 1rem;
    text-align: center;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--qb-shadow); }
.category-card .cat-icon {
    width: 66px; height: 66px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--qb-mint-2);
    color: var(--qb-teal);
    font-size: 1.8rem;
}
.category-card .fw-semibold { color: var(--qb-ink); }

/* ---------- Tarjetas de producto ---------- */
.product-card {
    border: 0;
    border-radius: var(--qb-radius);
    box-shadow: var(--qb-shadow-sm);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    background: #fff;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--qb-shadow); }
.product-img-wrap {
    height: 190px;
    display: flex; align-items: center; justify-content: center;
    background: var(--qb-mint-2);
    padding: 14px;
}
.product-img-wrap img { max-height: 100%; max-width: 100%; object-fit: contain; }
.card-title { font-size: .95rem; min-height: 2.6em; color: var(--qb-ink); }
.badge.bg-primary-subtle {
    background: var(--qb-mint-1) !important;
    color: var(--qb-teal-700) !important;
    font-weight: 600;
    border-radius: 999px;
}
.text-primary { color: var(--qb-teal-700) !important; }

/* ---------- Feature boxes ---------- */
.feature-box {
    background: #fff;
    border-radius: var(--qb-radius);
    box-shadow: var(--qb-shadow-sm);
    padding: 2rem 1.5rem;
    height: 100%;
}
.feature-box .bi { color: var(--qb-teal); }

/* ---------- Footer ---------- */
footer.bg-dark { background: var(--qb-ink) !important; border-radius: 40px 40px 0 0; }

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(135deg, var(--qb-teal) 0%, var(--qb-teal-dark) 100%);
    border-radius: var(--qb-radius);
    color: #fff;
    padding: 3rem;
}

.object-fit-cover { object-fit: cover; }
.text-teal { color: var(--qb-teal-700) !important; }
.btn-light.text-teal:hover { color: var(--qb-teal-dark) !important; }

/* Páginas internas: un respiro bajo el navbar flotante */
main > section:first-child,
.container-lg.py-4:first-of-type { margin-top: .5rem; }

/* ============================================================
   Botones sociales flotantes (WhatsApp + Instagram)
   ============================================================ */
.floating-social {
    position: fixed;
    right: 18px;
    bottom: 20px;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.floating-social .fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--qb-teal) 0%, var(--qb-teal-dark) 100%);
    box-shadow: 0 8px 20px rgba(28, 120, 170, .40);
    transition: transform .18s ease, box-shadow .18s ease;
}
.floating-social .fab:hover {
    transform: translateY(-3px) scale(1.05);
    color: #fff;
    box-shadow: 0 12px 26px rgba(28, 120, 170, .5);
}

/* FAB de cita: píldora que se expande al pasar el cursor */
.floating-social .fab--appt {
    width: auto;
    min-width: 52px;
    padding: 0 16px;
    gap: 8px;
    background: var(--qb-ink);
    box-shadow: 0 8px 20px rgba(18, 48, 63, .35);
}
.floating-social .fab--appt:hover { box-shadow: 0 12px 26px rgba(18, 48, 63, .45); }
.floating-social .fab__label { font-size: .82rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 991.98px) {
    .floating-social .fab--appt { width: 52px; min-width: 52px; padding: 0; }
    .floating-social .fab__label { display: none; }
}

/* ============================================================
   Menú inferior móvil
   ============================================================ */
.mobile-bottom-nav { display: none; }

/* Dispositivo móvil detectado por User-Agent: forzar la versión móvil */
body.is-mobile .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1035;
    background: #fff;
    box-shadow: 0 -6px 20px rgba(28, 120, 170, .12);
    border-radius: 18px 18px 0 0;
    padding: 6px 4px;
}
body.is-mobile .mobile-bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 0; color: var(--qb-muted); font-size: .68rem; font-weight: 500; position: relative;
}
body.is-mobile .mobile-bottom-nav a i { font-size: 1.25rem; }
body.is-mobile .mobile-bottom-nav a.active { color: var(--qb-teal); }
body.is-mobile .mobile-bottom-nav .mbn-badge {
    position: absolute; top: 0; right: 50%; transform: translateX(18px);
    background: var(--qb-teal); color: #fff; font-size: .6rem; font-weight: 700;
    min-width: 16px; height: 16px; line-height: 16px; border-radius: 999px; text-align: center; padding: 0 4px;
}
body.is-mobile { padding-bottom: 68px; }
body.is-mobile .floating-social { bottom: 82px; }
body.is-mobile .navbar-toggler { display: none; }
body.is-mobile #mainNav { display: none !important; }

@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 1035;
        background: #fff;
        box-shadow: 0 -6px 20px rgba(28, 120, 170, .12);
        border-radius: 18px 18px 0 0;
        padding: 6px 4px;
    }
    .mobile-bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 6px 0;
        color: var(--qb-muted);
        font-size: .68rem;
        font-weight: 500;
        position: relative;
    }
    .mobile-bottom-nav a i { font-size: 1.25rem; }
    .mobile-bottom-nav a.active { color: var(--qb-teal); }
    .mobile-bottom-nav .mbn-badge {
        position: absolute;
        top: 0;
        right: 50%;
        transform: translateX(18px);
        background: var(--qb-teal);
        color: #fff;
        font-size: .6rem;
        font-weight: 700;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        border-radius: 999px;
        text-align: center;
        padding: 0 4px;
    }
    body { padding-bottom: 68px; }
    .floating-social { bottom: 82px; }
    /* En móvil el menú vive abajo: ocultamos el desplegable superior */
    .navbar-toggler { display: none; }
    #mainNav { display: none !important; }
}

@media (max-width: 991.98px) {
    .navbar .container-lg { border-radius: 22px; }
    .hero-section { padding-bottom: 6rem; text-align: center; }
    .hero-copy p { margin-inline: auto; }
    .search-bar-wrap { margin-top: -3rem; }
    .cta-band { padding: 2rem 1.25rem; }
}
@media (max-width: 575.98px) {
    .hero-copy h1 { font-size: 1.7rem; line-height: 1.2; }
    .hero-copy p { font-size: 1rem; }
    .section { padding: 2.5rem 0; }
    .section-title { font-size: 1.4rem; margin-bottom: 1.75rem; }
    .hero-section { padding: 6rem 0 5rem; }
    .cta-band h3 { font-size: 1.3rem; }
}
