:root {
    --bd-primary: #198754;
    --bd-dark: #111827;
    --bd-soft: #f4f7f6;
    --bd-text: #1f2937;
    --bd-muted: #6b7280;
    --bd-border: #e5e7eb;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--bd-text);
    background: #fff;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.btn-primary {
    background: var(--bd-primary);
    border-color: var(--bd-primary);
}

.hero-section {
    padding: 96px 0;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(25,135,84,.95), rgba(17,24,39,.95)),
        linear-gradient(135deg, #198754, #111827);
}

.hero-section h1 {
    font-size: clamp(2.4rem, 5vw, 4.7rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-card {
    padding: 28px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 28px;
    background: rgba(255,255,255,.12);
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    backdrop-filter: blur(10px);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,.18);
}

.section-padding {
    padding: 76px 0;
}

.bg-soft {
    background: var(--bd-soft);
}

.section-title {
    max-width: 820px;
    margin-bottom: 36px;
}

.section-title span {
    display: inline-block;
    color: var(--bd-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
    margin-bottom: 8px;
}

.section-title h2 {
    font-weight: 800;
    letter-spacing: -.03em;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.section-title p {
    color: var(--bd-muted);
    font-size: 1.08rem;
}

.info-card,
.client-card,
.product-card,
.news-card,
.profile-card,
.content-box {
    background: #fff;
    border: 1px solid var(--bd-border);
    border-radius: 24px;
    box-shadow: 0 14px 40px rgba(15,23,42,.06);
}

.info-card {
    padding: 28px;
}

.info-card h3,
.product-card h4,
.news-card h4,
.profile-card h4 {
    font-weight: 800;
}

.profile-card,
.product-card,
.news-card {
    overflow: hidden;
    height: 100%;
}

.profile-card img,
.product-card img,
.news-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.profile-card strong {
    color: var(--bd-primary);
}

.client-card {
    padding: 26px;
    text-align: center;
}

.client-card img {
    height: 72px;
    max-width: 220px;
    object-fit: contain;
    margin-bottom: 20px;
}

.price {
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.share-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-links a,
.footer-links a {
    color: var(--bd-primary);
    font-weight: 600;
    text-decoration: none;
}

.empty-box {
    padding: 26px;
    background: #fff;
    border: 1px dashed var(--bd-border);
    border-radius: 20px;
    color: var(--bd-muted);
}

.site-footer {
    padding: 28px 0;
    background: #0b1220;
    color: #fff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a {
    color: #d1fae5;
}

.floating-store {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 94px;
    height: 48px;
    padding: 0 18px;
    color: #fff;
    background: var(--bd-primary);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(25,135,84,.35);
}

.page-content {
    max-width: 920px;
}

.content-box {
    padding: 28px;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 64px 0;
    }

    .section-padding {
        padding: 52px 0;
    }

    .profile-card img,
    .product-card img,
    .news-card img {
        height: 210px;
    }
}
.hero-section-small {
    padding: 64px 0;
}

.content-box .form-text {
    color: var(--bd-muted);
}


/* Blog y productos destacados empresariales */
.product-card {
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
    position: relative;
}
.product-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(25,135,84,.12), transparent 55%);
    opacity: 0;
    transition: opacity .28s ease;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 55px rgba(15,23,42,.12);
    border-color: rgba(25,135,84,.28);
}
.product-card:hover::after { opacity: 1; }
.product-card img { transition: transform .5s ease; object-fit: contain !important; object-position: center center !important; background:#fff; }
.product-card:hover img { transform: scale(1.02); }
.news-card.blog-card h4 a { color: var(--bd-dark); text-decoration: none; }
.news-card.blog-card h4 a:hover { color: var(--bd-primary); }
.blog-meta { display:flex; flex-wrap:wrap; gap: 12px; color: var(--bd-muted); font-size: .92rem; margin: 10px 0 18px; }
.blog-meta span { display:inline-flex; align-items:center; gap:6px; }
.blog-meta.compact { font-size: .82rem; margin: 6px 0 12px; }
.read-more { display:inline-flex; margin: 4px 0 14px; font-weight: 800; color: var(--bd-primary); text-decoration: none; }
.blog-detail-hero { padding: 70px 0 46px; background: linear-gradient(135deg, #0b1220, #198754); color: #fff; }
.blog-detail-hero h1 { max-width: 1000px; font-size: clamp(2.1rem, 5vw, 4.2rem); font-weight: 900; letter-spacing: -.045em; }
.blog-detail-hero .eyebrow { color: #d1fae5; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; }
.blog-detail-hero .blog-meta { color: #e5fff2; }
.blog-layout { display:grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items:start; }
.blog-main-img { width:100%; max-height: 460px; object-fit:cover; border-radius: 20px; margin-bottom: 28px; }
.blog-content { font-size: 1.06rem; line-height: 1.78; }
.blog-content h2, .blog-content h3, .blog-content h4 { font-weight: 900; margin-top: 1.4em; }
.blog-content blockquote { border-left: 5px solid var(--bd-primary); padding: 12px 18px; background: #f4f7f6; border-radius: 12px; }
.blog-content a { color: var(--bd-primary); font-weight: 700; }
.share-links.vertical { flex-direction: column; }
.editor-toolbar { display:flex; flex-wrap:wrap; gap:6px; padding:8px; background:#f8fafc; border:1px solid #dbe3ef; border-radius:14px 14px 0 0; }
.editor-toolbar button { border:1px solid #cbd5e1; background:#fff; border-radius:8px; padding:4px 9px; font-weight:800; }
.rich-editor { min-height:220px; border:1px solid #dbe3ef; border-top:0; border-radius:0 0 14px 14px; padding:14px; background:#fff; outline:none; }
.rich-editor:focus { box-shadow:0 0 0 .2rem rgba(25,135,84,.15); }
@media (max-width: 992px) { .blog-layout { grid-template-columns: 1fr; } }

/* Editor profesional para noticias / blog */
.rich-editor-quill,
.ql-container.rich-editor-quill {
    min-height: 320px;
    background: #fff;
}
.ql-toolbar.ql-snow {
    border: 1px solid #dbe3ef;
    border-radius: 16px 16px 0 0;
    background: #f8fafc;
    padding: 10px 12px;
}
.ql-container.ql-snow {
    border: 1px solid #dbe3ef;
    border-top: 0;
    border-radius: 0 0 16px 16px;
    font-size: 1rem;
}
.ql-editor {
    min-height: 320px;
    line-height: 1.75;
}
.ql-editor img,
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    margin: 18px 0;
    display: block;
}
.blog-content figure {
    margin: 24px 0;
}


/* =========================================================
   BizDatos - Imágenes completas en productos destacados
========================================================= */
.product-card img,
.productos-destacados img,
#productos .product-card img {
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff !important;
    padding: 10px;
}


/* Banner PWA: Agregar a pantalla principal en celular */
#bizdatosInstallBanner { position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 9999; display: flex; justify-content: center; pointer-events: none; }
.bizdatos-install-card { width: min(560px, 100%); display: flex; align-items: center; gap: 12px; background: #ffffff; color: #172033; border-radius: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.24); padding: 12px; pointer-events: auto; border: 1px solid rgba(15,23,42,.10); }
.bizdatos-install-card img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.bizdatos-install-text { flex: 1; line-height: 1.2; }
.bizdatos-install-text strong { display: block; font-size: 15px; }
.bizdatos-install-text span { display: block; font-size: 12px; color: #64748b; margin-top: 3px; }
#bizdatosInstallBtn { border: 0; border-radius: 999px; padding: 8px 12px; background: #0f766e; color: #fff; font-weight: 700; font-size: 12px; }
#bizdatosInstallClose { border: 0; background: #f1f5f9; color: #334155; width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; }
@media (min-width: 768px) { #bizdatosInstallBanner { display: none; } }

/* =========================================================
   Gestión de página - navegación derecha y acciones noticia
========================================================= */
.gestion-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 22px;
    align-items: start;
}

.gestion-page-main {
    min-width: 0;
}

.gestion-page-right-nav {
    position: sticky;
    top: 22px;
    align-self: start;
}

.right-nav-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
}

.right-nav-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    color: #0f172a;
    font-weight: 900;
    font-size: 14px;
}

.right-nav-title i {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ecfdf5;
    color: #0f766e;
}

.right-nav-link,
.right-nav-public {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 9px 11px;
    margin-bottom: 7px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #334155;
    text-align: left;
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.right-nav-link:hover,
.right-nav-public:hover,
.right-nav-link.active {
    background: #ecfdf5;
    color: #047857;
    transform: translateX(2px);
}

.right-nav-link i,
.right-nav-public i {
    color: inherit;
    font-size: 15px;
}

.right-nav-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.right-nav-public {
    justify-content: center;
    margin-top: 12px;
    margin-bottom: 0;
    border: 1px solid #0f766e;
    color: #0f766e;
    background: #ffffff;
}

.news-form-box {
    overflow: visible;
}

.news-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.news-save-top {
    white-space: nowrap;
    box-shadow: 0 12px 28px rgba(25, 135, 84, .22);
}

.news-save-bar {
    position: sticky;
    bottom: 14px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #bbf7d0;
    border-radius: 18px;
    background: rgba(240, 253, 244, .96);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .12);
    backdrop-filter: blur(8px);
}

.news-save-bar strong {
    display: block;
    color: #064e3b;
    font-size: 14px;
}

.news-save-bar span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

#formAgregarNoticia .ql-editor {
    min-height: 360px;
}

@media (max-width: 1280px) {
    .gestion-page-layout {
        grid-template-columns: 1fr;
    }

    .gestion-page-right-nav {
        position: static;
        order: -1;
    }

    .right-nav-card {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .right-nav-title {
        width: 100%;
        margin-bottom: 4px;
    }

    .right-nav-link,
    .right-nav-public {
        width: auto;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .news-form-header,
    .news-save-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .news-save-top {
        width: 100%;
    }

    .right-nav-card {
        display: grid;
        grid-template-columns: 1fr;
    }

    .right-nav-link,
    .right-nav-public {
        width: 100%;
    }
}
