
    :root {
        /* ---------- Marca: azul-petróleo ---------- */
        --brand-900: #003B55;
        --brand-800: #014665;
        --brand-700: #075C7A;
        --brand-600: #147495;
        --brand-500: #2789AA;

        /* ---------- Tinta / texto ---------- */
        --ink-900: #102A38;
        --ink-700: #344C58;
        --ink-500: #667982;

        /* ---------- Superfícies ---------- */
        --surface: #FFFFFF;
        --surface-warm: #F5F3EC;
        --surface-soft: #F6F8F8;
        --border: #DCE4E6;

        /* ---------- Status ---------- */
        --success: #17864B;
        --warning: #C88A19;
        --error: #B83B3B;
        --whatsapp: #25D366;
        --whatsapp-dark: #128C7E;

        /* ---------- Tipografia ---------- */
        --font-sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

        /* ---------- Raios (contidos, sem "pílula em tudo") ---------- */
        --radius-xs: 6px;
        --radius-sm: 8px;
        --radius-md: 12px;
        --radius-lg: 16px;
        --radius-xl: 20px;
        --radius-mask: 32px;

        /* ---------- Sombra única e discreta ---------- */
        --shadow-card: 0 8px 28px rgba(0, 48, 70, 0.04);
        --shadow-pop: 0 12px 36px rgba(0, 48, 70, 0.10);

        /* ---------- Movimento ---------- */
        --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
        --dur-hover: 200ms;
        --transition: all 200ms cubic-bezier(0.2, 0.8, 0.2, 1);

        /* ============================================================
           ALIASES LEGADOS — não remover.
           São referenciados por estilos inline no Python e por regras
           antigas. Apontam para os tokens acima para repintar tudo.
           ============================================================ */
        --primary-color: var(--brand-800);
        --primary-light: var(--brand-600);
        --primary-dark: var(--brand-900);
        --secondary-color: var(--brand-700);
        --accent-color: var(--brand-500);
        --danger-color: var(--error);
        --warning-color: var(--warning);
        --light-bg: var(--surface-soft);
        --card-bg: var(--surface);
        --text-primary: var(--ink-900);
        --text-secondary: var(--ink-500);
        --border-color: var(--border);
        --shadow-sm: var(--shadow-card);
        --shadow-md: var(--shadow-card);
        --shadow-lg: var(--shadow-pop);
        --radius-sm-legacy: var(--radius-sm);
    }
    
        
        body {
            font-family: var(--font-sans);
            background: var(--surface-warm);
            min-height: 100vh; color: var(--ink-900);
            line-height: 1.55;
        }
        .header {
            background: var(--brand-900);
            color: white; padding: 18px 0;
            box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
            border-bottom: 3px solid var(--brand-500);
        }
        .header h1 { font-weight: 700; font-size: 1.2rem; margin: 0; letter-spacing: -0.015em; }
        /* O logo oficial é azul-petróleo e sumiria no header petróleo.
           Convertido para branco só por CSS — o arquivo SVG não é alterado. */
        .logo-dianagro {
            height: 38px;
            width: auto;
            max-width: 112px;
            display: block;
            filter: brightness(0) invert(1);
        }
        .header small { color: rgba(255,255,255,0.62); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.68rem; }
        .product-container {
            background: white; border-radius: var(--radius-lg);
            box-shadow: var(--shadow-card);
            padding: 30px; margin-top: 30px;
            border: 1px solid var(--border);
        }
        .product-image-wrapper {
            display: flex; justify-content: center; align-items: center;
            background: var(--surface);
            border-radius: var(--radius-md); padding: 20px; min-height: 300px;
            border: 1px solid var(--border);
        }
        .product-image-wrapper img {
            max-width: 100%; max-height: 400px; object-fit: contain;
        }
        .product-image-wrapper { position: relative; cursor: zoom-in; }
        .product-image-wrapper .zoom-hint {
            position: absolute; bottom: 12px; right: 12px;
            width: 34px; height: 34px; border-radius: 50%;
            background: var(--brand-800); color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-size: 16px; box-shadow: var(--shadow-card);
            pointer-events: none; transition: transform 0.2s;
        }
        .product-image-wrapper:hover .zoom-hint { transform: scale(1.08); }
        .zoom-overlay-page {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0, 26, 38, 0.9); z-index: 100000;
            display: none; align-items: center; justify-content: center;
            padding: 24px; cursor: zoom-out;
        }
        .zoom-overlay-page.show { display: flex; }
        .zoom-overlay-page img {
            max-width: 96vw; max-height: 94vh; object-fit: contain;
            background: #fff; padding: 8px; border-radius: var(--radius-md);
            box-shadow: 0 8px 40px rgba(0,0,0,0.5); cursor: default;
        }
        .zoom-close {
            position: absolute; top: 16px; right: 20px;
            width: 42px; height: 42px; border-radius: 50%;
            border: none; background: rgba(255,255,255,0.15); color: #fff;
            font-size: 20px; display: flex; align-items: center; justify-content: center;
            cursor: pointer; z-index: 2;
        }
        .zoom-close:hover { background: rgba(255,255,255,0.3); }
        .product-details h2 {
            font-weight: 700; color: var(--brand-900); font-size: 1.35rem;
            line-height: 1.3; overflow-wrap: anywhere; letter-spacing: -0.015em;
        }
        .product-details .badge {
            font-size: 0.8rem; padding: 5px 12px;
            border-radius: var(--radius-sm);
            font-weight: 600;
        }
        .product-details .badge.bg-primary {
            background: var(--brand-900) !important;
            font-variant-numeric: tabular-nums;
        }
        /* Badge de linha na página individual. Antes usava .bg-secondary do
           Bootstrap (#6c757d) e depois brand-600: ambos com texto branco em
           fonte pequena, com contraste ruim. Vira contorno + tinta escura. */
        .product-details .badge.bg-secondary,
        .badge.linha-badge {
            background: var(--surface-soft) !important;
            color: var(--brand-800) !important;
            border: 1px solid var(--border);
            font-weight: 700;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }
        .product-details .badge.bg-info { background: var(--surface-soft) !important; color: var(--ink-700) !important; border: 1px solid var(--border); }
        .product-details .detail-row {
            display: flex; justify-content: space-between; gap: 14px; padding: 9px 0;
            border-bottom: 1px solid var(--border);
        }
        .product-details .detail-row:last-child { border-bottom: none; }
        .product-details .detail-label { color: var(--ink-500); font-weight: 500; white-space: nowrap; }
        .product-details .detail-value { font-weight: 600; }
        /* Valores longos (ex.: princípios ativos): alinha à direita e quebra linha */
        .product-details .detail-value-longo { text-align: right; overflow-wrap: anywhere; }
        .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
        
                .header-actions { display: flex; align-items: center; gap: 6px; }
                .header-icon-btn {
                    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.28);
                    font-size: 16px; cursor: pointer; color: #fff;
                    width: 36px; height: 36px; border-radius: var(--radius-md);
                    display: flex; align-items: center; justify-content: center;
                    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
                    box-shadow: none;
                }
                .header-icon-btn:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.5); transform: none; }
                /* Estado "no carrinho" (o JS só troca a classe e o ícone) */
                .header-icon-btn.is-active {
                    background: var(--success);
                    border-color: var(--success);
                    color: #fff;
                }
                .header-icon-btn.is-active:hover { background: #136e3d; border-color: #136e3d; }
                .info-badge-page {
                    display: inline-flex; align-items: center; gap: 6px;
                    background: var(--brand-800);
                    color: white; padding: 4px 12px; border-radius: var(--radius-sm);
                    font-size: 0.8rem; font-weight: 600;
                }
                .info-section {
                    background: var(--surface-soft); border-left: 3px solid var(--brand-600);
                    padding: 16px; border-radius: var(--radius-sm); margin-top: 20px;
                }
                .info-section h6 {
                    color: var(--brand-800); font-weight: 700; margin-bottom: 10px;
                }
                .info-text {
                    font-size: 0.9rem; color: var(--ink-700); line-height: 1.6;
                    white-space: pre-wrap; max-height: 300px; overflow-y: auto;
                }
                .action-btn {
                    display: inline-flex; align-items: center; gap: 8px;
                    padding: 10px 20px; border-radius: var(--radius-md); border: none;
                    font-weight: 600; font-size: 0.9rem; cursor: pointer;
                    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
                    text-decoration: none;
                }
                .action-btn:hover { transform: none; }
                .whatsapp-btn {
                    background: var(--whatsapp);
                    color: white; box-shadow: 0 6px 18px rgba(37,211,102,0.28);
                    padding: 10px 20px; border-radius: var(--radius-md); border: none;
                    font-weight: 600; font-size: 0.9rem; cursor: pointer;
                    transition: background 0.2s var(--ease);
                    text-decoration: none;
                    display: inline-flex; align-items: center; gap: 8px;
                }
                .whatsapp-btn:hover { color: white; background: var(--whatsapp-dark); box-shadow: 0 8px 22px rgba(37,211,102,0.36); transform: none; }
                .back-btn {
                    background: rgba(255,255,255,0.08);
                    border: 1px solid rgba(255,255,255,0.28);
                    color: white;
                    padding: 9px 18px; border-radius: var(--radius-md);
                    font-weight: 600; font-size: 0.9rem; cursor: pointer;
                    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
                    text-decoration: none;
                    display: inline-flex; align-items: center; gap: 8px;
                }
                .back-btn:hover { color: white; background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.5); transform: none; }
                .carrinho-toggle-btn {
                    background: var(--success);
                    color: white; border: none; border-radius: var(--radius-md);
                    padding: 9px 16px; font-weight: 700; font-size: 0.85rem;
                    cursor: pointer; display: inline-flex; align-items: center;
                    gap: 6px; transition: background 0.2s var(--ease); text-decoration: none;
                    box-shadow: none;
                }
                .carrinho-toggle-btn:hover { background: #136e3d; transform: none; box-shadow: none; }
                .carrinho-painel-page {
                    position: fixed; top: 0; right: 0; bottom: 0;
                    width: 360px; max-width: 100%; background: white;
                    z-index: 1200; box-shadow: -4px 0 24px rgba(0,26,38,0.18);
                    transform: translateX(100%); transition: transform 0.3s var(--ease);
                    overflow: hidden; display: flex; flex-direction: column;
                }
                .carrinho-painel-page.show { transform: translateX(0); }
                .carrinho-overlay-page {
                    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
                    background: rgba(0,26,38,0.45); z-index: 1199; display: none;
                }
                .carrinho-overlay-page.show { display: block; }
                @media (max-width: 576px) {
                    .carrinho-painel-page { width: 100%; }
                    .carrinho-toggle-btn span.btn-label { display: none; }
                }
            
        /* As páginas de produto não renderizam <footer> hoje; a regra fica
           alinhada com o rodapé compacto do index caso passe a ser usada. */
        footer {
            text-align: center; padding: 1.25rem 0 1rem 0; color: var(--ink-500);
            font-size: 0.75rem; margin-top: 2.5rem;
        }
        footer a { color: var(--brand-700); }
        a:focus-visible, button:focus-visible {
            outline: 3px solid var(--brand-500); outline-offset: 2px;
        }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.001ms !important;
                transition-duration: 0.001ms !important;
            }
        }
    