def _get_fender_config():
    try:
        from ocyan.core.fender import config
    except Exception:  # pragma: no cover - legacy runtime dependency can be absent
        return None
    return config


def get_config(section, option, fallback=None):
    config = _get_fender_config()
    if config is None:
        return fallback
    try:
        return config.get(section, option, fallback)
    except Exception:  # pragma: no cover - fail closed on broken legacy config state
        return fallback


def is_webshop():
    config = _get_fender_config()
    if config is None:
        return False
    return bool(getattr(config, "is_webshop", False))
